org.aselect.authspserver.config
Class AuthSPConfigManager

java.lang.Object
  extended by org.aselect.system.configmanager.ConfigManager
      extended by org.aselect.authspserver.config.AuthSPConfigManager

public class AuthSPConfigManager
extends ConfigManager

The configuration manager for the A-Select AuthSP Server.

Description:
A singleton configuration manager, containing the A-Select AuthSP Server configuration. It loads several settings in memory during initialize.

Concurrency issues:
-

Author:
Alfa & Ariss

Method Summary
 java.lang.String getErrorMessage(java.lang.String sKey, java.util.Properties pErrors)
          Retrieve error messsage from Properties.
static AuthSPConfigManager getHandle()
          Must be used to get an AuthSP ConfigManager instance.
 java.lang.String loadHTMLTemplate(java.lang.String sWorkingDir, java.lang.String sFileName, java.lang.String sConfigID, java.lang.String sFriendlyName, java.lang.String sVersion)
          Loads a template from harddisk to the supplied sTemplate variable.
 
Methods inherited from class org.aselect.system.configmanager.ConfigManager
getNextSection, getParam, getSection, getSection, importConfig, init, init, removeSection, removeSection, saveConfig, setParam, setSection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHandle

public static AuthSPConfigManager getHandle()
Must be used to get an AuthSP ConfigManager instance.

Description:
Creates a new AuthSPConfigManager instance if it's still null.

Concurrency issues:
Always the same instance of the config manager is returned, because it's singleton.

Preconditions:
-

Postconditions:
-

Returns:
handle to the AuthSPConfigManager

loadHTMLTemplate

public java.lang.String loadHTMLTemplate(java.lang.String sWorkingDir,
                                         java.lang.String sFileName,
                                         java.lang.String sConfigID,
                                         java.lang.String sFriendlyName,
                                         java.lang.String sVersion)
                                  throws ASelectException
Loads a template from harddisk to the supplied sTemplate variable.

Description:
Will load the template located in the file:
sWorkingDir\conf\sConfigID\html\ sFileName

Concurrency issues:
-

Preconditions:
Postconditions:
-

Parameters:
sWorkingDir - The working dir specified in the web.xml.
sFileName - File name with extension of the template that must be loaded.
sConfigID - The configuration ID which is used as (sub)directory name.
sFriendlyName - The friendly name, used in the error form.
sVersion - The name/version that is displayed in the error form.
Returns:
The loaded HTML template.
Throws:
ASelectException - if loading fails.

getErrorMessage

public java.lang.String getErrorMessage(java.lang.String sKey,
                                        java.util.Properties pErrors)
Retrieve error messsage from Properties.

Description:
Retrieve the configured error message with the given key.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
sKey - The error code.
pErrors - The error properties.
Returns:
The property if it exists, otherwise the key.


Copyright © 2008 SURFnet BV. All Rights Reserved.