org.hardtokenmgmt.core.settings
Class AdministratorSettings

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

public class AdministratorSettings
extends java.lang.Object

Class managing Administrator specific settings of the hardtoken mangagement system If the property isn't found in the current administrator setting the corresponding global values will be used instead.

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

Field Summary
static java.lang.String LOGON_TRUSTEDCACERT
           
 
Constructor Summary
AdministratorSettings()
           
 
Method Summary
 java.security.cert.X509Certificate getAdminCert()
          Method that return the certificate of the current loged in administrator.
 java.lang.String getProperty(java.lang.String resource)
          Retrieves the settings connected to the given resource.
 java.lang.String getProperty(java.lang.String resource, java.lang.String defaultValue)
          Retrieves the settings connected to the given resource.
 boolean getPropertyAsBoolean(java.lang.String resource, boolean defaultValue)
          Retrieves the settings connected to the given resource as a boolean.
 void reload()
          Method that reloads the administrator settings
 void setAdminCert(java.security.cert.X509Certificate adminCert)
          Method that sets the admin certificate used by the webpage displaying the applet.
 void setProperty(java.lang.String resource, boolean value)
          Sets the administrator setting and saves it to file in the administrators home directory
 void setProperty(java.lang.String resource, java.lang.String value)
          Sets the administrator setting and saves it to file in the administrators home directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGON_TRUSTEDCACERT

public static final java.lang.String LOGON_TRUSTEDCACERT
See Also:
Constant Field Values
Constructor Detail

AdministratorSettings

public AdministratorSettings()
Method Detail

reload

public void reload()
Method that reloads the administrator settings


getAdminCert

public java.security.cert.X509Certificate getAdminCert()
Method that return the certificate of the current loged in administrator.

Returns:
the certificate of the logged in administrator or null if no admin cert could be found.

setAdminCert

public void setAdminCert(java.security.cert.X509Certificate adminCert)
Method that sets the admin certificate used by the webpage displaying the applet. This method should only be called by the main applet


setProperty

public void setProperty(java.lang.String resource,
                        java.lang.String value)
Sets the administrator setting and saves it to file in the administrators home directory

Parameters:
resource - one of the defined constants
value -

setProperty

public void setProperty(java.lang.String resource,
                        boolean value)
Sets the administrator setting and saves it to file in the administrators home directory

Parameters:
resource - one of the defined constants
value - as a boolean

getProperty

public java.lang.String getProperty(java.lang.String resource)
Retrieves the settings connected to the given resource. The value of the resource is up to the implementor to decide.


getProperty

public java.lang.String getProperty(java.lang.String resource,
                                    java.lang.String defaultValue)
Retrieves the settings connected to the given resource. The value of the resource is up to the implementor to decide. Returns the default value if the property is null.


getPropertyAsBoolean

public boolean getPropertyAsBoolean(java.lang.String resource,
                                    boolean defaultValue)
Retrieves the settings connected to the given resource as a boolean. The value of the resource is up to the implementor to decide but must be "true" or "false". Returns the default value if the property is null.