diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-03-13 19:59:33 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-03-13 19:59:33 +0000 |
commit | 7ad0e5e8d3d94ef40c7bfd7bb7d86fa01fabb8f5 (patch) | |
tree | 08e653ea7877baabd348ad2f75b005fde8e52e3e | |
parent | 2e0ebb53207f9e33d1a920c702c3b523b0f0b801 (diff) | |
download | mocca-7ad0e5e8d3d94ef40c7bfd7bb7d86fa01fabb8f5.tar.gz mocca-7ad0e5e8d3d94ef40c7bfd7bb7d86fa01fabb8f5.tar.bz2 mocca-7ad0e5e8d3d94ef40c7bfd7bb7d86fa01fabb8f5.zip |
Enable configurable use of SWCard
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1030 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r-- | BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java | 17 | ||||
-rw-r--r-- | smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java index 8a572614..9c4ad6dc 100644 --- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java @@ -32,12 +32,14 @@ import java.net.URL; import java.util.Locale; +import at.gv.egiz.bku.conf.MoccaConfigurationFacade; import at.gv.egiz.bku.gui.BKUGUIFacade; import at.gv.egiz.bku.gui.BKUIcons; import at.gv.egiz.bku.gui.PINManagementGUI; import at.gv.egiz.bku.gui.PINManagementGUIFacade; import at.gv.egiz.bku.local.gui.GUIProxy; import at.gv.egiz.bku.local.gui.LocalHelpListener; +import at.gv.egiz.smcc.util.SMCCHelper; import at.gv.egiz.stal.STAL; import at.gv.egiz.stal.STALFactory; import javax.swing.JFrame; @@ -61,7 +63,19 @@ public class LocalSTALFactory implements STALFactory { protected Configuration configuration; - + /** + * The configuration facade used to access the MOCCA configuration. + */ + protected ConfigurationFacade configurationFacade = new ConfigurationFacade(); + + public class ConfigurationFacade implements MoccaConfigurationFacade { + + public static final String USE_SWCARD = "UseSWCard"; + + public boolean getUseSWCard() { + return configuration.getBoolean(USE_SWCARD, false); + } + } @Override public STAL createSTAL() { @@ -94,6 +108,7 @@ public class LocalSTALFactory implements STALFactory { helpListener, null); BKUGUIFacade proxy = (BKUGUIFacade) GUIProxy.newInstance(gui, dialog, new Class[] { PINManagementGUIFacade.class} ); + SMCCHelper.setUseSWCard(configurationFacade.getUseSWCard()); stal = new LocalBKUWorker(proxy, dialog); dialog.setPreferredSize(PREFERRED_SIZE); dialog.pack(); diff --git a/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java b/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java index e4259346..3c8ff830 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java @@ -67,6 +67,7 @@ public class SMCCHelper { public synchronized void update(int sleep) { SignatureCardFactory factory = SignatureCardFactory.getInstance(); if (useSWCard) { + log.info("Using SW Card"); try { signatureCard = factory.createSignatureCard(null, null); resultCode = CARD_FOUND; |