From 7ad0e5e8d3d94ef40c7bfd7bb7d86fa01fabb8f5 Mon Sep 17 00:00:00 2001 From: tkellner Date: Tue, 13 Mar 2012 19:59:33 +0000 Subject: Enable configurable use of SWCard git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1030 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../at/gv/egiz/bku/local/stal/LocalSTALFactory.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'BKULocal/src') 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(); -- cgit v1.2.3