fedora.server.utilities.rebuild
Class RebuildServer

java.lang.Object
  extended by fedora.server.Parameterized
      extended by fedora.server.Pluggable
          extended by fedora.server.Server
              extended by fedora.server.utilities.rebuild.RebuildServer
All Implemented Interfaces:
Constants

public class RebuildServer
extends Server

Author:
diglib

Nested Class Summary
 
Nested classes/interfaces inherited from interface fedora.common.Constants
Constants.FedoraHome
 
Field Summary
 
Fields inherited from class fedora.server.Server
BIN_DIR, BUILD_NUMBER, CONFIG_ATTRIBUTE_CLASS, CONFIG_ATTRIBUTE_ID, CONFIG_ATTRIBUTE_NAME, CONFIG_ATTRIBUTE_ROLE, CONFIG_ATTRIBUTE_VALUE, CONFIG_DIR, CONFIG_ELEMENT_COMMENT, CONFIG_ELEMENT_DATASTORE, CONFIG_ELEMENT_MODULE, CONFIG_ELEMENT_PARAM, CONFIG_ELEMENT_ROOT, CONFIG_FILE, CONFIG_NAMESPACE, DEFAULT_SERVER_CLASS, EXTENSION_DIR, GLOBAL_CHOICE, HOME_PROPERTY, INIT_CONFIG_CONFIG_EXAMININGELEMENT, INIT_CONFIG_CONFIG_PARAMETERIS, INIT_CONFIG_SEVERE_BADELEMENT, INIT_CONFIG_SEVERE_BADNAMESPACE, INIT_CONFIG_SEVERE_BADROOTELEMENT, INIT_CONFIG_SEVERE_INCOMPLETEPARAM, INIT_CONFIG_SEVERE_MALFORMEDXML, INIT_CONFIG_SEVERE_NOCLASSGIVEN, INIT_CONFIG_SEVERE_NOIDGIVEN, INIT_CONFIG_SEVERE_NOROLEGIVEN, INIT_CONFIG_SEVERE_REASSIGNMENT, INIT_CONFIG_SEVERE_UNREADABLE, INIT_LOG_WARNING_CANTWRITESTARTUPLOG, INIT_MODULE_SEVERE_BADARGS, INIT_MODULE_SEVERE_CLASSNOTFOUND, INIT_MODULE_SEVERE_ILLEGALACCESS, INIT_MODULE_SEVERE_ISABSTRACT, INIT_MODULE_SEVERE_MISSINGCONSTRUCTOR, INIT_MODULE_SEVERE_UNFULFILLEDROLE, INIT_SERVER_SEVERE_BADARGS, INIT_SERVER_SEVERE_CLASSNOTFOUND, INIT_SERVER_SEVERE_ILLEGALACCESS, INIT_SERVER_SEVERE_ISABSTRACT, INIT_SERVER_SEVERE_MISSINGCONSTRUCTOR, INIT_SERVER_SEVERE_UNFULFILLEDROLE, INIT_XMLPARSER_SEVERE_MISSING, LOG_DIR, LOG_STARTUP_FILE, MODULE_CONSTRUCTOR_PARAM1_CLASS, MODULE_CONSTRUCTOR_PARAM2_CLASS, MODULE_CONSTRUCTOR_PARAM3_CLASS, NAMESPACE_PREFIX, s_instances, SERVER_CONSTRUCTOR_PARAM1_CLASS, SERVER_CONSTRUCTOR_PARAM2_CLASS, STORAGE_FORMAT, USE_CACHE, USE_DEFINITIVE_STORE, VERSION_MAJOR, VERSION_MINOR
 
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
RebuildServer(org.w3c.dom.Element rootConfigElement, java.io.File homeDir)
           
 
Method Summary
static Server getRebuildInstance(java.io.File homeDir)
          Provides an instance of the server specified in the configuration file at homeDir/CONFIG_DIR/CONFIG_FILE, or DEFAULT_SERVER_CLASS if unspecified.
protected  void initServer()
          Performs any server start-up tasks particular to this type of Server.
protected  java.lang.String overrideModuleClass(java.lang.String moduleClass)
           
protected  boolean overrideModuleRole(java.lang.String moduleRole)
           
 
Methods inherited from class fedora.server.Server
configureLog4J, datastoreConfigIds, finalize, getConfigSummary, getCurrentDate, getDatastoreConfig, getHomeDir, getInstance, getInstance, getLocale, getModule, getPID, getStatusFile, hasInitialized, hasInstance, loadedModuleRoles, pidFromFilename, postInitServer, shutdown, shutdownServer, status
 
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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RebuildServer

public RebuildServer(org.w3c.dom.Element rootConfigElement,
                     java.io.File homeDir)
              throws ServerInitializationException,
                     ModuleInitializationException
Parameters:
rootConfigElement -
homeDir -
Throws:
ServerInitializationException
ModuleInitializationException
Method Detail

overrideModuleRole

protected boolean overrideModuleRole(java.lang.String moduleRole)
Overrides:
overrideModuleRole in class Server

overrideModuleClass

protected java.lang.String overrideModuleClass(java.lang.String moduleClass)
Overrides:
overrideModuleClass in class Server

getRebuildInstance

public static final Server getRebuildInstance(java.io.File homeDir)
                                       throws ServerInitializationException,
                                              ModuleInitializationException
Provides an instance of the server specified in the configuration file at homeDir/CONFIG_DIR/CONFIG_FILE, or DEFAULT_SERVER_CLASS if unspecified.

Parameters:
homeDir - The base directory for the server.
Returns:
The instance.
Throws:
ServerInitializationException - If there was an error starting the server.
ModuleInitializationException - If there was an error starting a module.

initServer

protected void initServer()
                   throws ServerInitializationException
Description copied from class: Server
Performs any server start-up tasks particular to this type of Server.

This is guaranteed to be run before any modules are loaded. The default implementation does nothing.

Overrides:
initServer in class Server
Throws:
ServerInitializationException - If a severe server startup-related error occurred.