org.jwarp.service.configuration
Class ConfigurationService
java.lang.Object
|
+--org.jwarp.service.AService
|
+--org.jwarp.service.configuration.ConfigurationService
- All Implemented Interfaces:
- IConfigurable, IConfigurationService, IExceptionProvider, IReferenceable, IService
- public class ConfigurationService
- extends AService
- implements IConfigurationService
Service for handling configurations.
- Version:
- 1.0
- Author:
- ORCA Systems GmbH, Martin Schäfer
| Fields inherited from class org.jwarp.service.AService |
context, createdDate, dependencies, emptyProperties, exceptionListeners, log, resumedDate, serviceName, serviceStatus, serviceType, startedDate, stoppedDate, suspendedDate, systemTicket |
| Methods inherited from class org.jwarp.service.AService |
addExceptionListener, checkContext, createLogFromXML, getContext, getCreationDate, getDependencies, getExceptionListeners, getLog, getLogLevel, getName, getReference, getResumedDate, getShutDownDate, getStartDate, getStatus, getSuspendedDate, getType, removeAllExceptionListeners, removeExceptionListener, resume, sendExceptionEvent, setContext, setDependencies, setLogLevel, setName, start, suspend |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jwarp.service.IService |
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel, start, suspend |
ConfigurationService
public ConfigurationService()
- Creates a new configuration service
getConfiguration
public IConfiguration getConfiguration(java.lang.String configurationName,
ITicket user)
throws java.lang.SecurityException,
NotFoundException
- Return the configuration with the given name
- Specified by:
getConfiguration in interface IConfigurationService
- Parameters:
configurationName - The name of the configurationuser - The user's ticket
addConfiguration
public IConfiguration addConfiguration(java.lang.String url,
ITicket user)
throws java.lang.SecurityException,
NotFoundException
- Tries to add a new configuration specified by the configuration url.
- Specified by:
addConfiguration in interface IConfigurationService
- Parameters:
name - The url of the configurationuser - The user's ticket- Throws:
java.lang.SecurityException - If the access was deniedNotFoundException - If the url could not be resolved or read.
removeConfiguration
public IConfiguration removeConfiguration(java.lang.String name,
ITicket user)
throws java.lang.SecurityException,
NotFoundException
- Tries to remove the configuration with the given name
- Specified by:
removeConfiguration in interface IConfigurationService
- Parameters:
name - The name of the configurationuser - The user's ticket- Throws:
java.lang.SecurityException - If the access was deniedNotFoundException - If the configuration could not be located.
configure
public void configure(org.jdom.Element configuration)
throws ConfigurationException
- This configures the service. The service can be configured and then started independently.
- Specified by:
configure in interface IConfigurable- Overrides:
configure in class AService
- Parameters:
configuration - the configuration root for this service- Throws:
ServiceConfigurationException - If the configuration is missing or invalid
shutdown
public void shutdown(ITicket ticket)
throws ServiceRuntimeException,
java.lang.SecurityException
- Shut down the service. This overrides the implementation by clearing all configurations from the internal table.
- Specified by:
shutdown in interface IService- Overrides:
shutdown in class AService
- Following copied from interface:
org.jwarp.service.IService
- Parameters:
ticket - The user ticket- Throws:
ServiceRuntimeException - If the service could not be shut ownjava.lang.SecurityException - If access was denied.