com.atlassian.jira.workflow
Class AbstractJiraWorkflow

java.lang.Object
  extended bycom.atlassian.jira.workflow.AbstractJiraWorkflow
All Implemented Interfaces:
Comparable, JiraWorkflow
Direct Known Subclasses:
ConfigurableJiraWorkflow, DefaultJiraWorkflow

public abstract class AbstractJiraWorkflow
extends Object
implements JiraWorkflow


Field Summary
(package private)  com.opensymphony.workflow.loader.WorkflowDescriptor descriptor
           
(package private)  WorkflowManager workflowManager
           
 
Fields inherited from interface com.atlassian.jira.workflow.JiraWorkflow
ACTION_TYPE_ALL, ACTION_TYPE_COMMON, ACTION_TYPE_GLOBAL, ACTION_TYPE_INITIAL, ACTION_TYPE_ORDINARY, DEFAULT_WORKFLOW_NAME, JIRA_META_ATTRIBUTE_ALLOWED_LIST, JIRA_META_ATTRIBUTE_EDIT_ALLOWED, JIRA_META_ATTRIBUTE_I18N, JIRA_META_ATTRIBUTE_KEY_PREFIX, STEP_STATUS_KEY, WORKFLOW_DESCRIPTION_ATTRIBUTE, WORKFLOW_VIEW_FIELDLAYOUT_KEY_ATTRIBUTE
 
Constructor Summary
protected AbstractJiraWorkflow(WorkflowManager workflowManager, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor)
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 Collection getActionsForScreen(FieldScreen fieldScreen)
           
 Collection 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 getAllActions()
          Get all the actions in this workflow, global, common and from steps.
 String getDescription()
           
 com.opensymphony.workflow.loader.WorkflowDescriptor getDescriptor()
           
 org.ofbiz.core.entity.GenericValue getLinkedStatus(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
           
 List getLinkedStatuses()
          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.
abstract  String getName()
           
 int getNextActionId()
          Get the next available action id
 Collection getStepsForTransition(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
          Returns a collection of all step descriptors that reference the given common action
 Collection getStepsWithAction(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
           
 int hashCode()
           
 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 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.workflow.JiraWorkflow
store
 

Field Detail

descriptor

com.opensymphony.workflow.loader.WorkflowDescriptor descriptor

workflowManager

final WorkflowManager workflowManager
Constructor Detail

AbstractJiraWorkflow

protected AbstractJiraWorkflow(WorkflowManager workflowManager,
                               com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor)
Method Detail

getName

public abstract String getName()
Specified by:
getName in interface JiraWorkflow

getDescription

public String getDescription()
Specified by:
getDescription in interface JiraWorkflow

getDescriptor

public com.opensymphony.workflow.loader.WorkflowDescriptor getDescriptor()
Specified by:
getDescriptor in interface JiraWorkflow

getAllActions

public Collection getAllActions()
Description copied from interface: JiraWorkflow
Get all the actions in this workflow, global, common and from steps.

Specified by:
getAllActions in interface JiraWorkflow

getNextActionId

public int getNextActionId()
Description copied from interface: JiraWorkflow
Get the next available action id

Specified by:
getNextActionId in interface JiraWorkflow

getActionsWithResult

public Collection getActionsWithResult(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
Description copied from interface: JiraWorkflow
Get all the actions which have a particular step as their unconditional result.

Specified by:
getActionsWithResult in interface JiraWorkflow

getStepsWithAction

public Collection getStepsWithAction(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)

removeStep

public boolean removeStep(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
Description copied from interface: JiraWorkflow
Remove a step from the workflow.

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

Specified by:
removeStep in interface JiraWorkflow

getLinkedStep

public com.opensymphony.workflow.loader.StepDescriptor getLinkedStep(org.ofbiz.core.entity.GenericValue status)
Description copied from interface: JiraWorkflow
Get the StepDescriptor linked to the given status for this workflow.

Specified by:
getLinkedStep in interface JiraWorkflow
Returns:
The StepDescriptor linked, or null if no steps are linked to this status.

getLinkedStatus

public org.ofbiz.core.entity.GenericValue getLinkedStatus(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
Specified by:
getLinkedStatus in interface JiraWorkflow

getLinkedStatuses

public List getLinkedStatuses()
Description copied from interface: JiraWorkflow
Returns all statuses for this workflow

Specified by:
getLinkedStatuses in interface JiraWorkflow
Returns:
a List of GenericValue

getStepsForTransition

public Collection getStepsForTransition(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Description copied from interface: JiraWorkflow
Returns a collection of all step descriptors that reference the given common action

Specified by:
getStepsForTransition in interface JiraWorkflow

isActive

public boolean isActive()
                 throws WorkflowException
Description copied from interface: JiraWorkflow
Determine whether this workflow object is currently active.

Specified by:
isActive in interface JiraWorkflow
Throws:
WorkflowException

isSystemWorkflow

public boolean isSystemWorkflow()
                         throws WorkflowException
Description copied from interface: JiraWorkflow
Determines if the workflow is loaded from XML or the database

Specified by:
isSystemWorkflow in interface JiraWorkflow
Throws:
WorkflowException

isEditable

public boolean isEditable()
                   throws WorkflowException
Description copied from interface: JiraWorkflow
Determines if the workflow can be modifed within JIRA.

Specified by:
isEditable in interface JiraWorkflow
Throws:
WorkflowException

isDefault

public boolean isDefault()
Description copied from interface: JiraWorkflow
Determines if the workflow is the default JIRA workflow

Specified by:
isDefault in interface JiraWorkflow

isInitialAction

public boolean isInitialAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Specified by:
isInitialAction in interface JiraWorkflow

isCommonAction

public boolean isCommonAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Specified by:
isCommonAction in interface JiraWorkflow

isGlobalAction

public boolean isGlobalAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Specified by:
isGlobalAction in interface JiraWorkflow

isOrdinaryAction

public boolean isOrdinaryAction(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Specified by:
isOrdinaryAction in interface JiraWorkflow

getActionType

public String getActionType(com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Specified by:
getActionType in interface JiraWorkflow

reset

public void reset()
Specified by:
reset in interface JiraWorkflow

getActionsForScreen

public Collection getActionsForScreen(FieldScreen fieldScreen)
Specified by:
getActionsForScreen in interface JiraWorkflow

equals

public boolean equals(Object o)

hashCode

public int hashCode()

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable


Copyright © 2002-2006 Atlassian. All Rights Reserved.