fedora.server.security
Class DefaultBackendSecurity

java.lang.Object
  extended by fedora.server.Parameterized
      extended by fedora.server.Pluggable
          extended by fedora.server.Module
              extended by fedora.server.security.DefaultBackendSecurity
All Implemented Interfaces:
Constants, BackendSecurity

public class DefaultBackendSecurity
extends Module
implements BackendSecurity

A Module for accessing backend service security configuration information.

Version:
$Id: DefaultBackendSecurity.java 5313 2006-12-06 12:14:27Z cwilper $
Author:
rlw@virginia.edu

Nested Class Summary
 
Nested classes/interfaces inherited from interface fedora.common.Constants
Constants.FedoraHome
 
Field Summary
static BackendSecuritySpec beSS
           
 
Fields inherited from interface fedora.common.Constants
ACTION, BDEF, BMECH, DATASTREAM, DC, DISSEMINATOR, ENVIRONMENT, FEDORA, FEDORA_HOME, FEDORA_SYSTEM_DEF_PID, FEDORA_SYSTEM_DEF_URI, HTTP_REQUEST, MODEL, OBJECT, RDF, RECOVERY, RELS_EXT, RESOURCE, SUBJECT, TUCANA, VIEW, XSD
 
Constructor Summary
DefaultBackendSecurity(java.util.Map moduleParameters, Server server, java.lang.String role)
           Creates a new DefaultBackendSecurity.
 
Method Summary
 BackendSecuritySpec getBackendSecuritySpec()
          Gets the static instance of BackendSecuritySpec.
 BackendSecuritySpec parseBeSecurity()
          Parses the beSecurity configuration file.
 void postInitModule()
          Post-Initializes the Module based on configuration parameters.
 BackendSecuritySpec reloadBeSecurity()
          Re-initializes the static backendSecuritySpec instance by rereading the beSecurity configurationfile.
 void setBackendSecuritySpec()
          Initializes the static BackendSecuritySpec instance.
 
Methods inherited from class fedora.server.Module
getRole, getServer, initModule, shutdownModule
 
Methods inherited from class fedora.server.Pluggable
getHelp, getOptionalParameters, getParameterHelp, getRequiredModuleRoles, getRequiredParameters
 
Methods inherited from class fedora.server.Parameterized
getParameter, getParameter, getParameters, parameterNames, setParameter, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beSS

public static BackendSecuritySpec beSS
Constructor Detail

DefaultBackendSecurity

public DefaultBackendSecurity(java.util.Map moduleParameters,
                              Server server,
                              java.lang.String role)
                       throws ModuleInitializationException

Creates a new DefaultBackendSecurity.

Parameters:
moduleParameters - The name/value pair map of module parameters.
server - The server instance.
role - The module role name.
Throws:
ModuleInitializationException - If initialization values are invalid or initialization fails for some other reason.
Method Detail

postInitModule

public void postInitModule()
                    throws ModuleInitializationException
Post-Initializes the Module based on configuration parameters. The implementation of this method is dependent on the schema used to define the parameter names for the role of fedora.server.storage.DefaultBackendSecurity.

Overrides:
postInitModule in class Module
Throws:
ModuleInitializationException - If initialization values are invalid or initialization fails for some other reason.

parseBeSecurity

public BackendSecuritySpec parseBeSecurity()
                                    throws BackendSecurityParserException
Parses the beSecurity configuration file.

Specified by:
parseBeSecurity in interface BackendSecurity
Returns:
An instance of BackendSecuritySpec.
Throws:
BackendSecurityParserException - If an error occurs in attempting to parse the beSecurity configuration file.

getBackendSecuritySpec

public BackendSecuritySpec getBackendSecuritySpec()
Gets the static instance of BackendSecuritySpec.

Specified by:
getBackendSecuritySpec in interface BackendSecurity
Returns:
Current instance of backendSecuritySpec.

setBackendSecuritySpec

public void setBackendSecuritySpec()
                            throws BackendSecurityParserException
Initializes the static BackendSecuritySpec instance.

Specified by:
setBackendSecuritySpec in interface BackendSecurity
Throws:
BackendSecurityParserException - If an error occurs in attempting to parse the beSecurity configuration file.

reloadBeSecurity

public BackendSecuritySpec reloadBeSecurity()
                                     throws BackendSecurityParserException
Re-initializes the static backendSecuritySpec instance by rereading the beSecurity configurationfile. This method is used to refresh the beSecurity configuration on the server when changes have been made to the configuration file.

Specified by:
reloadBeSecurity in interface BackendSecurity
Returns:
An instance of BackendSecuritySpec.
Throws:
BackendSecurityParserException - If an error occurs in attempting to parse the beSecurity configuration file.