shocks.framework.workflow.sequence.repository
Interface CentralSequenceRepositoryMBean

All Known Implementing Classes:
CentralSequenceRepository

public interface CentralSequenceRepositoryMBean


Method Summary
 void addWorkflow(Workflow sequence)
          Add a new workflow component to the instance pool.
 java.lang.String getVersion(DataSource metadata)
          Returns the current operating version of a workflow sequence.
 java.util.SortedSet getVersions(DataSource metadata)
          Returns a SortedSet of all the existing version strings in descending order.
 Workflow leaseWorkflow(DataSource metadata)
          Leases a workflow component from the instance pool.
 void release(Workflow sequence)
          Releases a leased workflow component back into the instance pool.
 void setCurrentVersion(DataSource metadata, java.lang.String version)
          This method will set the current operating version of a workflow sequence to a previous existing version.
 

Method Detail

leaseWorkflow

public Workflow leaseWorkflow(DataSource metadata)

Leases a workflow component from the instance pool. This component should be released back into the instance pool once it is no longer needed.

Parameters:
metadata -
Returns:
Workflow

release

public void release(Workflow sequence)

Releases a leased workflow component back into the instance pool. The method will sort the workflow component by name and version.

Parameters:
sequence -

addWorkflow

public void addWorkflow(Workflow sequence)

Add a new workflow component to the instance pool. If a version of the instance exists with the same name and version, it will not be loaded.

Parameters:
sequence -

getVersion

public java.lang.String getVersion(DataSource metadata)

Returns the current operating version of a workflow sequence. Each workflow sequence is identified by a metadata component whose values amount to a composite key.

Parameters:
metadata -
Returns:
String

setCurrentVersion

public void setCurrentVersion(DataSource metadata,
                              java.lang.String version)

This method will set the current operating version of a workflow sequence to a previous existing version. The string value entered must be one of the previous operating versions existing in the system.

Parameters:
metadata -
version -

getVersions

public java.util.SortedSet getVersions(DataSource metadata)

Returns a SortedSet of all the existing version strings in descending order.

Parameters:
metadata -
Returns:
SortedSet