com.atlassian.jira.workflow
Class SimpleWorkflowManager

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

public class SimpleWorkflowManager
extends java.lang.Object
implements WorkflowManager


Constructor Summary
SimpleWorkflowManager()
           
 
Method Summary
 org.ofbiz.core.entity.GenericValue createIssue(java.lang.String remoteUserName, java.util.Map fields)
           
 void createWorkflow(com.opensymphony.user.User creator, JiraWorkflow workflow)
           
 void deleteWorkflow(JiraWorkflow workflow)
           
 void doWorkflowAction(WorkflowProgressAware from)
           
 com.opensymphony.workflow.loader.ActionDescriptor getActionDescriptor(WorkflowProgressAware workflowProgressAware)
           
 java.util.Collection getActiveWorkflows()
          Retrieve all currently active workflows.
protected  com.opensymphony.workflow.config.Configuration getConfiguration()
           
 com.opensymphony.user.User getRemoteUser(java.util.Map transientVars)
           
 com.opensymphony.workflow.spi.WorkflowStore getStore()
          This is used for unit testing so we can return our own 'mock store' instead of the static StoreFactory.getPersistence(ctx); Also used in the migrateIssueToWorkflow method.
 JiraWorkflow getWorkflow(org.ofbiz.core.entity.GenericValue issue)
          Retrieve the workflow for a given issue.
 JiraWorkflow getWorkflow(java.lang.Long projectId, java.lang.String issueTypeId)
          Retrieve the workflow for a given project - issue type pair.
 JiraWorkflow getWorkflow(java.lang.String name)
          Retrieve a single workflow by name
 JiraWorkflow getWorkflowFromScheme(org.ofbiz.core.entity.GenericValue scheme, java.lang.String issueTypeId)
          Return the workflow in a particular scheme for a given issue type.
 java.util.Collection getWorkflows()
          Retrieve all of the workflows in the system
 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.
 com.opensymphony.workflow.Workflow makeWorkflow(java.lang.String userName)
           
 void migrateIssueToWorkflow(org.ofbiz.core.entity.GenericValue issue, JiraWorkflow newWorkflow, org.ofbiz.core.entity.GenericValue status)
           
protected  void resetConfiguration()
           
 void saveWorkflow(JiraWorkflow workflow)
           
 boolean workflowExists(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleWorkflowManager

public SimpleWorkflowManager()
Method Detail

resetConfiguration

protected void resetConfiguration()

getWorkflows

public java.util.Collection getWorkflows()
Description copied from interface: WorkflowManager
Retrieve all of the workflows in the system

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

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
Throws:
WorkflowException

isSystemWorkflow

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

Specified by:
isSystemWorkflow in interface WorkflowManager
Throws:
WorkflowException

getActiveWorkflows

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

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

getWorkflow

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

Specified by:
getWorkflow in interface WorkflowManager

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
Throws:
WorkflowException

getWorkflow

public JiraWorkflow getWorkflow(java.lang.Long projectId,
                                java.lang.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
Throws:
WorkflowException

getWorkflowFromScheme

public JiraWorkflow getWorkflowFromScheme(org.ofbiz.core.entity.GenericValue scheme,
                                          java.lang.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
Throws:
WorkflowException

createIssue

public org.ofbiz.core.entity.GenericValue createIssue(java.lang.String remoteUserName,
                                                      java.util.Map fields)
                                               throws WorkflowException
Specified by:
createIssue in interface WorkflowManager
Throws:
WorkflowException

doWorkflowAction

public void doWorkflowAction(WorkflowProgressAware from)
Specified by:
doWorkflowAction in interface WorkflowManager

getRemoteUser

public com.opensymphony.user.User getRemoteUser(java.util.Map transientVars)
                                         throws com.opensymphony.user.EntityNotFoundException
Specified by:
getRemoteUser in interface WorkflowManager
Throws:
com.opensymphony.user.EntityNotFoundException

getStore

public com.opensymphony.workflow.spi.WorkflowStore getStore()
                                                     throws com.opensymphony.workflow.StoreException
This is used for unit testing so we can return our own 'mock store' instead of the static StoreFactory.getPersistence(ctx); Also used in the migrateIssueToWorkflow method.

Specified by:
getStore in interface WorkflowManager
Throws:
com.opensymphony.workflow.StoreException

createWorkflow

public void createWorkflow(com.opensymphony.user.User creator,
                           JiraWorkflow workflow)
                    throws WorkflowException
Specified by:
createWorkflow in interface WorkflowManager
Throws:
WorkflowException

saveWorkflow

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

deleteWorkflow

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

getActionDescriptor

public com.opensymphony.workflow.loader.ActionDescriptor getActionDescriptor(WorkflowProgressAware workflowProgressAware)
                                                                      throws java.lang.Exception
Specified by:
getActionDescriptor in interface WorkflowManager
Throws:
java.lang.Exception

migrateIssueToWorkflow

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

makeWorkflow

public com.opensymphony.workflow.Workflow makeWorkflow(java.lang.String userName)
Specified by:
makeWorkflow in interface WorkflowManager

workflowExists

public boolean workflowExists(java.lang.String name)
                       throws WorkflowException
Specified by:
workflowExists in interface WorkflowManager
Throws:
WorkflowException

getConfiguration

protected com.opensymphony.workflow.config.Configuration getConfiguration()


Copyright © 2002-2006 Atlassian. All Rights Reserved.