org.obe.spi.service
Interface EvaluatorFactory

All Superinterfaces:
WorkflowService

public interface EvaluatorFactory
extends WorkflowService

Provides management and registration for pluggable script evaluators.

Author:
Adrian Price

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 void createEvaluator(EvaluatorMetaData eval)
          Registers an evaluator.
 void deleteEvaluator(java.lang.String contentType)
          Unregisters an evaluator.
 Evaluator findEvaluator(java.lang.String contentType)
          Finds an evaluator.
 EvaluatorMetaData[] findEvaluatorMetaData()
          Finds meta-data for all evaluators.
 EvaluatorMetaData findEvaluatorMetaData(java.lang.String contentType)
          Finds meta-data for an evaluator.
 EvaluatorMetaData findEvaluatorType(java.lang.String className, java.lang.String locale)
          Returns information about the specified evaluator type.
 EvaluatorMetaData[] findEvaluatorTypes(java.lang.String locale)
          Finds all evaluator types known to the repository.
 void updateEvaluator(EvaluatorMetaData eval)
          Updates an evaluator.
 
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

createEvaluator

public void createEvaluator(EvaluatorMetaData eval)
                     throws RepositoryException
Registers an evaluator.

Parameters:
eval - The evaluator definition.
Throws:
ObjectAlreadyExistsException - if the content type is already registered.
RepositoryException - if the evaluator could not be registered for some other reason.

deleteEvaluator

public void deleteEvaluator(java.lang.String contentType)
                     throws RepositoryException
Unregisters an evaluator.

Parameters:
contentType - The MIME content type for the scripting language.
Throws:
ObjectNotFoundException - if an evaluator for contentType is not registered.
RepositoryException - if the evaluator could not be unregistered for some other reason.

updateEvaluator

public void updateEvaluator(EvaluatorMetaData eval)
                     throws RepositoryException
Updates an evaluator.

Parameters:
eval - The evaluator definition.
Throws:
ObjectNotFoundException - if an evaluator for the content type in question is not registered.
RepositoryException - if the evaluator could not be updated for some other reason.

findEvaluatorTypes

public EvaluatorMetaData[] findEvaluatorTypes(java.lang.String locale)
                                       throws RepositoryException
Finds all evaluator 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.

findEvaluatorType

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

Parameters:
className - The evaluator 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.

findEvaluatorMetaData

public EvaluatorMetaData[] findEvaluatorMetaData()
                                          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.

findEvaluatorMetaData

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

Parameters:
contentType - The MIME content type for the scripting language.
Returns:
Meta-data about the requested evaluator.
Throws:
ObjectNotFoundException - if an evaluator for contentType is not registered.
RepositoryException - if some other error occurred.

findEvaluator

public Evaluator findEvaluator(java.lang.String contentType)
                        throws RepositoryException
Finds an evaluator. This method is called by the engine at run-time when it needs to execute the evaluator with the given ID.

Parameters:
contentType - The MIME content type for the scripting language.
Returns:
The requested evaluator.
Throws:
ObjectNotFoundException - if an evaluator for contentType is not registered.
RepositoryException - if some other error occurred.


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