public abstract class

AbstractJiraWorkflow

extends Object
implements JiraWorkflow
java.lang.Object
   ↳ com.atlassian.jira.workflow.AbstractJiraWorkflow
Known Direct Subclasses

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.workflow.JiraWorkflow
Fields
protected final WorkflowManager workflowManager
[Expand]
Inherited Fields
From interface com.atlassian.jira.workflow.JiraWorkflow
Protected Constructors
AbstractJiraWorkflow(WorkflowManager workflowManager, WorkflowDescriptor workflowDescriptor)
Public Methods
int compareTo(JiraWorkflow o)
boolean equals(Object o)
String getActionType(ActionDescriptor actionDescriptor)
Collection<ActionDescriptor> getActionsByName(String name)
Get all actions in this workflow, global, common and from steps, whose name matched name.
Collection<ActionDescriptor> getActionsForScreen(FieldScreen fieldScreen)
Collection<ActionDescriptor> getActionsWithResult(StepDescriptor stepDescriptor)
Get all the actions which have a particular step as their unconditional result.
Collection<ActionDescriptor> getAllActions()
Get all the actions in this workflow, global, common and from steps.
String getDescription()
WorkflowDescriptor getDescriptor()
String getDisplayName()
Status getLinkedStatus(StepDescriptor stepDescriptor)
Get the Status associated with the given StepDescriptor.
String getLinkedStatusId(StepDescriptor stepDescriptor)
Get the id of the Status associated with the given StepDescriptor
Set<String> getLinkedStatusIds()
Returns all status ids for this workflow
Status getLinkedStatusObject(StepDescriptor stepDescriptor)
Get the Status associated with the given StepDescriptor.
List<Status> getLinkedStatusObjects()
Returns all statuses for this workflow
List<GenericValue> getLinkedStatuses()
Returns all statuses for this workflow
StepDescriptor getLinkedStep(Status status)
Get the StepDescriptor linked to the given status for this workflow.
StepDescriptor getLinkedStep(GenericValue status)
Get the StepDescriptor linked to the given status for this workflow.
String getMode()
Returns either DRAFT or LIVE depending on the workflow implementation.
abstract String getName()
int getNextActionId()
Get the next available action id
Collection<FunctionDescriptor> getPostFunctionsForTransition(ActionDescriptor actionDescriptor)
Returns all post-functions of the transition, including the ones on all conditional results, unconditional results and 'global' (non-result) postfunctions.
Collection getStepsForTransition(ActionDescriptor actionDescriptor)
Returns a collection of all step descriptors that reference the given common action.
Collection getStepsWithAction(StepDescriptor stepDescriptor)
ApplicationUser getUpdateAuthor()
Returns the most recent author

Notice: This method will also return proxy user even when is not existing.
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.
int hashCode()
boolean isActive()
Determine whether this workflow object is currently active.
boolean isCommonAction(ActionDescriptor actionDescriptor)
boolean isDefault()
Determines if the workflow is the default JIRA workflow
boolean isEditable()
Determines if the workflow can be modifed within JIRA.
boolean isGlobalAction(ActionDescriptor actionDescriptor)
boolean isInitialAction(ActionDescriptor actionDescriptor)
boolean isOrdinaryAction(ActionDescriptor actionDescriptor)
boolean isSystemWorkflow()
Determines if the workflow is loaded from XML or the database
boolean removeStep(StepDescriptor stepDescriptor)
Remove a step from the workflow.
void reset()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.workflow.JiraWorkflow
From interface java.lang.Comparable

Fields

protected final WorkflowManager workflowManager

Protected Constructors

protected AbstractJiraWorkflow (WorkflowManager workflowManager, WorkflowDescriptor workflowDescriptor)

Public Methods

public int compareTo (JiraWorkflow o)

public boolean equals (Object o)

public String getActionType (ActionDescriptor actionDescriptor)

public Collection<ActionDescriptor> getActionsByName (String name)

Get all actions in this workflow, global, common and from steps, whose name matched name.

Parameters
name of the action to match. This is case-insensitive.
Returns
  • A collection of ActionDescriptor whose name matched the given name.

public Collection<ActionDescriptor> getActionsForScreen (FieldScreen fieldScreen)

public Collection<ActionDescriptor> getActionsWithResult (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.

public Collection<ActionDescriptor> getAllActions ()

Get all the actions in this workflow, global, common and from steps.

Returns
  • A collection of ActionDescriptors.

public String getDescription ()

public WorkflowDescriptor getDescriptor ()

public String getDisplayName ()

public Status getLinkedStatus (StepDescriptor stepDescriptor)

Get the Status associated with the given StepDescriptor.

Parameters
stepDescriptor the StepDescriptor
Returns
  • the Status associated with the given StepDescriptor.

public String getLinkedStatusId (StepDescriptor stepDescriptor)

Get the id of the Status associated with the given StepDescriptor

Parameters
stepDescriptor the StepDescriptor
Returns
  • the id of the status associated with the given StepDescriptor.

public Set<String> getLinkedStatusIds ()

Returns all status ids for this workflow

Returns

public Status getLinkedStatusObject (StepDescriptor stepDescriptor)

Get the Status associated with the given StepDescriptor.

Parameters
stepDescriptor the StepDescriptor
Returns
  • the Status associated with the given StepDescriptor.

public List<Status> getLinkedStatusObjects ()

Returns all statuses for this workflow

Returns

public List<GenericValue> getLinkedStatuses ()

Returns all statuses for this workflow

Returns
  • a List of GenericValue

public 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.

public StepDescriptor getLinkedStep (GenericValue 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.

public String getMode ()

Returns either DRAFT or LIVE depending on the workflow implementation.

Returns

public abstract String getName ()

public int getNextActionId ()

Get the next available action id

Returns
  • The next available action id.

public Collection<FunctionDescriptor> getPostFunctionsForTransition (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.

public Collection getStepsForTransition (ActionDescriptor actionDescriptor)

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.

public Collection getStepsWithAction (StepDescriptor stepDescriptor)

public ApplicationUser getUpdateAuthor ()

Returns the most recent author

Notice: This method will also return proxy user even when is not existing. Please use isUserExisting(com.atlassian.jira.user.ApplicationUser) if you want to check user's existence.

Returns
  • The update author.

public String getUpdateAuthorName ()

Returns the most recent authors username.

Returns
  • Returns the authors username

public Date getUpdatedDate ()

Returns the date of the most recent update to this workflow.

Returns
  • date of the most recent update to this workflow

public boolean hasDraftWorkflow ()

Determines if this workflow has a draft edit copy.

Returns
  • true if this workflow has a draft edit copy.

public int hashCode ()

public boolean isActive ()

Determine whether this workflow object is currently active.

Returns
  • true if this workflow object is active.

public boolean isCommonAction (ActionDescriptor actionDescriptor)

public boolean isDefault ()

Determines if the workflow is the default JIRA workflow

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

public boolean isEditable ()

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.

public boolean isGlobalAction (ActionDescriptor actionDescriptor)

public boolean isInitialAction (ActionDescriptor actionDescriptor)

public boolean isOrdinaryAction (ActionDescriptor actionDescriptor)

public boolean isSystemWorkflow ()

Determines if the workflow is loaded from XML or the database

Returns
  • true if this workflow object is the uneditable system workflow.

public boolean removeStep (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

public void reset ()