org.hardtokenmgmt.core.settings
Class GlobalSettings

java.lang.Object
  extended by org.hardtokenmgmt.core.settings.GlobalSettings

public class GlobalSettings
extends java.lang.Object

Class managing the globalsettings of the hardtoken management application.

Version:
$Id$
Author:
Philip Vendil 2006-aug-28

Nested Class Summary
static class GlobalSettings.ApplicationMode
           
 
Field Summary
static java.lang.String ADMINCERTMATCH
           
static java.lang.String ALWAYSREQUIREADMINTOKEN
           
static java.lang.String APPLETHEIGHT
           
static java.lang.String APPLETWIDTH
           
static GlobalSettings.ApplicationMode appMode
          Special variable indicating if the application is running in applet or application mode.
static java.lang.String BACKGROUNDCOLOR
           
static java.lang.String CERTLOGOSELECTOR
           
static java.lang.String DEVELOP_HTMGMT_HOME
           
static java.lang.String DISPLAYTOKENSELECTOR
           
static java.lang.String EJBCAWS_IMPLEMENTATION
           
static java.lang.String EJBCAWS_SOFTKEYSTORE
           
static java.lang.String EJBCAWS_SOFTKEYSTOREPWD
           
static java.lang.String EJBCAWS_URL
           
static java.lang.String FONT
           
static java.lang.String FOREGROUNDCOLOR
           
static java.lang.String LOGO_NAME
           
static java.lang.String MAINCONTROLLER
           
static java.lang.String PKCS11_NAME
          Constants used to define existing global settings
static java.lang.String TOKENIMPLEMENTATION
           
static java.lang.String TOKENINITIALBASICPIN
           
static java.lang.String TOKENINITIALSIGNATUREPIN
           
static java.lang.String USERDATASOURCES
           
static java.lang.String VERSION
           
 
Constructor Summary
GlobalSettings()
           
 
Method Summary
 java.lang.String getAdminCertMatch()
           
 java.awt.Color getAppletBackgroundColor()
           
 java.awt.Color getAppletForegroundColor()
           
 int getAppletHeight()
           
 int getAppletWidth()
           
 CertSelector getCertSelector()
          Method returning the cert Selector implementation from the global configuration settings
 java.lang.Object getCustomInterface(java.lang.String setting)
          Method returning a custom interface implementation from the global configuration settings
 DisplayTokenSelector getDisplayTokenSelector()
          Method returning the display token Selector implementation from the global configuration settings
 org.ejbca.core.protocol.ws.client.gen.EjbcaWS getEJBCAWSImplementation()
           
 long getExpireThreshould()
           
 IController getMainController()
          Returns an instance of the main controller used at startup of the application.
 java.lang.String getPKCS11Name()
           
 java.util.Properties getProperties()
          Special method used to get access to the Global properties manually
 java.lang.String getProperty(java.lang.String key)
          Help method do fetch a global settings
 java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
          Help method do fetch a global settings with a default value
 boolean getPropertyAsBoolean(java.lang.String key)
          Help method do fetch a global settings and expects either TRUE of FALSE otherwise is a Runtime BadConfigurationException thrown.
 boolean getPropertyAsBoolean(java.lang.String key, boolean defaultValue)
          Help method do fetch a global settings and expects either TRUE of FALSE otherwise is a Runtime BadConfigurationException thrown.
 java.lang.String getTokenImplementation()
           
 java.lang.String getTokenInitialBasicPIN()
           
 java.lang.String getTokenInitialSignaturePIN()
           
 java.util.List<java.lang.String> getUserDataSourceNames()
          Method returning all the configured user data source names from the property ejbcaws.userdatasourcenames which should be a ',' separated string.
 java.lang.String getVersion()
          Returns the current version of the software
 boolean isAlwaysRequireAdminToken()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PKCS11_NAME

public static final java.lang.String PKCS11_NAME
Constants used to define existing global settings

See Also:
Constant Field Values

TOKENIMPLEMENTATION

public static final java.lang.String TOKENIMPLEMENTATION
See Also:
Constant Field Values

ADMINCERTMATCH

public static final java.lang.String ADMINCERTMATCH
See Also:
Constant Field Values

TOKENINITIALBASICPIN

public static final java.lang.String TOKENINITIALBASICPIN
See Also:
Constant Field Values

TOKENINITIALSIGNATUREPIN

public static final java.lang.String TOKENINITIALSIGNATUREPIN
See Also:
Constant Field Values

APPLETHEIGHT

public static final java.lang.String APPLETHEIGHT
See Also:
Constant Field Values

APPLETWIDTH

public static final java.lang.String APPLETWIDTH
See Also:
Constant Field Values

FOREGROUNDCOLOR

public static final java.lang.String FOREGROUNDCOLOR
See Also:
Constant Field Values

BACKGROUNDCOLOR

public static final java.lang.String BACKGROUNDCOLOR
See Also:
Constant Field Values

FONT

public static final java.lang.String FONT
See Also:
Constant Field Values

MAINCONTROLLER

public static final java.lang.String MAINCONTROLLER
See Also:
Constant Field Values

EJBCAWS_IMPLEMENTATION

public static final java.lang.String EJBCAWS_IMPLEMENTATION
See Also:
Constant Field Values

EJBCAWS_URL

public static final java.lang.String EJBCAWS_URL
See Also:
Constant Field Values

EJBCAWS_SOFTKEYSTORE

public static final java.lang.String EJBCAWS_SOFTKEYSTORE
See Also:
Constant Field Values

EJBCAWS_SOFTKEYSTOREPWD

public static final java.lang.String EJBCAWS_SOFTKEYSTOREPWD
See Also:
Constant Field Values

LOGO_NAME

public static final java.lang.String LOGO_NAME
See Also:
Constant Field Values

CERTLOGOSELECTOR

public static final java.lang.String CERTLOGOSELECTOR
See Also:
Constant Field Values

DISPLAYTOKENSELECTOR

public static final java.lang.String DISPLAYTOKENSELECTOR
See Also:
Constant Field Values

USERDATASOURCES

public static final java.lang.String USERDATASOURCES
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

ALWAYSREQUIREADMINTOKEN

public static final java.lang.String ALWAYSREQUIREADMINTOKEN
See Also:
Constant Field Values

DEVELOP_HTMGMT_HOME

public static final java.lang.String DEVELOP_HTMGMT_HOME
See Also:
Constant Field Values

appMode

public static GlobalSettings.ApplicationMode appMode
Special variable indicating if the application is running in applet or application mode.

Constructor Detail

GlobalSettings

public GlobalSettings()
Method Detail

getPKCS11Name

public java.lang.String getPKCS11Name()

getTokenImplementation

public java.lang.String getTokenImplementation()

getAdminCertMatch

public java.lang.String getAdminCertMatch()

getTokenInitialBasicPIN

public java.lang.String getTokenInitialBasicPIN()

getTokenInitialSignaturePIN

public java.lang.String getTokenInitialSignaturePIN()

getAppletHeight

public int getAppletHeight()

getAppletWidth

public int getAppletWidth()

getAppletForegroundColor

public java.awt.Color getAppletForegroundColor()

getAppletBackgroundColor

public java.awt.Color getAppletBackgroundColor()

getMainController

public IController getMainController()
Returns an instance of the main controller used at startup of the application. Or null if no main controller us configured


getEJBCAWSImplementation

public org.ejbca.core.protocol.ws.client.gen.EjbcaWS getEJBCAWSImplementation()

getProperties

public java.util.Properties getProperties()
Special method used to get access to the Global properties manually


getCertSelector

public CertSelector getCertSelector()
Method returning the cert Selector implementation from the global configuration settings


getDisplayTokenSelector

public DisplayTokenSelector getDisplayTokenSelector()
Method returning the display token Selector implementation from the global configuration settings


getCustomInterface

public java.lang.Object getCustomInterface(java.lang.String setting)
Method returning a custom interface implementation from the global configuration settings


isAlwaysRequireAdminToken

public boolean isAlwaysRequireAdminToken()

getExpireThreshould

public long getExpireThreshould()
Returns:
Method returning the time i milli seconds of the time before a certificate is expired before it should be considered expiring.

getUserDataSourceNames

public java.util.List<java.lang.String> getUserDataSourceNames()
Method returning all the configured user data source names from the property ejbcaws.userdatasourcenames which should be a ',' separated string. Returns null if user data sources shouldn't be used


getProperty

public java.lang.String getProperty(java.lang.String key)
Help method do fetch a global settings


getProperty

public java.lang.String getProperty(java.lang.String key,
                                    java.lang.String defaultValue)
Help method do fetch a global settings with a default value


getPropertyAsBoolean

public boolean getPropertyAsBoolean(java.lang.String key)
Help method do fetch a global settings and expects either TRUE of FALSE otherwise is a Runtime BadConfigurationException thrown.


getPropertyAsBoolean

public boolean getPropertyAsBoolean(java.lang.String key,
                                    boolean defaultValue)
Help method do fetch a global settings and expects either TRUE of FALSE otherwise is a Runtime BadConfigurationException thrown. If the setting doesn't exist in the global settings will the default value be used.


getVersion

public java.lang.String getVersion()
Returns the current version of the software