org.obe.spi.service
Interface FunctionFactory

All Superinterfaces:
WorkflowService

public interface FunctionFactory
extends WorkflowService

Provides management and registration for pluggable script functions.

Author:
Adrian Price

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 void createFunctionSet(FunctionSetMetaData funcs)
          Registers a function set.
 void deleteFunctionSet(java.lang.String implClass)
          Unregisters a function set.
 FunctionSetMetaData[] findFunctionMetaData()
          Finds meta-data for all evaluators.
 FunctionSetMetaData findFunctionMetaData(java.lang.String className)
          Finds meta-data for an evaluator.
 java.lang.Class findFunctionSet(java.lang.String className)
          Finds a function set.
 FunctionSetMetaData findFunctionType(java.lang.String className, java.lang.String locale)
          Returns information about the specified function type.
 FunctionSetMetaData[] findFunctionTypes(java.lang.String locale)
          Finds all function types known to the repository.
 void updateFunctionSet(FunctionSetMetaData funcs)
          Updates a function set definition.
 
Methods inherited from interface org.obe.spi.WorkflowService
exit, getServiceManager, getServiceName, init
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

createFunctionSet

public void createFunctionSet(FunctionSetMetaData funcs)
                       throws RepositoryException
Registers a function set.

Parameters:
funcs - The function set definition.
Throws:
ObjectAlreadyExistsException - if the implementation class is already registered.
RepositoryException - if the evaluator could not be registered for some other reason.

deleteFunctionSet

public void deleteFunctionSet(java.lang.String implClass)
                       throws RepositoryException
Unregisters a function set.

Parameters:
implClass - The fully qualified implementation class name.
Throws:
ObjectNotFoundException - if the implementation class is not registered.
RepositoryException - if the evaluator could not be unregistered for some other reason.

updateFunctionSet

public void updateFunctionSet(FunctionSetMetaData funcs)
                       throws RepositoryException
Updates a function set definition.

Parameters:
funcs - The function set definition.
Throws:
ObjectNotFoundException - if an function set for the implementation class in question is not registered.
RepositoryException - if the function set could not be updated for some other reason.

findFunctionTypes

public FunctionSetMetaData[] findFunctionTypes(java.lang.String locale)
                                        throws RepositoryException
Finds all function types known to the repository. This method is intended to support design-time clients and management applications.

Parameters:
locale - The locale in which the results should be formatted.
Returns:
All evaluator types.
Throws:
RepositoryException - if an error occurred.

findFunctionType

public FunctionSetMetaData findFunctionType(java.lang.String className,
                                            java.lang.String locale)
                                     throws RepositoryException
Returns information about the specified function type. This method is intended to support design-time clients and management applications.

Parameters:
className - The function type (i.e., the fully qualified name of the implementation class).
locale - The locale in which the results should be formatted.
Returns:
Information about the specified evaluator type.
Throws:
ObjectNotFoundException - if the evaluator type is unknown.
RepositoryException - if some other error occurred.

findFunctionMetaData

public FunctionSetMetaData[] findFunctionMetaData()
                                           throws RepositoryException
Finds meta-data for all evaluators. This method is intended to support design-time clients and management applications.

Returns:
The list of all evaluators.
Throws:
RepositoryException - if an error occurred.

findFunctionMetaData

public FunctionSetMetaData findFunctionMetaData(java.lang.String className)
                                         throws RepositoryException
Finds meta-data for an evaluator. This method is intended to support design-time clients and management applications.

Parameters:
className - The name of the implementation class.
Returns:
Meta-data about the requested function set.
Throws:
ObjectNotFoundException - if a function set for className is not registered.
RepositoryException - if some other error occurred.

findFunctionSet

public java.lang.Class findFunctionSet(java.lang.String className)
                                throws RepositoryException
Finds a function set. This method is called by the engine at run-time when it needs to invoke a function from the function set with the given class name.

Parameters:
className - The fully qualified name of the implementing class.
Returns:
The requested function set.
Throws:
ObjectNotFoundException - if an function set for className is not registered.
RepositoryException - if some other error occurred.


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.