org.apache.oodt.cas.workflow.repository
Class DataSourceWorkflowRepository

java.lang.Object
  extended by org.apache.oodt.cas.workflow.repository.DataSourceWorkflowRepository
All Implemented Interfaces:
WorkflowRepository

public class DataSourceWorkflowRepository
extends Object
implements WorkflowRepository

A DataSource-based implementation of a workflow repository.

Version:
$Revision$
Author:
mattmann

Constructor Summary
DataSourceWorkflowRepository(DataSource ds)
           Default Constructor
 
Method Summary
 String addTask(WorkflowTask task)
          Adds the provided new WorkflowTask to the model repository.
 String addWorkflow(Workflow workflow)
          Adds the specified new Workflow to this Repository.
 List<WorkflowCondition> getConditions()
           
 List getConditionsByTaskId(String taskId)
           Returns an ordered List of WorkflowConditions associated with the given taskId.
 List getConditionsByTaskName(String taskName)
           Returns an ordered List of WorkflowConditions associated with the given taskName.
 List<WorkflowCondition> getConditionsByWorkflowId(String workflowId)
          Gets the associated WorkflowConditions for this Workflow specified by its workflowId.
 WorkflowConditionConfiguration getConfigurationByConditionId(String condId)
           
 WorkflowTaskConfiguration getConfigurationByTaskId(String taskId)
           Gets the WorkflowTaskConfiguration metadata for the WorkflowTask with the given taskId.
 List getRegisteredEvents()
           Gets a List of Events that are registered in the Workflow Manager as having valid Workflows mapped to their names.
 WorkflowTask getTaskById(String taskId)
          Returns the WorkflowTask identified by the given taskId.
 List getTasksByWorkflowId(String workflowId)
           Returns a List of WorkflowTasks associated with the specified Workflow identified by its workflowId.
 List getTasksByWorkflowName(String workflowName)
           Returns a List of WorkflowTasks associated with the specified Workflow identified by its workflowName.
 Workflow getWorkflowById(String workflowId)
           Returns a Workflow with the given workflowId.
 Workflow getWorkflowById(String workflowId, boolean getTasks, boolean getConditions)
           
 Workflow getWorkflowByName(String workflowName)
           Returns a Workflow with the given workflowName.
 Workflow getWorkflowByName(String workflowName, boolean getTasks, boolean getConditions)
           
 WorkflowCondition getWorkflowConditionById(String conditionId)
           Returns the WorkflowCondition with the given conditionId.
 List getWorkflows()
           Gets all Workflows from the repository.
 List getWorkflows(boolean getTasks, boolean getConditions)
           
 List getWorkflowsForEvent(String eventName)
           Returns a List of Workflows associated with the specified eventName.
 List getWorkflowsForEvent(String eventName, boolean getTasks, boolean getConditions)
           
 WorkflowTask getWorkflowTaskById(String taskId)
           Returns the WorkflowTask with the given taskId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceWorkflowRepository

public DataSourceWorkflowRepository(DataSource ds)

Default Constructor

.

Method Detail

getWorkflowByName

public Workflow getWorkflowByName(String workflowName)
                           throws RepositoryException
Description copied from interface: WorkflowRepository

Returns a Workflow with the given workflowName.

Specified by:
getWorkflowByName in interface WorkflowRepository
Parameters:
workflowName - The name of the Workflow to obtain.
Returns:
A Workflow with the specified name.
Throws:
RepositoryException - If any error occurs.

getWorkflowByName

public Workflow getWorkflowByName(String workflowName,
                                  boolean getTasks,
                                  boolean getConditions)
                           throws RepositoryException
Throws:
RepositoryException

getWorkflowById

public Workflow getWorkflowById(String workflowId)
                         throws RepositoryException
Description copied from interface: WorkflowRepository

Returns a Workflow with the given workflowId.

Specified by:
getWorkflowById in interface WorkflowRepository
Parameters:
workflowId - The ID of the Workflow to obtain.
Returns:
A Workflow with the given ID.
Throws:
RepositoryException - If any error occurs.

getWorkflowById

public Workflow getWorkflowById(String workflowId,
                                boolean getTasks,
                                boolean getConditions)
                         throws RepositoryException
Throws:
RepositoryException

getWorkflows

public List getWorkflows()
                  throws RepositoryException
Description copied from interface: WorkflowRepository

Gets all Workflows from the repository.

Specified by:
getWorkflows in interface WorkflowRepository
Returns:
A List of all Workflows in the repository.
Throws:
RepositoryException - If any error occurs.

getWorkflows

public List getWorkflows(boolean getTasks,
                         boolean getConditions)
                  throws RepositoryException
Throws:
RepositoryException

getTasksByWorkflowId

public List getTasksByWorkflowId(String workflowId)
                          throws RepositoryException
Description copied from interface: WorkflowRepository

Returns a List of WorkflowTasks associated with the specified Workflow identified by its workflowId.

Specified by:
getTasksByWorkflowId in interface WorkflowRepository
Parameters:
workflowId - The ID of the Workflow to obtain the List of WorkflowTasks for.
Returns:
A List of WorkflowTasks associated with the specified Workflow.
Throws:
RepositoryException - If any error occurs.

getTasksByWorkflowName

public List getTasksByWorkflowName(String workflowName)
                            throws RepositoryException
Description copied from interface: WorkflowRepository

Returns a List of WorkflowTasks associated with the specified Workflow identified by its workflowName.

Specified by:
getTasksByWorkflowName in interface WorkflowRepository
Parameters:
workflowName - The Name of the Workflow to obtain the List of WorkflowTasks for.
Returns:
A List of WorkflowTasks associated with the specified Workflow.
Throws:
RepositoryException - If any error occurs.

getWorkflowsForEvent

public List getWorkflowsForEvent(String eventName)
                          throws RepositoryException
Description copied from interface: WorkflowRepository

Returns a List of Workflows associated with the specified eventName.

Specified by:
getWorkflowsForEvent in interface WorkflowRepository
Parameters:
eventName - The name of the event to search for workflows for.
Returns:
A List of Workflows associated with the specified event.
Throws:
RepositoryException - If any error occurs.

getWorkflowsForEvent

public List getWorkflowsForEvent(String eventName,
                                 boolean getTasks,
                                 boolean getConditions)
                          throws RepositoryException
Throws:
RepositoryException

getConditionsByTaskName

public List getConditionsByTaskName(String taskName)
                             throws RepositoryException
Description copied from interface: WorkflowRepository

Returns an ordered List of WorkflowConditions associated with the given taskName.

Specified by:
getConditionsByTaskName in interface WorkflowRepository
Parameters:
taskName - The taskName to obtain the conditions for.
Returns:
Returns a List of WorkflowConditions associated with the given taskName
Throws:
RepositoryException - If any error occurs.

getConditionsByTaskId

public List getConditionsByTaskId(String taskId)
                           throws RepositoryException
Description copied from interface: WorkflowRepository

Returns an ordered List of WorkflowConditions associated with the given taskId.

Specified by:
getConditionsByTaskId in interface WorkflowRepository
Parameters:
taskId - The ID of the task to obtain the conditions for.
Returns:
Returns a List of WorkflowConditions associated with the given taskId
Throws:
RepositoryException - If any error occurs.

getConfigurationByTaskId

public WorkflowTaskConfiguration getConfigurationByTaskId(String taskId)
                                                   throws RepositoryException
Description copied from interface: WorkflowRepository

Gets the WorkflowTaskConfiguration metadata for the WorkflowTask with the given taskId.

Specified by:
getConfigurationByTaskId in interface WorkflowRepository
Parameters:
taskId - The ID of the WorkflowTask to get the WorkflowTaskConfiguration metadata for.
Returns:
The WorkflowTaskConfiguration metadata for the WorkflowTask with the given taskId.
Throws:
RepositoryException - If any error occurs.

getConfigurationByConditionId

public WorkflowConditionConfiguration getConfigurationByConditionId(String condId)
                                                             throws RepositoryException
Throws:
RepositoryException

getWorkflowTaskById

public WorkflowTask getWorkflowTaskById(String taskId)
                                 throws RepositoryException
Description copied from interface: WorkflowRepository

Returns the WorkflowTask with the given taskId.

Specified by:
getWorkflowTaskById in interface WorkflowRepository
Parameters:
taskId - The ID of the WorkflowTask to return.
Returns:
the WorkflowTask with the given taskId.
Throws:
RepositoryException - If any error occurs.

getWorkflowConditionById

public WorkflowCondition getWorkflowConditionById(String conditionId)
                                           throws RepositoryException
Description copied from interface: WorkflowRepository

Returns the WorkflowCondition with the given conditionId.

Specified by:
getWorkflowConditionById in interface WorkflowRepository
Parameters:
conditionId - The ID of the WorkflowCondition to return.
Returns:
the WorkflowCondition with the given conditionId.
Throws:
RepositoryException - If any error occurs.

getRegisteredEvents

public List getRegisteredEvents()
                         throws RepositoryException
Description copied from interface: WorkflowRepository

Gets a List of Events that are registered in the Workflow Manager as having valid Workflows mapped to their names.

Specified by:
getRegisteredEvents in interface WorkflowRepository
Returns:
a List of Events that are registered in the Workflow Manager as having valid Workflows mapped to their names.
Throws:
RepositoryException - If any error occurs.

addTask

public String addTask(WorkflowTask task)
               throws RepositoryException
Description copied from interface: WorkflowRepository
Adds the provided new WorkflowTask to the model repository.

Specified by:
addTask in interface WorkflowRepository
Parameters:
task - The new WorkflowTask to add.
Returns:
The identifier of the new WorkflowTask. Calling this function and providing a task with its identifier already set will cause this function to return that same identifier back.
Throws:
RepositoryException - If any error occurs.

addWorkflow

public String addWorkflow(Workflow workflow)
                   throws RepositoryException
Description copied from interface: WorkflowRepository
Adds the specified new Workflow to this Repository.

Specified by:
addWorkflow in interface WorkflowRepository
Parameters:
workflow - The Workflow to add.
Returns:
The identifier of the new Workflow as defined by this repository.
Throws:
RepositoryException - If any error occurs.

getConditionsByWorkflowId

public List<WorkflowCondition> getConditionsByWorkflowId(String workflowId)
                                                  throws RepositoryException
Description copied from interface: WorkflowRepository
Gets the associated WorkflowConditions for this Workflow specified by its workflowId.

Specified by:
getConditionsByWorkflowId in interface WorkflowRepository
Parameters:
workflowId - The Identifier of the Workflow to get the WorkflowConditions for.
Returns:
A List of WorkflowConditions for this Workflow.
Throws:
RepositoryException - If any error occurs.

getTaskById

public WorkflowTask getTaskById(String taskId)
                         throws RepositoryException
Description copied from interface: WorkflowRepository
Returns the WorkflowTask identified by the given taskId.

Specified by:
getTaskById in interface WorkflowRepository
Parameters:
taskId - The identifier for the WorkflowTask to return.
Returns:
The WorkflowTask identified by the given taskId.
Throws:
RepositoryException - If any error occurs.

getConditions

public List<WorkflowCondition> getConditions()
                                      throws RepositoryException
Throws:
RepositoryException


Copyright © 1999-2013
Apache OODT. All Rights Reserved.