com.atlassian.jira.workflow
Class OfBizDraftWorkflowStore
java.lang.Object
com.atlassian.jira.workflow.OfBizDraftWorkflowStore
- All Implemented Interfaces:
- DraftWorkflowStore
public class OfBizDraftWorkflowStore
- extends Object
- implements DraftWorkflowStore
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DRAFT_WORKFLOW_ENTITY_NAME
public static final String DRAFT_WORKFLOW_ENTITY_NAME
- See Also:
- Constant Field Values
PARENTNAME_ENTITY_FIELD
public static final String PARENTNAME_ENTITY_FIELD
- See Also:
- Constant Field Values
DESCRIPTOR_ENTITY_FIELD
public static final String DESCRIPTOR_ENTITY_FIELD
- See Also:
- Constant Field Values
OfBizDraftWorkflowStore
public OfBizDraftWorkflowStore(OfBizDelegator ofBizDelegator)
getDraftWorkflow
public JiraWorkflow getDraftWorkflow(String parentWorkflowName)
throws DataAccessException
- Description copied from interface:
DraftWorkflowStore
- 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.
- Specified by:
getDraftWorkflow
in interface DraftWorkflowStore
- 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
.
- Throws:
DataAccessException
- DataAccessException
createDraftWorkflow
public JiraWorkflow createDraftWorkflow(String authorName,
JiraWorkflow parentWorkflow)
throws DataAccessException,
IllegalStateException,
IllegalArgumentException
- Description copied from interface:
DraftWorkflowStore
- 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.
- Specified by:
createDraftWorkflow
in interface DraftWorkflowStore
- Parameters:
authorName
- The username of the user making the editparentWorkflow
- 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
.
- Throws:
DataAccessException
- if there are any db errors
IllegalStateException
- thrown if you are adding an draft workflow which already exists for the
provided parent workflow
IllegalArgumentException
- If the username is null
deleteDraftWorkflow
public boolean deleteDraftWorkflow(String parentWorkflowName)
throws DataAccessException
- Description copied from interface:
DraftWorkflowStore
- Removes a temporary workflow linked to the workflow name.
- Specified by:
deleteDraftWorkflow
in interface DraftWorkflowStore
- Parameters:
parentWorkflowName
- of the saved parent workflow.
- Returns:
- True if deleted successfully
- Throws:
DataAccessException
- RuntimeException wrapper around a DB Exception.
updateDraftWorkflow
public JiraWorkflow updateDraftWorkflow(String username,
String parentWorkflowName,
JiraWorkflow workflow)
throws DataAccessException
- Description copied from interface:
DraftWorkflowStore
- 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.
- Specified by:
updateDraftWorkflow
in interface DraftWorkflowStore
- Parameters:
username
- is the username of 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
.
- Throws:
DataAccessException
- RuntimeException wrapper around a DB Exception.
Copyright © 2002-2009 Atlassian. All Rights Reserved.