public class DataSourceWorkflowRepository extends Object implements WorkflowRepository
DataSource
-based implementation of a workflow repository.Constructor and Description |
---|
DataSourceWorkflowRepository(DataSource ds)
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
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)
|
List |
getConditionsByTaskName(String taskName)
|
List<WorkflowCondition> |
getConditionsByWorkflowId(String workflowId)
|
WorkflowConditionConfiguration |
getConfigurationByConditionId(String condId) |
WorkflowTaskConfiguration |
getConfigurationByTaskId(String taskId)
|
List |
getRegisteredEvents()
|
WorkflowTask |
getTaskById(String taskId)
Returns the
WorkflowTask identified by the given taskId. |
List |
getTasksByWorkflowId(String workflowId)
Returns a
List of WorkflowTask s associated with the
specified Workflow identified by its workflowId . |
List |
getTasksByWorkflowName(String workflowName)
Returns a
List of WorkflowTask s 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
Workflow s from the repository. |
List |
getWorkflows(boolean getTasks,
boolean getConditions) |
List |
getWorkflowsForEvent(String eventName)
|
List |
getWorkflowsForEvent(String eventName,
boolean getTasks,
boolean getConditions) |
WorkflowTask |
getWorkflowTaskById(String taskId)
Returns the
WorkflowTask with the given taskId . |
public DataSourceWorkflowRepository(DataSource ds)
Default Constructor
.public Workflow getWorkflowByName(String workflowName) throws RepositoryException
WorkflowRepository
Returns a Workflow
with the given workflowName
.
getWorkflowByName
in interface WorkflowRepository
workflowName
- The name of the Workflow
to obtain.Workflow
with the specified name.RepositoryException
- If any error occurs.public Workflow getWorkflowByName(String workflowName, boolean getTasks, boolean getConditions) throws RepositoryException
RepositoryException
public Workflow getWorkflowById(String workflowId) throws RepositoryException
WorkflowRepository
Returns a Workflow
with the given workflowId
.
getWorkflowById
in interface WorkflowRepository
workflowId
- The ID of the Workflow
to obtain.Workflow
with the given ID.RepositoryException
- If any error occurs.public Workflow getWorkflowById(String workflowId, boolean getTasks, boolean getConditions) throws RepositoryException
RepositoryException
public List getWorkflows() throws RepositoryException
WorkflowRepository
Gets all Workflow
s from the repository.
getWorkflows
in interface WorkflowRepository
List
of all Workflow
s in the repository.RepositoryException
- If any error occurs.public List getWorkflows(boolean getTasks, boolean getConditions) throws RepositoryException
RepositoryException
public List getTasksByWorkflowId(String workflowId) throws RepositoryException
WorkflowRepository
Returns a List
of WorkflowTask
s associated with the
specified Workflow
identified by its workflowId
.
getTasksByWorkflowId
in interface WorkflowRepository
workflowId
- The ID of the Workflow
to obtain the List
of
WorkflowTask
s for.List
of WorkflowTask
s associated with the
specified Workflow.RepositoryException
- If any error occurs.public List getTasksByWorkflowName(String workflowName) throws RepositoryException
WorkflowRepository
Returns a List
of WorkflowTask
s associated with the
specified Workflow
identified by its workflowName
.
getTasksByWorkflowName
in interface WorkflowRepository
workflowName
- The Name of the Workflow
to obtain the List
of
WorkflowTask
s for.List
of WorkflowTask
s associated with the
specified Workflow.RepositoryException
- If any error occurs.public List getWorkflowsForEvent(String eventName) throws RepositoryException
WorkflowRepository
getWorkflowsForEvent
in interface WorkflowRepository
eventName
- The name of the event to search for workflows for. List
of Workflow
s associated with the specified
event.RepositoryException
- If any error occurs.public List getWorkflowsForEvent(String eventName, boolean getTasks, boolean getConditions) throws RepositoryException
RepositoryException
public List getConditionsByTaskName(String taskName) throws RepositoryException
WorkflowRepository
Returns an ordered List
of WorkflowCondition
s associated
with the given taskName
.
getConditionsByTaskName
in interface WorkflowRepository
taskName
- The taskName to obtain the conditions for.List
of WorkflowCondition
s associated
with the given taskName
RepositoryException
- If any error occurs.public List getConditionsByTaskId(String taskId) throws RepositoryException
WorkflowRepository
Returns an ordered List
of WorkflowCondition
s associated
with the given taskId
.
getConditionsByTaskId
in interface WorkflowRepository
taskId
- The ID of the task to obtain the conditions for.List
of WorkflowCondition
s associated
with the given taskId
RepositoryException
- If any error occurs.public WorkflowTaskConfiguration getConfigurationByTaskId(String taskId) throws RepositoryException
WorkflowRepository
Gets the WorkflowTaskConfiguration
metadata for the
WorkflowTask
with the given taskId
.
getConfigurationByTaskId
in interface WorkflowRepository
taskId
- The ID of the WorkflowTask
to get the
WorkflowTaskConfiguration
metadata for.WorkflowTaskConfiguration
metadata for the
WorkflowTask
with the given taskId
.RepositoryException
- If any error occurs.public WorkflowConditionConfiguration getConfigurationByConditionId(String condId) throws RepositoryException
RepositoryException
public WorkflowTask getWorkflowTaskById(String taskId) throws RepositoryException
WorkflowRepository
Returns the WorkflowTask
with the given taskId
.
getWorkflowTaskById
in interface WorkflowRepository
taskId
- The ID of the WorkflowTask to return.WorkflowTask
with the given taskId
.RepositoryException
- If any error occurs.public WorkflowCondition getWorkflowConditionById(String conditionId) throws RepositoryException
WorkflowRepository
Returns the WorkflowCondition
with the given
conditionId
.
getWorkflowConditionById
in interface WorkflowRepository
conditionId
- The ID of the WorkflowCondition to return.WorkflowCondition
with the given
conditionId
.RepositoryException
- If any error occurs.public List getRegisteredEvents() throws RepositoryException
WorkflowRepository
Gets a List
of Event
s that are registered in the
Workflow Manager as having valid Workflow
s mapped to their names.
getRegisteredEvents
in interface WorkflowRepository
List
of Event
s that are registered in the
Workflow Manager as having valid Workflow
s mapped to their
names.RepositoryException
- If any error occurs.public String addTask(WorkflowTask task) throws RepositoryException
WorkflowRepository
WorkflowTask
to the model repository.addTask
in interface WorkflowRepository
task
- The new WorkflowTask
to add.WorkflowTask
. Calling this
function and providing a task with its identifier already set will cause
this function to return that same identifier back.RepositoryException
- If any error occurs.public String addWorkflow(Workflow workflow) throws RepositoryException
WorkflowRepository
Workflow
to this Repository.addWorkflow
in interface WorkflowRepository
workflow
- The Workflow
to add.Workflow
as defined by this
repository.RepositoryException
- If any error occurs.public List<WorkflowCondition> getConditionsByWorkflowId(String workflowId) throws RepositoryException
WorkflowRepository
getConditionsByWorkflowId
in interface WorkflowRepository
workflowId
- The Identifier of the Workflow
to get the
WorkflowCondition
s for.List
of WorkflowCondition
s for this
Workflow
.RepositoryException
- If any error occurs.public WorkflowTask getTaskById(String taskId) throws RepositoryException
WorkflowRepository
WorkflowTask
identified by the given taskId.getTaskById
in interface WorkflowRepository
taskId
- The identifier for the WorkflowTask
to return.WorkflowTask
identified by the given taskId.RepositoryException
- If any error occurs.public List<WorkflowCondition> getConditions() throws RepositoryException
RepositoryException
Copyright © 1999-2015 Apache OODT. All Rights Reserved.