com.atlassian.jira.workflow
Interface JiraWorkflow

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

public interface JiraWorkflow
extends java.lang.Comparable<JiraWorkflow>

Domain object representing the premitted 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 java.util.Collection<java.lang.String> ACTION_TYPE_ALL
           
static java.lang.String ACTION_TYPE_COMMON
           
static java.lang.String ACTION_TYPE_GLOBAL
           
static java.lang.String ACTION_TYPE_INITIAL
           
static java.lang.String ACTION_TYPE_ORDINARY
           
static java.lang.String DEFAULT_WORKFLOW_NAME
           
static java.lang.String DRAFT
           
static java.lang.String[] JIRA_META_ATTRIBUTE_ALLOWED_LIST
          Allowed 'jira.*' prefixes for workflow properties.
static java.lang.String JIRA_META_ATTRIBUTE_EDIT_ALLOWED
           
static java.lang.String JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION
           
static java.lang.String JIRA_META_ATTRIBUTE_I18N
           
static java.lang.String JIRA_META_ATTRIBUTE_I18N_SUBMIT
           
static java.lang.String JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION
           
static java.lang.String JIRA_META_ATTRIBUTE_KEY_PREFIX
           
static java.lang.String JIRA_META_ATTRIBUTE_PERMISSION
           
static java.lang.String JIRA_META_UPDATE_AUTHOR_NAME
          Key used to store the last modifications author in the workflow xml
static java.lang.String JIRA_META_UPDATED_DATE
          Key used to store the last modification date in the workflow xml
static java.lang.String LIVE
           
static java.lang.String STEP_STATUS_KEY
           
static java.lang.String WORKFLOW_DESCRIPTION_ATTRIBUTE
           
static java.lang.String WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE
           
 
Method Summary
 java.util.Collection<com.opensymphony.workflow.loader.ActionDescriptor> getActionsForScreen(FieldScreen fieldScreen)
           
 java.util.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.
 java.lang.String getActionType(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
           
 java.util.Collection<com.opensymphony.workflow.loader.ActionDescriptor> getAllActions()
          Get all the actions in this workflow, global, common and from steps.
 java.lang.String getDescription()
           
 com.opensymphony.workflow.loader.WorkflowDescriptor getDescriptor()
           
 org.ofbiz.core.entity.GenericValue getLinkedStatus(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
           
 java.util.List<org.ofbiz.core.entity.GenericValue> getLinkedStatuses()
          Returns all statuses for this workflow
 Status getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
           
 java.util.List<Status> getLinkedStatusObjects()
          Returns all statuses for this workflow
 com.opensymphony.workflow.loader.StepDescriptor getLinkedStep(org.ofbiz.core.entity.GenericValue status)
          Get the StepDescriptor linked to the given status for this workflow.
 java.lang.String getMode()
          Returns either DRAFT or LIVE depending on the workflow implementation.
 java.lang.String getName()
           
 int getNextActionId()
          Get the next available action id
 java.util.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.
 java.util.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.
 java.lang.String getUpdateAuthorName()
          Returns the most recent authors username.
 java.util.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 java.lang.String JIRA_META_ATTRIBUTE_KEY_PREFIX
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_PERMISSION

static final java.lang.String JIRA_META_ATTRIBUTE_PERMISSION
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_EDIT_ALLOWED

static final java.lang.String JIRA_META_ATTRIBUTE_EDIT_ALLOWED
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION

static final java.lang.String JIRA_META_ATTRIBUTE_EXCLUDE_RESOLUTION
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION

static final java.lang.String JIRA_META_ATTRIBUTE_INCLUDE_RESOLUTION
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_I18N

static final java.lang.String JIRA_META_ATTRIBUTE_I18N
See Also:
Constant Field Values

JIRA_META_ATTRIBUTE_I18N_SUBMIT

static final java.lang.String JIRA_META_ATTRIBUTE_I18N_SUBMIT
See Also:
Constant Field Values

JIRA_META_UPDATE_AUTHOR_NAME

static final java.lang.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 java.lang.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 java.lang.String[] JIRA_META_ATTRIBUTE_ALLOWED_LIST
Allowed 'jira.*' prefixes for workflow properties.


STEP_STATUS_KEY

static final java.lang.String STEP_STATUS_KEY
See Also:
Constant Field Values

WORKFLOW_DESCRIPTION_ATTRIBUTE

static final java.lang.String WORKFLOW_DESCRIPTION_ATTRIBUTE
See Also:
Constant Field Values

WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE

static final java.lang.String WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE
See Also:
Constant Field Values

DEFAULT_WORKFLOW_NAME

static final java.lang.String DEFAULT_WORKFLOW_NAME
See Also:
Constant Field Values

ACTION_TYPE_INITIAL

static final java.lang.String ACTION_TYPE_INITIAL
See Also:
Constant Field Values

ACTION_TYPE_GLOBAL

static final java.lang.String ACTION_TYPE_GLOBAL
See Also:
Constant Field Values

ACTION_TYPE_COMMON

static final java.lang.String ACTION_TYPE_COMMON
See Also:
Constant Field Values

ACTION_TYPE_ORDINARY

static final java.lang.String ACTION_TYPE_ORDINARY
See Also:
Constant Field Values

DRAFT

static final java.lang.String DRAFT
See Also:
Constant Field Values

LIVE

static final java.lang.String LIVE
See Also:
Constant Field Values

ACTION_TYPE_ALL

static final java.util.Collection<java.lang.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

java.lang.String getName()

getDescription

java.lang.String getDescription()

getDescriptor

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

getAllActions

java.util.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

java.util.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)
Get the StepDescriptor linked to the given status for this workflow.

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

getLinkedStatuses

java.util.List<org.ofbiz.core.entity.GenericValue> getLinkedStatuses()
Returns all statuses for this workflow

Returns:
a List of GenericValue

getLinkedStatusObjects

java.util.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

java.util.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

java.util.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)

getLinkedStatusObject

Status getLinkedStatusObject(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)

getActionType

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

reset

void reset()

getActionsForScreen

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

getUpdateAuthorName

java.lang.String getUpdateAuthorName()
Returns the most recent authors username.

Returns:
Returns the authors username
Since:
v3.13

getUpdatedDate

java.util.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

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

Returns:
DRAFT or LIVE
Since:
v3.13


Copyright © 2002-2010 Atlassian. All Rights Reserved.