public class

OfBizDraftWorkflowStore

extends Object
implements DraftWorkflowStore
java.lang.Object
   ↳ com.atlassian.jira.workflow.OfBizDraftWorkflowStore

Summary

Constants
String DESCRIPTOR_ENTITY_FIELD
String DRAFT_WORKFLOW_ENTITY_NAME
String PARENTNAME_ENTITY_FIELD
Public Constructors
OfBizDraftWorkflowStore(OfBizDelegator ofBizDelegator)
Public Methods
JiraWorkflow createDraftWorkflow(ApplicationUser author, JiraWorkflow parentWorkflow)
Creates a temporary workflow linked back to the named active workflow by id.
boolean deleteDraftWorkflow(String parentWorkflowName)
Removes a temporary workflow linked to the workflow name.
JiraWorkflow getDraftWorkflow(String parentWorkflowName)
This will retrieve an draft workflow that is related to the named saved workflow.
JiraWorkflow updateDraftWorkflow(ApplicationUser user, String parentWorkflowName, JiraWorkflow workflow)
Updates a temporary workflow with the one provided for the parent workflow name passed in.
JiraWorkflow updateDraftWorkflowWithoutAudit(String parentWorkflowName, JiraWorkflow workflow)
Updates a temporary workflow with the one provided for the parent workflow name passed in.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.workflow.DraftWorkflowStore

Constants

public static final String DESCRIPTOR_ENTITY_FIELD

Constant Value: "descriptor"

public static final String DRAFT_WORKFLOW_ENTITY_NAME

Constant Value: "DraftWorkflow"

public static final String PARENTNAME_ENTITY_FIELD

Constant Value: "parentname"

Public Constructors

public OfBizDraftWorkflowStore (OfBizDelegator ofBizDelegator)

Public Methods

public JiraWorkflow createDraftWorkflow (ApplicationUser author, JiraWorkflow parentWorkflow)

Creates a temporary workflow linked back to the named active workflow by id. If a temporary workflow already exists, this method will throw an exception.

Parameters
author The user making the edit
parentWorkflow The parent workflow to copy for the draft workflow.
Returns
  • workflow that represents the draft "copy" of the named active workflow. This will be of type JiraDraftWorkflow.

public boolean deleteDraftWorkflow (String parentWorkflowName)

Removes a temporary workflow linked to the workflow name.

Parameters
parentWorkflowName of the saved parent workflow.
Returns
  • True if deleted successfully

public JiraWorkflow getDraftWorkflow (String parentWorkflowName)

This will retrieve an draft workflow that is related to the named saved workflow. If an draft workflow is not associated with the passed in name this will return null.

Parameters
parentWorkflowName of the saved parent workflow.
Returns
  • workflow that represents the draft "copy" of the named active workflow. This will be of type JiraDraftWorkflow.

public JiraWorkflow updateDraftWorkflow (ApplicationUser user, String parentWorkflowName, JiraWorkflow workflow)

Updates a temporary workflow with the one provided for the parent workflow name passed in. Throws an exception, if no temporary workflow exists for the one being updated.

Parameters
user is the user updating this draft workflow.
parentWorkflowName of the saved parent workflow.
workflow The JiraWorkflow to use for the update.
Returns
  • workflow that represents the draft "copy" of the named active workflow. This will be of type JiraDraftWorkflow.

public JiraWorkflow updateDraftWorkflowWithoutAudit (String parentWorkflowName, JiraWorkflow workflow)

Updates a temporary workflow with the one provided for the parent workflow name passed in. Throws an exception, if no temporary workflow exists for the one being updated. This will not update the draft author or the draft date.

This method should only be used by upgrade tasks. Use updateDraftWorkflow(ApplicationUser, String, JiraWorkflow) instead.

Parameters
parentWorkflowName of the saved parent workflow.
workflow The JiraWorkflow to use for the update.
Returns
  • workflow that represents the draft "copy" of the named active workflow. This will be of type JiraDraftWorkflow.