com.atlassian.jira.workflow
Class OSWorkflowManager

java.lang.Object
  extended by com.atlassian.jira.workflow.SimpleWorkflowManager
      extended by com.atlassian.jira.workflow.OSWorkflowManager
All Implemented Interfaces:
WorkflowManager

public class OSWorkflowManager
extends SimpleWorkflowManager


Constructor Summary
OSWorkflowManager()
           
OSWorkflowManager(com.opensymphony.workflow.config.Configuration configuration)
           
 
Method Summary
 void createWorkflow(User creator, JiraWorkflow workflow)
           
 void deleteWorkflow(JiraWorkflow workflow)
           
 Collection getActiveWorkflows()
          Retrieve all currently active workflows.
 JiraWorkflow getWorkflow(org.ofbiz.core.entity.GenericValue issue)
          Retrieve the workflow for a given issue.
 JiraWorkflow getWorkflow(Issue issue)
          Retrieve the workflow for a given issue.
 JiraWorkflow getWorkflow(Long projectId, String issueTypeId)
          Retrieve the workflow for a given project - issue type pair.
 JiraWorkflow getWorkflow(String name)
          Retrieve a single workflow by name
 JiraWorkflow getWorkflowFromScheme(org.ofbiz.core.entity.GenericValue scheme, String issueTypeId)
          Return the workflow in a particular scheme for a given issue type.
protected  String getWorkflowName(Long projectId, String issueType)
          This method returns the (unique) name of the workflow which should be used for the provided projectId and issueType
 Collection getWorkflows()
          Retrieve all of the workflows in the system
 Collection getWorkflowsFromScheme(org.ofbiz.core.entity.GenericValue scheme)
          Returns all workflows for a given scheme
 boolean isActive(JiraWorkflow workflow)
          Determine whether or not a given workflow is active in the system.
 boolean isSystemWorkflow(JiraWorkflow workflow)
          Determine whether or not a given workflow is a system workflow.
 void migrateIssueToWorkflow(org.ofbiz.core.entity.GenericValue issue, JiraWorkflow newWorkflow, org.ofbiz.core.entity.GenericValue newStatus)
           
 void saveWorkflow(JiraWorkflow workflow)
           
protected  void updateIssueStatusAndUpdatedDate(org.ofbiz.core.entity.GenericValue issue, org.ofbiz.core.entity.GenericValue newStatus)
           
 boolean workflowExists(String name)
           
 
Methods inherited from class com.atlassian.jira.workflow.SimpleWorkflowManager
createIssue, doWorkflowAction, getActionDescriptor, getConfiguration, getDefaultWorkflow, getPostFunctionsForWorkflow, getRemoteUser, getStepId, getStore, isEditable, makeWorkflow, migrateIssueToWorkflow, removeWorkflowEntries, resetConfiguration, setConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSWorkflowManager

public OSWorkflowManager()

OSWorkflowManager

public OSWorkflowManager(com.opensymphony.workflow.config.Configuration configuration)
Method Detail

getWorkflows

public Collection getWorkflows()
Retrieve all of the workflows in the system

Specified by:
getWorkflows in interface WorkflowManager
Overrides:
getWorkflows in class SimpleWorkflowManager
Returns:
A collection of JiraWorkflow objects.

getWorkflowName

protected String getWorkflowName(Long projectId,
                                 String issueType)
                          throws WorkflowException
This method returns the (unique) name of the workflow which should be used for the provided projectId and issueType

Parameters:
projectId -
issueType -
Returns:
the name of the workflow that should be used for the issue
Throws:
WorkflowException

getActiveWorkflows

public Collection getActiveWorkflows()
                              throws WorkflowException
Description copied from interface: WorkflowManager
Retrieve all currently active workflows.

Specified by:
getActiveWorkflows in interface WorkflowManager
Overrides:
getActiveWorkflows in class SimpleWorkflowManager
Returns:
Collection of JiraWorkflow objects.
Throws:
WorkflowException

isActive

public boolean isActive(JiraWorkflow workflow)
                 throws WorkflowException
Description copied from interface: WorkflowManager
Determine whether or not a given workflow is active in the system.

Active workflows are those currently assigned to schemes and associated with projects - they cannot be edited but can be used.

Specified by:
isActive in interface WorkflowManager
Overrides:
isActive in class SimpleWorkflowManager
Throws:
WorkflowException

isSystemWorkflow

public boolean isSystemWorkflow(JiraWorkflow workflow)
Description copied from interface: WorkflowManager
Determine whether or not a given workflow is a system workflow.

Specified by:
isSystemWorkflow in interface WorkflowManager
Overrides:
isSystemWorkflow in class SimpleWorkflowManager

getWorkflow

public JiraWorkflow getWorkflow(String name)
Description copied from interface: WorkflowManager
Retrieve a single workflow by name

Specified by:
getWorkflow in interface WorkflowManager
Overrides:
getWorkflow in class SimpleWorkflowManager

workflowExists

public boolean workflowExists(String name)
                       throws WorkflowException
Specified by:
workflowExists in interface WorkflowManager
Overrides:
workflowExists in class SimpleWorkflowManager
Throws:
WorkflowException

getWorkflow

public JiraWorkflow getWorkflow(Issue issue)
                         throws WorkflowException
Description copied from interface: WorkflowManager
Retrieve the workflow for a given issue.

Specified by:
getWorkflow in interface WorkflowManager
Overrides:
getWorkflow in class SimpleWorkflowManager
Throws:
WorkflowException

getWorkflow

public JiraWorkflow getWorkflow(Long projectId,
                                String issueTypeId)
                         throws WorkflowException
Description copied from interface: WorkflowManager
Retrieve the workflow for a given project - issue type pair.

Specified by:
getWorkflow in interface WorkflowManager
Overrides:
getWorkflow in class SimpleWorkflowManager
Throws:
WorkflowException

getWorkflowFromScheme

public JiraWorkflow getWorkflowFromScheme(org.ofbiz.core.entity.GenericValue scheme,
                                          String issueTypeId)
                                   throws WorkflowException
Description copied from interface: WorkflowManager
Return the workflow in a particular scheme for a given issue type.

Specified by:
getWorkflowFromScheme in interface WorkflowManager
Overrides:
getWorkflowFromScheme in class SimpleWorkflowManager
Throws:
WorkflowException

getWorkflowsFromScheme

public Collection getWorkflowsFromScheme(org.ofbiz.core.entity.GenericValue scheme)
                                  throws WorkflowException
Description copied from interface: WorkflowManager
Returns all workflows for a given scheme

Specified by:
getWorkflowsFromScheme in interface WorkflowManager
Overrides:
getWorkflowsFromScheme in class SimpleWorkflowManager
Returns:
Collection of workflow schemes, empty collection if none exists
Throws:
WorkflowException

createWorkflow

public void createWorkflow(User creator,
                           JiraWorkflow workflow)
                    throws WorkflowException
Specified by:
createWorkflow in interface WorkflowManager
Overrides:
createWorkflow in class SimpleWorkflowManager
Throws:
WorkflowException

saveWorkflow

public void saveWorkflow(JiraWorkflow workflow)
                  throws WorkflowException
Specified by:
saveWorkflow in interface WorkflowManager
Overrides:
saveWorkflow in class SimpleWorkflowManager
Throws:
WorkflowException

deleteWorkflow

public void deleteWorkflow(JiraWorkflow workflow)
                    throws WorkflowException
Specified by:
deleteWorkflow in interface WorkflowManager
Overrides:
deleteWorkflow in class SimpleWorkflowManager
Throws:
WorkflowException

getWorkflow

public JiraWorkflow getWorkflow(org.ofbiz.core.entity.GenericValue issue)
                         throws WorkflowException
Description copied from interface: WorkflowManager
Retrieve the workflow for a given issue.

Specified by:
getWorkflow in interface WorkflowManager
Overrides:
getWorkflow in class SimpleWorkflowManager
Throws:
WorkflowException

migrateIssueToWorkflow

public void migrateIssueToWorkflow(org.ofbiz.core.entity.GenericValue issue,
                                   JiraWorkflow newWorkflow,
                                   org.ofbiz.core.entity.GenericValue newStatus)
                            throws WorkflowException
Specified by:
migrateIssueToWorkflow in interface WorkflowManager
Overrides:
migrateIssueToWorkflow in class SimpleWorkflowManager
Throws:
WorkflowException

updateIssueStatusAndUpdatedDate

protected void updateIssueStatusAndUpdatedDate(org.ofbiz.core.entity.GenericValue issue,
                                               org.ofbiz.core.entity.GenericValue newStatus)


Copyright © 2002-2007 Atlassian. All Rights Reserved.