org.deegree.sqldialect.filter.function
Class SQLFunctionManager

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

public class SQLFunctionManager
extends AbstractBasicResourceManager

Entry point for accessing SQLFunctionProvider instances that are registered via Java SPI.

Version:
$Revision: 30337 $, $Date: 2011-04-04 14:21:18 +0200 (Mo, 04. Apr 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Field Summary
 
Fields inherited from class org.deegree.commons.config.AbstractBasicResourceManager
dir, idToState, workspace
 
Constructor Summary
SQLFunctionManager()
           
 
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 SQLFunctionProvider getFunctionProvider(String name)
          Returns the SQLFunctionProvider for the given name.
static Map<String,SQLFunctionProvider> getFunctionProviders()
          Returns all available SQLFunctionProviders.
 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

SQLFunctionManager

public SQLFunctionManager()
Method Detail

getFunctionProviders

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

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

getFunctionProvider

public static SQLFunctionProvider getFunctionProvider(String name)
Returns the SQLFunctionProvider 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

shutdown

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


startup

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

Throws:
ResourceInitException

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.