com.atlassian.jira.bc.workflow.WorkflowService |
![]() |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
This class is responsible for validation before passing the actual call to the underlying
WorkflowManager
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clones and persists a new workflow with the name given.
| |||||||||||
Creates a copy of an active workflow for editing.
| |||||||||||
Deletes draft workflows (there should only be one) that are associated with the given parent workflow name.
| |||||||||||
Deletes the workflow which has the passed name.
| |||||||||||
Given a parentWorkflowName, this methods will retrieved the relevant draft workflow linked to that
parent.
| |||||||||||
Returns the workflow with the given name.
| |||||||||||
Given a draft workflow and a step Id, this method returns true, if the step does not have any transitions on
the original workflow.
| |||||||||||
This method will overwrite the parentWorkflow with a draft Workflow if
it exists.
| |||||||||||
Updates the workflow descriptor provided in the persistance mechanism implemented.
| |||||||||||
Used to change the name and description of an existing worfklow with the given name.
| |||||||||||
Validates if a workflow transition can be added to a draft.
| |||||||||||
Validates if a workflow can be cloned and saved with the provided name.
| |||||||||||
Validates that the draft workflow with the given name is allowed to be saved into the corresponding active
workflow.
| |||||||||||
Validates that the workflow with currentName can have its name and description changed to newWorkflowName and
newDescription.
|
Clones and persists a new workflow with the name given. This will create a complete deep copy of the worfklow provided.
jiraServiceContext | service context with user and error collection |
---|---|
clonedWorkflowName | The name to store the cloned workflow with. |
clonedWorkflowDescription | The description of the new copy. May be null. |
workflowToClone | The workflow to clone. |
Creates a copy of an active workflow for editing. This will not overwrite the current active workflow
jiraServiceContext | service context with user and error collection |
---|---|
parentWorkflowName | The parent workflow name to create an draft copy of. |
Deletes draft workflows (there should only be one) that are associated with the given parent workflow name.
jiraServiceContext | service context with user and error collection |
---|---|
parentWorkflowName | The parent workflow name that the draft workflow to be deleted is associated with |
Deletes the workflow which has the passed name.
deletingUser | user who performs the deletion |
---|---|
workflowName | name of the workflow to be deleted |
Given a parentWorkflowName, this methods will retrieved the relevant draft workflow linked to that
parent.
If the parentWorkflow doesn't exist, this method returns null and will log an error in the servicecontext
errorcollection. If no DraftWorkflow exists, then this method will simply return null.
jiraServiceContext | service context with user and error collection |
---|---|
parentWorkflowName | The parent workflow name to create an draft copy of. |
Returns the workflow with the given name.
jiraServiceContext | service context with user and error collection |
---|---|
name | the name of the workflow |
Given a draft workflow and a step Id, this method returns true, if the step does not have any transitions on the original workflow.
jiraServiceContext | service context with user and error collection |
---|---|
workflow | The draft workflow with the new step |
stepId | The stepId of the step to check |
This method will overwrite the parentWorkflow with a draft Workflow if
it exists. If it doesn't exist, this method will add an error to the errorcollection in the service context.
The method will also check for the existance of the parent, and call
validateOverwriteWorkflow(com.atlassian.jira.bc.JiraServiceContext, String)
to ensure the active
workflow isn't being overwritten with an invalid draft workflow.
jiraServiceContext | service context with user and error collection |
---|---|
parentWorkflowName | The parent workflow name that will be overwritten with its draft workflow |
Updates the workflow descriptor provided in the persistance mechanism implemented. This method can
be used for draft workflows, as well as for copies of active workflows.
This method does not save the changes to the active workflow. Instead,
this is meant to be used to make persistent changes to your working edit. Once all changes
have been made you can over write the active workflow by calling
overwriteActiveWorkflow(com.atlassian.jira.bc.JiraServiceContext, String)
}
jiraServiceContext | service context with user and error collection |
---|---|
workflow | contains the descriptor that the workflow will be updated to. |
IllegalArgumentException | if theworkflow or its descriptor is null. Also thrown if there is no draft workflow associated with the provided parentWorkflowName. |
---|
Used to change the name and description of an existing worfklow with the given name.
jiraServiceContext | service context with user and error collection |
---|---|
currentWorkflow | The current workflow to be updated. |
newName | The new name to save with the workflow |
newDescription | The new descriptio to save with the workflow |
Validates if a workflow transition can be added to a draft. If the original workflow for the draft does not have any outgoing transitions, then this method will add an error to the error collection.
jiraServiceContext | service context with user and error collection |
---|---|
newJiraworkflow | The draft workflow to which the transition is being added |
stepId | The step to which the transition is being added. |
Validates if a workflow can be cloned and saved with the provided name. This means checking if the name is set, if it contains invalid characters, and if the workflow already exists.
jiraServiceContext | service context with user and error collection |
---|---|
newWorkflowName | The name of the cloned workflow. |
Validates that the draft workflow with the given name is allowed to be saved into the corresponding active workflow. Basically you are allowed to add new Steps and change the transitions, but you are not allowed to remove any steps/statuses, or change an existing association between a step ID and an Issue status.
jiraServiceContext | JiraServiceContext |
---|---|
workflowName | Name of the workflow to be validated. |
Validates that the workflow with currentName can have its name and description changed to newWorkflowName and newDescription.
jiraServiceContext | service context with user and error collection |
---|---|
currentWorkflow | The current workflow to be updated. |
newWorkflowName | The new name to save with the workflow |