diff options
-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; |