org.obe.spi.service
Interface CompletionStrategyFactory

All Superinterfaces:
WorkflowService

public interface CompletionStrategyFactory
extends WorkflowService

Provides management and registration for activity completion strategies.

Author:
Adrian Price

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 void createStrategy(CompletionStrategyMetaData strategy)
          Registers a completion strategy.
 void deleteStrategy(java.lang.String implClass)
          Unregisters a completion strategy.
 CompletionStrategy findStrategy(java.lang.String strategy)
          Finds a completion strategy.
 CompletionStrategyMetaData[] findStrategyMetaData()
          Finds meta-data for all strategys.
 CompletionStrategyMetaData findStrategyMetaData(java.lang.String strategy)
          Finds meta-data for an strategy.
 CompletionStrategyMetaData findStrategyType(java.lang.String className, java.lang.String locale)
          Returns information about the specified function type.
 CompletionStrategyMetaData[] findStrategyTypes(java.lang.String locale)
          Finds all function types known to the repository.
 void updateStrategy(CompletionStrategyMetaData strategy)
          Updates a completion strategy 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

createStrategy

public void createStrategy(CompletionStrategyMetaData strategy)
                    throws RepositoryException
Registers a completion strategy.

Parameters:
strategy - The completion strategy definition.
Throws:
ObjectAlreadyExistsException - if the implementation class is already registered.
RepositoryException - if the strategy could not be registered for some other reason.

deleteStrategy

public void deleteStrategy(java.lang.String implClass)
                    throws RepositoryException
Unregisters a completion strategy.

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

updateStrategy

public void updateStrategy(CompletionStrategyMetaData strategy)
                    throws RepositoryException
Updates a completion strategy definition.

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

findStrategyTypes

public CompletionStrategyMetaData[] findStrategyTypes(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 strategy types.
Throws:
RepositoryException - if an error occurred.

findStrategyType

public CompletionStrategyMetaData findStrategyType(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 strategy type.
Throws:
ObjectNotFoundException - if the strategy type is unknown.
RepositoryException - if some other error occurred.

findStrategyMetaData

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

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

findStrategyMetaData

public CompletionStrategyMetaData findStrategyMetaData(java.lang.String strategy)
                                                throws RepositoryException
Finds meta-data for an strategy. This method is intended to support design-time clients and management applications.

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

findStrategy

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

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


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