|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.workflow.SimpleWorkflowManager
com.atlassian.jira.workflow.OSWorkflowManager
public class OSWorkflowManager
| Constructor Summary | |
|---|---|
OSWorkflowManager(com.opensymphony.workflow.config.Configuration configuration,
DraftWorkflowStore draftWorkflowStore)
|
|
OSWorkflowManager(DraftWorkflowStore draftWorkflowStore)
|
|
| Method Summary | |
|---|---|
void |
copyAndDeleteDraftWorkflows(User user,
Set workflows)
Provided a set of workflows, this method will check, if the passed in workflows have any draft workflows linked to them. |
JiraWorkflow |
copyWorkflow(String username,
String clonedWorkflowName,
String clonedWorkflowDescription,
JiraWorkflow workflowToClone)
Clones a workflow by creating a deep copy of the workflow provided. |
JiraWorkflow |
createDraftWorkflow(String username,
String parentWorkflowName)
This will create an draft workflow of the named active workflow. |
void |
createWorkflow(String username,
JiraWorkflow workflow)
|
void |
createWorkflow(User creator,
JiraWorkflow workflow)
|
boolean |
deleteDraftWorkflow(String parentWorkflowName)
Deletes all draft workflows (there should every be only one) for a given parent workflow. |
void |
deleteWorkflow(JiraWorkflow workflow)
|
Collection |
getActiveWorkflows()
Retrieve all currently active workflows. |
JiraWorkflow |
getDraftWorkflow(String parentWorkflowName)
Retrieve a single draft workflow by name. |
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 |
getWorkflowClone(String name)
This method returns a JiraWorkflow, that contains a WorkflowDescriptor that
is mutable. |
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 |
protected WorkflowSchemeManager |
getWorkflowSchemeManager()
|
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 |
overwriteActiveWorkflow(String username,
String workflowName)
Saves the draft workflow into the active workflow. |
void |
saveWorkflowWithoutAudit(JiraWorkflow workflow)
This method will save the workflow and it will not affect the updatedDate and updatedAuthorName meta attributes of the workflow. |
protected void |
updateIssueStatusAndUpdatedDate(org.ofbiz.core.entity.GenericValue issue,
org.ofbiz.core.entity.GenericValue newStatus)
|
void |
updateWorkflow(String username,
JiraWorkflow workflow)
Saves the given JiraWorkflow, which may be either a "live" or "draft" version. |
void |
updateWorkflowNameAndDescription(String username,
JiraWorkflow currentWorkflow,
String newName,
String newDescription)
Used to change the name and description of an existing worfklow with the given name. |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OSWorkflowManager(DraftWorkflowStore draftWorkflowStore)
public OSWorkflowManager(com.opensymphony.workflow.config.Configuration configuration,
DraftWorkflowStore draftWorkflowStore)
| Method Detail |
|---|
public Collection getWorkflows()
getWorkflows in interface WorkflowManagergetWorkflows in class SimpleWorkflowManager
protected String getWorkflowName(Long projectId,
String issueType)
throws WorkflowException
projectId - issueType -
WorkflowException
public Collection getActiveWorkflows()
throws WorkflowException
WorkflowManager
getActiveWorkflows in interface WorkflowManagergetActiveWorkflows in class SimpleWorkflowManagerWorkflowException
public boolean isActive(JiraWorkflow workflow)
throws WorkflowException
WorkflowManager
isActive in interface WorkflowManagerisActive in class SimpleWorkflowManagerWorkflowExceptionpublic boolean isSystemWorkflow(JiraWorkflow workflow)
WorkflowManager
isSystemWorkflow in interface WorkflowManagerisSystemWorkflow in class SimpleWorkflowManagerpublic JiraWorkflow getWorkflow(String name)
WorkflowManagerJiraWorkflow contains a
descriptor that by default isn't mutable (see ImmutableWorkflowDescriptor
If you need to edit a workflow, please see WorkflowManager.getWorkflowClone(String).
getWorkflow in interface WorkflowManagergetWorkflow in class SimpleWorkflowManagername - The workflow name
JiraWorkflow that wraps an ImmutableWorkflowDescriptor or nullWorkflowManager.getWorkflowClone(String)public JiraWorkflow getWorkflowClone(String name)
WorkflowManagerWorkflowDescriptor that
is mutable. This method should be called, if you require to edit the workflow.
If you only need to view a workflow, please use WorkflowManager.getWorkflow(String) as it will provide better performance.
Cloning a workflow is expensive, as it requires de-constructing and re-constructing the underlying
WorkflowDescriptor from XML.
getWorkflowClone in interface WorkflowManagergetWorkflowClone in class SimpleWorkflowManagername - The workflow name
JiraWorkflow or null if it doesn't exist.WorkflowManager.getWorkflow(String)
public JiraWorkflow getDraftWorkflow(String parentWorkflowName)
throws IllegalArgumentException
WorkflowManager
getDraftWorkflow in interface WorkflowManagergetDraftWorkflow in class SimpleWorkflowManagerparentWorkflowName - is the name of the Saved workflow which identifies then paritally edited draft workflow to
retrieve.
JiraDraftWorkflow.
IllegalArgumentException - if no parentWorkflow with the name provided can be found.
public JiraWorkflow createDraftWorkflow(String username,
String parentWorkflowName)
WorkflowManagerIllegalStateException in this case.
createDraftWorkflow in interface WorkflowManagercreateDraftWorkflow in class SimpleWorkflowManagerusername - identifies the user performing the action so that we can keep an audit trail of who has last
saved the workflow. Empty string for anonymous user. If null an IllegalArgumentException will be thrownparentWorkflowName - identifies the parent workflow that should be used as the template for creating
the draft workflow.
JiraDraftWorkflow that represents a copy of the
parent that can be edited without overwriting the active workflow immediately.
public boolean deleteDraftWorkflow(String parentWorkflowName)
throws IllegalArgumentException
WorkflowManager
deleteDraftWorkflow in interface WorkflowManagerdeleteDraftWorkflow in class SimpleWorkflowManagerparentWorkflowName - The parentworkflow for which the draft workflow needs to be deleted.
IllegalArgumentException - if the parentWorkflowName is null
public boolean workflowExists(String name)
throws WorkflowException
workflowExists in interface WorkflowManagerworkflowExists in class SimpleWorkflowManagerWorkflowException
public JiraWorkflow getWorkflow(Issue issue)
throws WorkflowException
WorkflowManager
getWorkflow in interface WorkflowManagergetWorkflow in class SimpleWorkflowManagerWorkflowException
public JiraWorkflow getWorkflow(Long projectId,
String issueTypeId)
throws WorkflowException
WorkflowManager
getWorkflow in interface WorkflowManagergetWorkflow in class SimpleWorkflowManagerWorkflowException
public JiraWorkflow getWorkflowFromScheme(org.ofbiz.core.entity.GenericValue scheme,
String issueTypeId)
throws WorkflowException
WorkflowManager
getWorkflowFromScheme in interface WorkflowManagergetWorkflowFromScheme in class SimpleWorkflowManagerWorkflowException
public Collection getWorkflowsFromScheme(org.ofbiz.core.entity.GenericValue scheme)
throws WorkflowException
WorkflowManager
getWorkflowsFromScheme in interface WorkflowManagergetWorkflowsFromScheme in class SimpleWorkflowManagerWorkflowException
public void copyAndDeleteDraftWorkflows(User user,
Set workflows)
WorkflowManager
copyAndDeleteDraftWorkflows in interface WorkflowManagercopyAndDeleteDraftWorkflows in class SimpleWorkflowManageruser - The user performing the operationworkflows - A set of parent JiraWorkflows
public void createWorkflow(String username,
JiraWorkflow workflow)
throws WorkflowException
createWorkflow in interface WorkflowManagercreateWorkflow in class SimpleWorkflowManagerWorkflowException
public void createWorkflow(User creator,
JiraWorkflow workflow)
throws WorkflowException
createWorkflow in interface WorkflowManagercreateWorkflow in class SimpleWorkflowManagerWorkflowException
public void saveWorkflowWithoutAudit(JiraWorkflow workflow)
throws WorkflowException
WorkflowManagerWorkflowManager.updateWorkflow(String, JiraWorkflow)
saveWorkflowWithoutAudit in interface WorkflowManagersaveWorkflowWithoutAudit in class SimpleWorkflowManagerworkflow - the workflow to save.
WorkflowExceptionprotected WorkflowSchemeManager getWorkflowSchemeManager()
public void deleteWorkflow(JiraWorkflow workflow)
throws WorkflowException
deleteWorkflow in interface WorkflowManagerdeleteWorkflow in class SimpleWorkflowManagerWorkflowException
public JiraWorkflow getWorkflow(org.ofbiz.core.entity.GenericValue issue)
throws WorkflowException
WorkflowManager
getWorkflow in interface WorkflowManagergetWorkflow in class SimpleWorkflowManagerWorkflowException
public void migrateIssueToWorkflow(org.ofbiz.core.entity.GenericValue issue,
JiraWorkflow newWorkflow,
org.ofbiz.core.entity.GenericValue newStatus)
throws WorkflowException
migrateIssueToWorkflow in interface WorkflowManagermigrateIssueToWorkflow in class SimpleWorkflowManagerWorkflowException
public void overwriteActiveWorkflow(String username,
String workflowName)
WorkflowManager
overwriteActiveWorkflow in interface WorkflowManageroverwriteActiveWorkflow in class SimpleWorkflowManagerusername - User will be added to the workflows Audit trailworkflowName - The workflow to be overwritten
protected void updateIssueStatusAndUpdatedDate(org.ofbiz.core.entity.GenericValue issue,
org.ofbiz.core.entity.GenericValue newStatus)
public void updateWorkflow(String username,
JiraWorkflow workflow)
WorkflowManagerWorkflowManager.overwriteActiveWorkflow(String, String)
updateWorkflow in interface WorkflowManagerupdateWorkflow in class SimpleWorkflowManagerusername - User making the request.workflow - The JiraWorkflow to save.
public JiraWorkflow copyWorkflow(String username,
String clonedWorkflowName,
String clonedWorkflowDescription,
JiraWorkflow workflowToClone)
WorkflowManager
copyWorkflow in interface WorkflowManagercopyWorkflow in class SimpleWorkflowManagerusername - The user performing the operationclonedWorkflowName - The name to store the new workflow with.clonedWorkflowDescription - The description to store with the cloned workflow. Can be null.workflowToClone - The workflow to copy.
public void updateWorkflowNameAndDescription(String username,
JiraWorkflow currentWorkflow,
String newName,
String newDescription)
WorkflowManager
updateWorkflowNameAndDescription in interface WorkflowManagerupdateWorkflowNameAndDescription in class SimpleWorkflowManagerusername - The user performing the operationcurrentWorkflow - The workflow to update.newName - The new name to save with the workflownewDescription - The new descriptio to save with the workflow
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||