de.danet.an.workflow.spis.rms
Class ResourceManagementServiceFactory

java.lang.Object
  extended byde.danet.an.workflow.spis.rms.ResourceManagementServiceFactory
All Implemented Interfaces:
java.io.Serializable

public abstract class ResourceManagementServiceFactory
extends java.lang.Object
implements java.io.Serializable

Defines a factory API that enables a workflow component to obtain a workflow resource management service.

See Also:
Serialized Form

Constructor Summary
protected ResourceManagementServiceFactory()
          Constructor.
 
Method Summary
 ResourceAssignmentContext getResourceAssignmentContext()
           
 ResourceAssignmentService getResourceAssignmentService()
          Deprecated. see setResourceAssignmentService
static ResourceManagementServiceFactory newInstance()
          Obtain a new instance of a ResourceManagementServiceFactory.
abstract  ResourceManagementService newResourceManagementService()
          Creates a new instance of a ResourceManagementService.
 void setResourceAssignmentContext(ResourceAssignmentContext resourceAssignmentContext)
          Specifies the resource assignment service to be used by the instances of ResourceManagementService subsequently created (by calling newResourceManagementService()).
 void setResourceAssignmentService(ResourceAssignmentService service)
          Deprecated. the resource management service needs only a small subset of the methods provided by a ResourceAssignmentService. To allow greater flexibility when implementing a resource management service, the requirement for a complete resource assignment service has been replaced with the requirement for a ResourceAssignmentContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceManagementServiceFactory

protected ResourceManagementServiceFactory()
Constructor. Must be overridden with a parameterless public constructor by derived class.

Method Detail

newInstance

public static ResourceManagementServiceFactory newInstance()
                                                    throws FactoryConfigurationError
Obtain a new instance of a ResourceManagementServiceFactory. This static method creates a new factory instance . The method uses the following ordered lookup procedure to determine the ResourceManagementServiceFactory implementation class to load:

Returns:
an instance of the ResourceManagementServiceFactory.
Throws:
FactoryConfigurationError - if a factory instance can't be created.

setResourceAssignmentService

public void setResourceAssignmentService(ResourceAssignmentService service)
Deprecated. the resource management service needs only a small subset of the methods provided by a ResourceAssignmentService. To allow greater flexibility when implementing a resource management service, the requirement for a complete resource assignment service has been replaced with the requirement for a ResourceAssignmentContext.

Specifies the resource assignment service to be used by the instances of ResourceManagementService subsequently created (by calling newResourceManagementService()).

A resource management service needs a reference to a resource assignment service to be able to implement WfResource objects. The method workItems requires that a WfAssignment be returned, something that can only be done in cooperation with the resource assignment service.

An implementation problem may arise from the requirement to set a ResourceAssignmentService as implementations of ResourceAssignmentService that in turn rely on a ResourceManagementService may need a ResourceManagementService in order to be instantiated. Such implementations of ResourceAssignmentService have therefore to delay the actual request for a ResourceManagementService instance until they have made themselves known to the ResourceManagementServiceFactory.

Parameters:
service - the resource management service.
See Also:
getResourceAssignmentService()

getResourceAssignmentService

public ResourceAssignmentService getResourceAssignmentService()
Deprecated. see setResourceAssignmentService

Return the resource assignment service set with setResourceAssignmentService.

Returns:
the resource assignment service.
See Also:
setResourceAssignmentService(de.danet.an.workflow.spis.ras.ResourceAssignmentService)

newResourceManagementService

public abstract ResourceManagementService newResourceManagementService()
                                                                throws FactoryConfigurationError
Creates a new instance of a ResourceManagementService.

Returns:
the resource management service.
Throws:
FactoryConfigurationError - if a service instance can't be created.

setResourceAssignmentContext

public void setResourceAssignmentContext(ResourceAssignmentContext resourceAssignmentContext)
Specifies the resource assignment service to be used by the instances of ResourceManagementService subsequently created (by calling newResourceManagementService()).

A resource management service needs a reference to a resource assignment context to be able to implement WfResource objects. E.g. the method workItems requires that a WfAssignment be returned, something that can only be done in cooperation with the resource assignment service.

Parameters:
resourceAssignmentContext - The resourceAssignmentContext to set.

getResourceAssignmentContext

public ResourceAssignmentContext getResourceAssignmentContext()
Returns:
Returns the configured resource assignment context.
See Also:
setResourceAssignmentContext(ResourceAssignmentContext)