org.deegree.filter.function
Class FunctionManager

java.lang.Object
  extended by org.deegree.commons.config.AbstractBasicResourceManager
      extended by org.deegree.filter.function.FunctionManager
All Implemented Interfaces:
ResourceManager

public class FunctionManager
extends AbstractBasicResourceManager

Entry point for retrieving FunctionProvider instances that are registered via Java SPI.

Version:
$Revision: 31413 $, $Date: 2011-08-02 14:29:56 +0200 (Tue, 02 Aug 2011) $
Author:
Markus Schneider, last edited by: $Author: aschmitz $

Field Summary
 
Fields inherited from class org.deegree.commons.config.AbstractBasicResourceManager
dir, idToState, workspace
 
Constructor Summary
FunctionManager()
           
 
Method Summary
 ResourceState activate(String id)
          Activates the resource with the given identifier.
 ResourceState deactivate(String id)
          Deactivates the resource with the given identifier.
 Class<? extends ResourceManager>[] getDependencies()
           
static FunctionProvider getFunctionProvider(String name)
          Returns the FunctionProvider for the given name.
static Map<String,FunctionProvider> getFunctionProviders()
          Returns all available FunctionProviders.
 ResourceManagerMetadata<?> getMetadata()
           
protected  ResourceProvider getProvider(File file)
           
protected  void remove(String id)
           
 void shutdown()
          Is called upon workspace shutdown.
 void startup(DeegreeWorkspace ws)
          Is called upon workspace startup.
 
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
 

Constructor Detail

FunctionManager

public FunctionManager()
Method Detail

getFunctionProviders

public static Map<String,FunctionProvider> getFunctionProviders()
Returns all available FunctionProviders. Multiple functions with the same case ignored name are not allowed.

Returns:
all available functions, keys: name, value: FunctionProvider

getFunctionProvider

public static FunctionProvider getFunctionProvider(String name)
Returns the FunctionProvider for the given name.

Parameters:
name - name of the function, must not be null
Returns:
custom function instance, or null if there is no function with this name

getDependencies

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

getMetadata

public ResourceManagerMetadata<?> getMetadata()
Returns:
a metadata object, may be null

startup

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

Throws:
ResourceInitException

shutdown

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


activate

public ResourceState activate(String id)
Description copied from interface: ResourceManager
Activates the resource with the given identifier.

Parameters:
id - resource identifier, must not be null
Returns:
resource state after activation (may be unsuccessful), but never null

deactivate

public ResourceState deactivate(String id)
Description copied from interface: ResourceManager
Deactivates the resource with the given identifier.

Parameters:
id - resource identifier, must not be null
Returns:
resource state after deactivation (may be unsuccessful), but never null

getProvider

protected ResourceProvider getProvider(File file)
Specified by:
getProvider in class AbstractBasicResourceManager

remove

protected void remove(String id)
Specified by:
remove in class AbstractBasicResourceManager


Copyright © 2011. All Rights Reserved.