org.hardtokenmgmt.core.settings
Class BasicGlobalSettings

java.lang.Object
  extended by org.hardtokenmgmt.core.settings.BasicGlobalSettings
Direct Known Subclasses:
GlobalSettings

public class BasicGlobalSettings
extends java.lang.Object

Base class containing the most vital functionality, used in the WS server part.

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

Field Summary
protected  java.util.Properties settings
           
 
Constructor Summary
BasicGlobalSettings()
           
 
Method Summary
 java.lang.Object getCustomInterface(java.lang.String setting)
          Method returning a custom interface implementation from the global configuration settings
 java.lang.Object getCustomInterface(java.lang.String setting, java.lang.Class<?> defaultImplementation)
          Method returning a custom interface implementation from the global configuration settings
 long getExpireThreshould()
           
 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, the returned value is trimmed.
 java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
          Help method do fetch a global settings with a default value, the returned value is trimmed.
 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.
 int getPropertyAsInt(java.lang.String key)
          Help method do fetch a global settings and expects an integer value otherwise is a Runtime BadConfigurationException thrown.
 int getPropertyAsInt(java.lang.String key, int defaultValue)
          Help method do fetch a global settings and expects an integer value otherwise is a Runtime BadConfigurationException thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

settings

protected java.util.Properties settings
Constructor Detail

BasicGlobalSettings

public BasicGlobalSettings()
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getProperties

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


getCustomInterface

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


getCustomInterface

public java.lang.Object getCustomInterface(java.lang.String setting,
                                           java.lang.Class<?> defaultImplementation)
Method returning a custom interface implementation from the global configuration settings


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.

getProperty

public java.lang.String getProperty(java.lang.String key)
Help method do fetch a global settings, the returned value is trimmed.


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, the returned value is trimmed.


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.


getPropertyAsInt

public int getPropertyAsInt(java.lang.String key)
Help method do fetch a global settings and expects an integer value otherwise is a Runtime BadConfigurationException thrown.


getPropertyAsInt

public int getPropertyAsInt(java.lang.String key,
                            int defaultValue)
Help method do fetch a global settings and expects an integer value otherwise is a Runtime BadConfigurationException thrown. If the setting doesn't exist in the global settings will the default value be used.