org.deegree.services.controller
Class WebServicesConfiguration

java.lang.Object
  extended by org.deegree.commons.config.AbstractBasicResourceManager
      extended by org.deegree.commons.config.AbstractResourceManager<OWS>
          extended by org.deegree.services.controller.WebServicesConfiguration
All Implemented Interfaces:
ExtendedResourceManager<OWS>, ResourceManager

public class WebServicesConfiguration
extends AbstractResourceManager<OWS>

ExtendedResourceManager for OWS (and web service configuration).

Version:
$Revision$, $Date$
Author:
Andreas Schmitz, last edited by: $Author$

Field Summary
 
Fields inherited from class org.deegree.commons.config.AbstractResourceManager
name, nsToProvider
 
Fields inherited from class org.deegree.commons.config.AbstractBasicResourceManager
dir, idToState, workspace
 
Constructor Summary
WebServicesConfiguration()
           
 
Method Summary
protected  void add(OWS ows)
          Called when a new Resource has been successfully initialized.
 Map<String,List<OWS>> getAll()
          Return all active OWS.
 List<OWS> getByOWSClass(Class<?> c)
          Returns the service controller instance based on the class of the service controller.
 List<OWS> getByRequestName(String requestName)
          Returns the OWS instance that is responsible for handling requests with a certain name, e.g.
 List<OWS> getByRequestNS(String ns)
          Determines the OWS instance that is responsible for handling XML requests in the given namespace.
 List<OWS> getByServiceType(String serviceType)
          Returns the OWS instance that is responsible for handling requests to a certain service type, e.g.
 Class<? extends ResourceManager>[] getDependencies()
           
 DeegreeServiceControllerType getMainConfiguration()
           
 ResourceManagerMetadata getMetadata()
           
 DeegreeServicesMetadataType getMetadataConfiguration()
           
 RequestLogger getRequestLogger()
           
 DeegreeWorkspace getWorkspace()
           
 void initMetadata(DeegreeWorkspace workspace)
          Initializes the metadata (can be used to scan for resource providers, important so transitive dependencies work).
 boolean logOnlySuccessful()
           
protected  void remove(OWS ows)
          Called when a formerly active Resource is going to be destroyed.
 void shutdown()
          Is called upon workspace shutdown.
 void startup(DeegreeWorkspace workspace)
          Is called upon workspace startup.
 
Methods inherited from class org.deegree.commons.config.AbstractResourceManager
activate, create, deactivate, get, getProvider, processResourceConfig, remove
 
Methods inherited from class org.deegree.commons.config.AbstractBasicResourceManager
createResource, deleteResource, getState, getStates, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.commons.config.ResourceManager
createResource, deleteResource, getState, getStates
 

Constructor Detail

WebServicesConfiguration

public WebServicesConfiguration()
Method Detail

initMetadata

public void initMetadata(DeegreeWorkspace workspace)
Description copied from interface: ExtendedResourceManager
Initializes the metadata (can be used to scan for resource providers, important so transitive dependencies work).


startup

public void startup(DeegreeWorkspace workspace)
             throws ResourceInitException
Description copied from interface: ResourceManager
Is called upon workspace startup.

Specified by:
startup in interface ResourceManager
Overrides:
startup in class AbstractResourceManager<OWS>
Throws:
ResourceInitException

getByServiceType

public List<OWS> getByServiceType(String serviceType)
Returns the OWS instance that is responsible for handling requests to a certain service type, e.g. WMS, WFS.

Parameters:
serviceType - service type code, e.g. "WMS" or "WFS"
Returns:
responsible OWS or null, if no responsible service was found

getByRequestName

public List<OWS> getByRequestName(String requestName)
Returns the OWS instance that is responsible for handling requests with a certain name, e.g. GetMap, GetFeature.

Parameters:
requestName - request name, e.g. "GetMap" or "GetFeature"
Returns:
responsible OWS or null, if no responsible service was found

getByRequestNS

public List<OWS> getByRequestNS(String ns)
Determines the OWS instance that is responsible for handling XML requests in the given namespace.

Parameters:
ns - XML namespace
Returns:
responsible OWS or null, if no responsible service was found

getAll

public Map<String,List<OWS>> getAll()
Return all active OWS.

Returns:
the instance of the requested service used by OGCFrontController, or null if the service is not registered.

getByOWSClass

public List<OWS> getByOWSClass(Class<?> c)
Returns the service controller instance based on the class of the service controller.

Parameters:
c - class of the requested service controller, e.g. WPSController.getClass()
Returns:
the instance of the requested service used by OGCFrontController, or null if no such service controller is active

shutdown

public void shutdown()
Description copied from interface: ResourceManager
Is called upon workspace shutdown.

Specified by:
shutdown in interface ResourceManager
Overrides:
shutdown in class AbstractResourceManager<OWS>

getMainConfiguration

public DeegreeServiceControllerType getMainConfiguration()
Returns:
the JAXB main configuration

getMetadataConfiguration

public DeegreeServicesMetadataType getMetadataConfiguration()
Returns:
the JAXB metadata configuration

getRequestLogger

public RequestLogger getRequestLogger()
Returns:
null, if none was configured

logOnlySuccessful

public boolean logOnlySuccessful()
Returns:
true, if the option was set in the logging configuration

getDependencies

public Class<? extends ResourceManager>[] getDependencies()
Returns:
an empty array if there are no dependencies

getWorkspace

public DeegreeWorkspace getWorkspace()

getMetadata

public ResourceManagerMetadata getMetadata()
Returns:
a metadata object for use in GUIs, may be null

add

protected void add(OWS ows)
Description copied from class: AbstractResourceManager
Called when a new Resource has been successfully initialized.

Overrides:
add in class AbstractResourceManager<OWS>

remove

protected void remove(OWS ows)
Description copied from class: AbstractResourceManager
Called when a formerly active Resource is going to be destroyed.

Overrides:
remove in class AbstractResourceManager<OWS>


Copyright © 2011. All Rights Reserved.