|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.bc.workflow.DefaultWorkflowService
public class DefaultWorkflowService
Default workflow service implementation. Provides some 'nice' error handling and delegates straight through
to the underlying WorkflowManager
| Constructor Summary | |
|---|---|
DefaultWorkflowService(WorkflowManager workflowManager,
JiraAuthenticationContext jiraAuthenticationContext,
PermissionManager permissionManager)
|
|
| Method Summary | |
|---|---|
JiraWorkflow |
copyWorkflow(JiraServiceContext jiraServiceContext,
String clonedWorkflowName,
String clonedWorkflowDescription,
JiraWorkflow workflowToClone)
Clones and persists a new workflow with the name given. |
JiraWorkflow |
createDraftWorkflow(JiraServiceContext jiraServiceContext,
String parentWorkflowName)
Creates a copy of an active workflow for editing. |
boolean |
deleteDraftWorkflow(JiraServiceContext jiraServiceContext,
String parentWorkflowName)
Deletes draft workflows (there should only be one) that are associated with the given parent workflow name. |
JiraWorkflow |
getDraftWorkflow(JiraServiceContext jiraServiceContext,
String parentWorkflowName)
Given a parentWorkflowName, this methods will retrieved the relevant draft workflow linked to that parent. |
JiraWorkflow |
getWorkflow(JiraServiceContext jiraServiceContext,
String name)
Returns the workflow with the given name. |
boolean |
isStepOnDraftWithNoTransitionsOnParentWorkflow(JiraServiceContext jiraServiceContext,
JiraWorkflow workflow,
int stepId)
Given a draft workflow and a step Id, this method returns true, if the step does not have any transitions on the original workflow. |
void |
overwriteActiveWorkflow(JiraServiceContext jiraServiceContext,
String parentWorkflowName)
This method will overwrite the parentWorkflow with a draft Workflow if it exists. |
void |
updateWorkflow(JiraServiceContext jiraServiceContext,
JiraWorkflow workflow)
Updates the workflow descriptor provided in the persistance mechanism implemented. |
void |
updateWorkflowNameAndDescription(JiraServiceContext jiraServiceContext,
JiraWorkflow currentWorkflow,
String newName,
String newDescription)
Used to change the name and description of an existing worfklow with the given name. |
void |
validateAddWorkflowTransitionToDraft(JiraServiceContext jiraServiceContext,
JiraWorkflow newJiraWorkflow,
int stepId)
Validates if a workflow transition can be added to a draft. |
void |
validateCopyWorkflow(JiraServiceContext jiraServiceContext,
String newWorkflowName)
Validates if a workflow can be cloned and saved with the provided name. |
void |
validateOverwriteWorkflow(JiraServiceContext jiraServiceContext,
String workflowName)
Validates that the draft workflow with the given name is allowed to be saved into the corresponding active workflow. |
void |
validateUpdateWorkflowNameAndDescription(JiraServiceContext jiraServiceContext,
JiraWorkflow currentWorkflow,
String newWorkflowName)
Validates that the workflow with currentName can have its name and description changed to newWorkflowName and newDescription. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultWorkflowService(WorkflowManager workflowManager,
JiraAuthenticationContext jiraAuthenticationContext,
PermissionManager permissionManager)
| Method Detail |
|---|
public JiraWorkflow getDraftWorkflow(JiraServiceContext jiraServiceContext,
String parentWorkflowName)
WorkflowService
getDraftWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionparentWorkflowName - The parent workflow name to create an draft copy of.
public JiraWorkflow createDraftWorkflow(JiraServiceContext jiraServiceContext,
String parentWorkflowName)
WorkflowService
createDraftWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionparentWorkflowName - The parent workflow name to create an draft copy of.
public boolean deleteDraftWorkflow(JiraServiceContext jiraServiceContext,
String parentWorkflowName)
WorkflowService
deleteDraftWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionparentWorkflowName - The parent workflow name that the draft workflow to be deleted is associated with
public void overwriteActiveWorkflow(JiraServiceContext jiraServiceContext,
String parentWorkflowName)
WorkflowServiceWorkflowService.validateOverwriteWorkflow(com.atlassian.jira.bc.JiraServiceContext, String) to ensure the active
workflow isn't being overwritten with an invalid draft workflow.
overwriteActiveWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionparentWorkflowName - The parent workflow name that will be overwritten with its draft workflow
public void validateOverwriteWorkflow(JiraServiceContext jiraServiceContext,
String workflowName)
WorkflowService
validateOverwriteWorkflow in interface WorkflowServicejiraServiceContext - JiraServiceContextworkflowName - Name of the workflow to be validated.
public void updateWorkflow(JiraServiceContext jiraServiceContext,
JiraWorkflow workflow)
WorkflowServiceWorkflowService.overwriteActiveWorkflow(com.atlassian.jira.bc.JiraServiceContext, String) }
updateWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionworkflow - contains the descriptor that the workflow will be updated to.
public void validateUpdateWorkflowNameAndDescription(JiraServiceContext jiraServiceContext,
JiraWorkflow currentWorkflow,
String newWorkflowName)
WorkflowService
validateUpdateWorkflowNameAndDescription in interface WorkflowServicejiraServiceContext - service context with user and error collectioncurrentWorkflow - The current workflow to be updated.newWorkflowName - The new name to save with the workflow
public void updateWorkflowNameAndDescription(JiraServiceContext jiraServiceContext,
JiraWorkflow currentWorkflow,
String newName,
String newDescription)
WorkflowService
updateWorkflowNameAndDescription in interface WorkflowServicejiraServiceContext - service context with user and error collectioncurrentWorkflow - The current workflow to be updated.newName - The new name to save with the workflownewDescription - The new descriptio to save with the workflow
public JiraWorkflow getWorkflow(JiraServiceContext jiraServiceContext,
String name)
WorkflowService
getWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionname - the name of the workflow
public void validateCopyWorkflow(JiraServiceContext jiraServiceContext,
String newWorkflowName)
WorkflowService
validateCopyWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionnewWorkflowName - The name of the cloned workflow.
public JiraWorkflow copyWorkflow(JiraServiceContext jiraServiceContext,
String clonedWorkflowName,
String clonedWorkflowDescription,
JiraWorkflow workflowToClone)
WorkflowService
copyWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionclonedWorkflowName - The name to store the cloned workflow with.clonedWorkflowDescription - The description of the new copy. May be null.workflowToClone - The workflow to clone.
public boolean isStepOnDraftWithNoTransitionsOnParentWorkflow(JiraServiceContext jiraServiceContext,
JiraWorkflow workflow,
int stepId)
WorkflowService
isStepOnDraftWithNoTransitionsOnParentWorkflow in interface WorkflowServicejiraServiceContext - service context with user and error collectionworkflow - The draft workflow with the new stepstepId - The stepId of the step to check
public void validateAddWorkflowTransitionToDraft(JiraServiceContext jiraServiceContext,
JiraWorkflow newJiraWorkflow,
int stepId)
WorkflowService
validateAddWorkflowTransitionToDraft in interface WorkflowServicejiraServiceContext - service context with user and error collectionnewJiraWorkflow - The draft workflow to which the transition is being addedstepId - The step to which the transition is being added.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||