public class OfBizDraftWorkflowStore extends Object implements DraftWorkflowStore
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTOR_ENTITY_FIELD |
static String |
DRAFT_WORKFLOW_ENTITY_NAME |
static String |
PARENTNAME_ENTITY_FIELD |
Constructor and Description |
---|
OfBizDraftWorkflowStore(OfBizDelegator ofBizDelegator) |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final String DRAFT_WORKFLOW_ENTITY_NAME
public static final String PARENTNAME_ENTITY_FIELD
public static final String DESCRIPTOR_ENTITY_FIELD
public OfBizDraftWorkflowStore(OfBizDelegator ofBizDelegator)
public JiraWorkflow getDraftWorkflow(String parentWorkflowName) throws DataAccessException
DraftWorkflowStore
getDraftWorkflow
in interface DraftWorkflowStore
parentWorkflowName
- of the saved parent workflow.JiraDraftWorkflow
.DataAccessException
- DataAccessExceptionpublic JiraWorkflow createDraftWorkflow(ApplicationUser author, JiraWorkflow parentWorkflow) throws DataAccessException, IllegalStateException, IllegalArgumentException
DraftWorkflowStore
createDraftWorkflow
in interface DraftWorkflowStore
author
- The user making the editparentWorkflow
- The parent workflow to copy for the draft workflow.JiraDraftWorkflow
.DataAccessException
- if there are any db errorsIllegalStateException
- thrown if you are adding an draft workflow which already exists for the
provided parent workflowIllegalArgumentException
- If the username is nullpublic boolean deleteDraftWorkflow(String parentWorkflowName) throws DataAccessException
DraftWorkflowStore
deleteDraftWorkflow
in interface DraftWorkflowStore
parentWorkflowName
- of the saved parent workflow.DataAccessException
- RuntimeException wrapper around a DB Exception.public JiraWorkflow updateDraftWorkflowWithoutAudit(String parentWorkflowName, JiraWorkflow workflow) throws DataAccessException
DraftWorkflowStore
This method should only be used by upgrade tasks. Use DraftWorkflowStore.updateDraftWorkflow(ApplicationUser, String, JiraWorkflow)
instead.
updateDraftWorkflowWithoutAudit
in interface DraftWorkflowStore
parentWorkflowName
- of the saved parent workflow.workflow
- The JiraWorkflow
to use for the update.JiraDraftWorkflow
.DataAccessException
- RuntimeException wrapper around a DB Exception.public JiraWorkflow updateDraftWorkflow(ApplicationUser user, String parentWorkflowName, JiraWorkflow workflow) throws DataAccessException
DraftWorkflowStore
updateDraftWorkflow
in interface DraftWorkflowStore
user
- is the user updating this draft workflow.parentWorkflowName
- of the saved parent workflow.workflow
- The JiraWorkflow
to use for the update.JiraDraftWorkflow
.DataAccessException
- RuntimeException wrapper around a DB Exception.Copyright © 2002-2024 Atlassian. All Rights Reserved.