com.atlassian.jira.workflow
Interface WorkflowDescriptorStore

All Known Implementing Classes:
CachingWorkflowDescriptorStore, OfBizWorkflowDescriptorStore

public interface WorkflowDescriptorStore

This interface provides methods responsible for persisting a WorkflowDescriptor to the database.

Since:
v3.13

Method Summary
 List<JiraWorkflowDTO> getAllJiraWorkflowDTOs()
          Returns a list of all the workflows stored in the underlying store.
 ImmutableWorkflowDescriptor getWorkflow(String name)
          Retrieves a WorkflowDescriptor from the underlying store.
 String[] getWorkflowNames()
          Returns an array of all the workflowNames stored.
 boolean removeWorkflow(String name)
          Removes a workflow from the underlying store.
 boolean saveWorkflow(String name, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, boolean replace)
          Saves or updates a workflowDescriptor.
 

Method Detail

getWorkflow

ImmutableWorkflowDescriptor getWorkflow(String name)
                                        throws com.opensymphony.workflow.FactoryException
Retrieves a WorkflowDescriptor from the underlying store. Returns null if no WorkflowDescriptor can be found

Parameters:
name - The workflow name
Returns:
Null or the matching WorkflowDescriptor
Throws:
com.opensymphony.workflow.FactoryException - If there's an error constructing the WorkflowDescriptor from its underlying representation

removeWorkflow

boolean removeWorkflow(String name)
Removes a workflow from the underlying store.

Parameters:
name - The workflow name
Returns:
true if any records were delete, false otherwise

saveWorkflow

boolean saveWorkflow(String name,
                     com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
                     boolean replace)
                     throws DataAccessException
Saves or updates a workflowDescriptor. If the descriptor already exists, and the replace flag is true, an update will be done. Otherwise, this method will simply create a new value in the database (if none exists yet).

Parameters:
name - The name of the workflow
workflowDescriptor - The WorkflowDescriptor to save/update in the underlying store
replace - true if an update should be done, if the workflow already exists, false otherwise
Returns:
true if the update was carried out successfully, false otherwise
Throws:
DataAccessException - If there was a problem, storing the workflowdescriptor

getWorkflowNames

String[] getWorkflowNames()
Returns an array of all the workflowNames stored.

Returns:
an array of all the workflowNames stored.

getAllJiraWorkflowDTOs

List<JiraWorkflowDTO> getAllJiraWorkflowDTOs()
Returns a list of all the workflows stored in the underlying store.

Returns:
A list of JiraWorkflowDTOs


Copyright © 2002-2014 Atlassian. All Rights Reserved.