com.atlassian.jira.workflow
Interface JiraWorkflow

All Superinterfaces:
Comparable<JiraWorkflow>
All Known Implementing Classes:
AbstractJiraWorkflow, ConfigurableJiraWorkflow, DefaultJiraWorkflow, JiraDraftWorkflow

@PublicApi
public interface JiraWorkflow
extends Comparable<JiraWorkflow>

Domain object representing the permitted states and transitions of issues.


Field Summary
static int ACTION_ORIGIN_STEP_ID
          May be used as the destination step in common actions, if the action should not result in a step change.
static Collection<String> ACTION_TYPE_ALL
           
static String ACTION_TYPE_COMMON
           
static String ACTION_TYPE_GLOBAL
           
static String ACTION_TYPE_INITIAL
           
static String ACTION_TYPE_ORDINARY
           
static String DEFAULT_WORKFLOW_NAME
           
static String DRAFT
           
static String[] JIRA_META_ATTRIBUTE_ALLOWED_LIST
          Allowed 'jira.*' prefixes for workflow properties.
static String JIRA_META_ATTRIBUTE_EDIT_ALLOWED
           
static String JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION
           
static String JIRA_META_ATTRIBUTE_I18N
           
static String JIRA_META_ATTRIBUTE_I18N_SUBMIT
           
static String JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION
           
static String JIRA_META_ATTRIBUTE_KEY_PREFIX
           
static String JIRA_META_ATTRIBUTE_PERMISSION
           
static String JIRA_META_UPDATE_AUTHOR_NAME
          Key used to store the last modifications author in the workflow xml
static String JIRA_META_UPDATED_DATE
          Key used to store the last modification date in the workflow xml
static String LIVE
           
static String STEP_STATUS_KEY
           
static String WORKFLOW_DESCRIPTION_ATTRIBUTE
           
static String WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE
           
 
Method Summary
 Collection<com.opensymphony.workflow.loader.ActionDescriptor> getActionsForScreen(FieldScreen fieldScreen)
           
 Collection<com.opensymphony.workflow.loader.ActionDescriptor> getActionsWithResult(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
          Get all the actions which have a particular step as their unconditional result.
 String getActionType(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
           
 Collection<com.opensymphony.workflow.loader.ActionDescriptor> getAllActions()
          Get all the actions in this workflow, global, common and from steps.
 String getDescription()
           
 com.opensymphony.workflow.loader.WorkflowDescriptor getDescriptor()
           
 String getDisplayName()
           
 org.ofbiz.core.entity.GenericValue getLinkedStatus(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
          Deprecated. Use getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor) instead. Since v5.0.
 List<org.ofbiz.core.entity.GenericValue> getLinkedStatuses()
          Deprecated. Use getLinkedStatusObjects() instead. Since v5.0.
 Status getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
          Get the Status associated with the given StepDescriptor.
 List<Status> getLinkedStatusObjects()
          Returns all statuses for this workflow
 com.opensymphony.workflow.loader.StepDescriptor getLinkedStep(org.ofbiz.core.entity.GenericValue status)
          Deprecated. Use getLinkedStep(com.atlassian.jira.issue.status.Status) instead. Since v5.0.
 com.opensymphony.workflow.loader.StepDescriptor getLinkedStep(Status status)
          Get the StepDescriptor linked to the given status for this workflow.
 String getMode()
          Returns either DRAFT or LIVE depending on the workflow implementation.
 String getName()
           
 int getNextActionId()
          Get the next available action id
 Collection<com.opensymphony.workflow.loader.FunctionDescriptor> getPostFunctionsForTransition(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
          Returns all post-functions of the transition, including the ones on all conditional results, unconditional results and 'global' (non-result) postfunctions.
 Collection<com.opensymphony.workflow.loader.StepDescriptor> getStepsForTransition(com.opensymphony.workflow.loader.ActionDescriptor action)
          Returns a collection of all step descriptors that reference the given common action.
 String getUpdateAuthorName()
          Returns the most recent authors username.
 Date getUpdatedDate()
          Returns the date of the most recent update to this workflow.
 boolean hasDraftWorkflow()
          Determines if this workflow has a draft edit copy.
 boolean isActive()
          Determine whether this workflow object is currently active.
 boolean isCommonAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
           
 boolean isDefault()
          Determines if the workflow is the default JIRA workflow
 boolean isDraftWorkflow()
          Determines if the workflow is an draft edit of an active workflow.
 boolean isEditable()
          Determines if the workflow can be modifed within JIRA.
 boolean isGlobalAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
           
 boolean isInitialAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
           
 boolean isOrdinaryAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
           
 boolean isSystemWorkflow()
          Determines if the workflow is loaded from XML or the database
 boolean removeStep(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
          Remove a step from the workflow.
 void reset()
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

JIRA_META_ATTRIBUTE_KEY_PREFIX

static final String JIRA_META_ATTRIBUTE_KEY_PREFIX
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_PERMISSION

static final String JIRA_META_ATTRIBUTE_PERMISSION
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_EDIT_ALLOWED

static final String JIRA_META_ATTRIBUTE_EDIT_ALLOWED
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION

static final String JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION

static final String JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_I18N

static final String JIRA_META_ATTRIBUTE_I18N
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_I18N_SUBMIT

static final String JIRA_META_ATTRIBUTE_I18N_SUBMIT
See Also:
Constant Field Values

JIRA_META_UPDATE_AUTHOR_NAME

static final String JIRA_META_UPDATE_AUTHOR_NAME
Key used to store the last modifications author in the workflow xml

See Also:
Constant Field Values

JIRA_META_UPDATED_DATE

static final String JIRA_META_UPDATED_DATE
Key used to store the last modification date in the workflow xml

See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_ALLOWED_LIST

static final String[] JIRA_META_ATTRIBUTE_ALLOWED_LIST
Allowed 'jira.*' prefixes for workflow properties.


STEP_STATUS_KEY

static final String STEP_STATUS_KEY
See Also:
Constant Field Values

WORKFLOW_DESCRIPTION_ATTRIBUTE

static final String WORKFLOW_DESCRIPTION_ATTRIBUTE
See Also:
Constant Field Values

WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE

static final String WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE
See Also:
Constant Field Values

DEFAULT_WORKFLOW_NAME

static final String DEFAULT_WORKFLOW_NAME
See Also:
Constant Field Values

ACTION_TYPE_INITIAL

static final String ACTION_TYPE_INITIAL
See Also:
Constant Field Values

ACTION_TYPE_GLOBAL

static final String ACTION_TYPE_GLOBAL
See Also:
Constant Field Values

ACTION_TYPE_COMMON

static final String ACTION_TYPE_COMMON
See Also:
Constant Field Values

ACTION_TYPE_ORDINARY

static final String ACTION_TYPE_ORDINARY
See Also:
Constant Field Values

DRAFT

static final String DRAFT
See Also:
Constant Field Values

LIVE

static final String LIVE
See Also:
Constant Field Values

ACTION_TYPE_ALL

static final Collection<String> ACTION_TYPE_ALL

ACTION_ORIGIN_STEP_ID

static final int ACTION_ORIGIN_STEP_ID
May be used as the destination step in common actions, if the action should not result in a step change.

See Also:
Constant Field Values
Method Detail

getName

String getName()

getDisplayName

String getDisplayName()

getDescription

String getDescription()

getDescriptor

com.opensymphony.workflow.loader.WorkflowDescriptor getDescriptor()

getAllActions

Collection<com.opensymphony.workflow.loader.ActionDescriptor> getAllActions()
Get all the actions in this workflow, global, common and from steps.

Returns:
A collection of ActionDescriptors.

getActionsWithResult

Collection<com.opensymphony.workflow.loader.ActionDescriptor> getActionsWithResult(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
Get all the actions which have a particular step as their unconditional result.

Returns:
all the actions which have a particular step as their unconditional result.

removeStep

boolean removeStep(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
Remove a step from the workflow.

This method will also remove all actions with this step ID as their unconditional result.

Returns:
true if the remove was successful

getLinkedStep

com.opensymphony.workflow.loader.StepDescriptor getLinkedStep(org.ofbiz.core.entity.GenericValue status)
Deprecated. Use getLinkedStep(com.atlassian.jira.issue.status.Status) instead. Since v5.0.

Get the StepDescriptor linked to the given status for this workflow.

Parameters:
status - the Status
Returns:
The StepDescriptor linked, or null if no steps are linked to this status.

getLinkedStep

com.opensymphony.workflow.loader.StepDescriptor getLinkedStep(Status status)
Get the StepDescriptor linked to the given status for this workflow.

Parameters:
status - the Status
Returns:
The StepDescriptor linked, or null if no steps are linked to this status.

getLinkedStatuses

List<org.ofbiz.core.entity.GenericValue> getLinkedStatuses()
Deprecated. Use getLinkedStatusObjects() instead. Since v5.0.

Returns all statuses for this workflow

Returns:
a List of GenericValue

getLinkedStatusObjects

List<Status> getLinkedStatusObjects()
Returns all statuses for this workflow

Returns:
a List of Status objects

isActive

boolean isActive()
                 throws WorkflowException
Determine whether this workflow object is currently active.

Returns:
true if this workflow object is active.
Throws:
WorkflowException - Runtime Exception indicating a problem in the WorkflowManager.

isSystemWorkflow

boolean isSystemWorkflow()
                         throws WorkflowException
Determines if the workflow is loaded from XML or the database

Returns:
true if this workflow object is the uneditable system workflow.
Throws:
WorkflowException - Runtime Exception indicating a problem in the WorkflowManager.

isEditable

boolean isEditable()
                   throws WorkflowException
Determines if the workflow can be modifed within JIRA.

System workflows are never editable. The "published" version of an active workflow is not editable, but the draft version is. Inactive workflows are editable.

Returns:
true if this workflow is editable.
Throws:
WorkflowException - Runtime Exception indicating a problem in the WorkflowManager.

isDefault

boolean isDefault()
Determines if the workflow is the default JIRA workflow

Returns:
true if this is the workflow is the default JIRA workflow.

isDraftWorkflow

boolean isDraftWorkflow()
Determines if the workflow is an draft edit of an active workflow.

Returns:
true if an draft workflow, false otherwise.
Since:
v3.13

hasDraftWorkflow

boolean hasDraftWorkflow()
Determines if this workflow has a draft edit copy.

Returns:
true if this workflow has a draft edit copy.
Since:
v3.13

getNextActionId

int getNextActionId()
Get the next available action id

Returns:
The next available action id.

getStepsForTransition

Collection<com.opensymphony.workflow.loader.StepDescriptor> getStepsForTransition(com.opensymphony.workflow.loader.ActionDescriptor action)
Returns a collection of all step descriptors that reference the given common action.

Returns:
a collection of all step descriptors that reference the given common action.

getPostFunctionsForTransition

Collection<com.opensymphony.workflow.loader.FunctionDescriptor> getPostFunctionsForTransition(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Returns all post-functions of the transition, including the ones on all conditional results, unconditional results and 'global' (non-result) postfunctions.

Returns:
all post-functions of the transition, including the ones on all conditional results, unconditional results and 'global' (non-result) postfunctions.

isInitialAction

boolean isInitialAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)

isCommonAction

boolean isCommonAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)

isGlobalAction

boolean isGlobalAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)

isOrdinaryAction

boolean isOrdinaryAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)

getLinkedStatus

org.ofbiz.core.entity.GenericValue getLinkedStatus(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
Deprecated. Use getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor) instead. Since v5.0.

Get the Status associated with the given StepDescriptor.

Parameters:
stepDescriptor - the StepDescriptor
Returns:
the Status associated with the given StepDescriptor.

getLinkedStatusObject

Status getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
Get the Status associated with the given StepDescriptor.

Parameters:
stepDescriptor - the StepDescriptor
Returns:
the Status associated with the given StepDescriptor.

getActionType

String getActionType(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)

reset

void reset()

getActionsForScreen

Collection<com.opensymphony.workflow.loader.ActionDescriptor> getActionsForScreen(FieldScreen fieldScreen)

getUpdateAuthorName

String getUpdateAuthorName()
Returns the most recent authors username.

Returns:
Returns the authors username
Since:
v3.13

getUpdatedDate

Date getUpdatedDate()
Returns the date of the most recent update to this workflow.

Returns:
date of the most recent update to this workflow
Since:
v3.13

getMode

String getMode()
Returns either DRAFT or LIVE depending on the workflow implementation.

Returns:
DRAFT or LIVE
Since:
v3.13


Copyright © 2002-2013 Atlassian. All Rights Reserved.