public class

WorkflowEditorTransitionConditionUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.web.action.util.workflow.WorkflowEditorTransitionConditionUtil

Summary

Constants
String OPERATOR_AND
String OPERATOR_OR
String SEPARATOR Separator for the 'count' variables that is used to represent a position in a hierarchy.
Public Constructors
WorkflowEditorTransitionConditionUtil()
Public Methods
String addCondition(ActionDescriptor transition, String count, ConditionDescriptor condition)
String addNestedCondition(ActionDescriptor transition, String count, ConditionDescriptor condition)
void changeLogicOperator(ActionDescriptor transition, String count)
void deleteCondition(ActionDescriptor transition, String count)
ConditionsDescriptor getConditionsDescriptor(RestrictionDescriptor restrictionDescriptor, String count)
Same as getParentConditionsDescriptor(com.opensymphony.workflow.loader.RestrictionDescriptor, String) only all the indexes specified by the passed in count are used for lookups.
void getGrandParentConditionsDescriptor(RestrictionDescriptor restriction, String count)
int getLastCount(String count)
ConditionsDescriptor getParentConditionsDescriptor(RestrictionDescriptor restrictionDescriptor, String count)
Returns a ConditionsDescriptor in the given RestrictionDescriptor in the 'place' specified by the count.
String increaseCountLevel(String c)
boolean isEmpty(RestrictionDescriptor restrictionDescriptor)
Checks if restrictionDescriptor has no com.opensymphony.workflow.loader.ConditionDescriptors or ConditionsDescriptors left.
boolean isEmpty(ConditionsDescriptor conditionsDescriptor)
Checks if restrictionDescriptor has no ConditionsDescriptors left.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String OPERATOR_AND

Constant Value: "AND"

public static final String OPERATOR_OR

Constant Value: "OR"

public static final String SEPARATOR

Separator for the 'count' variables that is used to represent a position in a hierarchy.

Constant Value: "."

Public Constructors

public WorkflowEditorTransitionConditionUtil ()

Public Methods

public String addCondition (ActionDescriptor transition, String count, ConditionDescriptor condition)

public String addNestedCondition (ActionDescriptor transition, String count, ConditionDescriptor condition)

public void changeLogicOperator (ActionDescriptor transition, String count)

public void deleteCondition (ActionDescriptor transition, String count)

public ConditionsDescriptor getConditionsDescriptor (RestrictionDescriptor restrictionDescriptor, String count)

Same as getParentConditionsDescriptor(com.opensymphony.workflow.loader.RestrictionDescriptor, String) only all the indexes specified by the passed in count are used for lookups. That is, the last integer in count is NOT ignored.

public void getGrandParentConditionsDescriptor (RestrictionDescriptor restriction, String count)

public int getLastCount (String count)

public ConditionsDescriptor getParentConditionsDescriptor (RestrictionDescriptor restrictionDescriptor, String count)

Returns a ConditionsDescriptor in the given RestrictionDescriptor in the 'place' specified by the count. The count is a SEPARATOR separated integers that represents the place of the ConditionsDescriptor in the hierarchy of nested ConditionsDescriptors.

This method assumes that the last integer in count will be used to find a com.opensymphony.workflow.loader.ConditionDescriptor in the returned ConditionsDescriptor, so is not used while looking through the hierarchy.

For example, if this method is called with count "1.2.4", this method will take the root ConditionsDescriptor of the passed RestrictionDescriptor, look up a nested ConditionsDescriptor at index 0. Them another lookup will be done for another nested ConditionsDescriptor at index 1. This ConditionsDescriptor will be returned, as "4" is ignored.

Throws
IllegalArgumentException if the object at any index specified by the count is not an instance of ConditionsDescriptor

public String increaseCountLevel (String c)

public boolean isEmpty (RestrictionDescriptor restrictionDescriptor)

Checks if restrictionDescriptor has no com.opensymphony.workflow.loader.ConditionDescriptors or ConditionsDescriptors left.

public boolean isEmpty (ConditionsDescriptor conditionsDescriptor)

Checks if restrictionDescriptor has no ConditionsDescriptors left.