Class UserDefinedCondition

java.lang.Object
com.uc4.api.objects.ConditionOrAction
com.uc4.api.objects.UserDefinedCondition
All Implemented Interfaces:
Condition

public class UserDefinedCondition extends ConditionOrAction implements Condition
Compares two values.
  • Constructor Details

    • UserDefinedCondition

      public UserDefinedCondition()
      Creates a new UserDefinedCondition.
  • Method Details

    • setValue1

      public void setValue1(String value1)
      Sets the first value of this user defined condition.
      Parameters:
      value1 - First value
    • setOperator

      public void setOperator(String operator)
      Sets the operator, one of "<", "<=", "=", ">", ">=", "<>" .
      Parameters:
      operator - Operator
    • setValue2

      public void setValue2(String value2)
      Sets the second value of this user defined condition.
      Parameters:
      value2 - Second value
    • getValue1

      public String getValue1()
      Returns:
      First value
    • getOperator

      public String getOperator()
      Returns:
      Operator
    • getValue2

      public String getValue2()
      Returns:
      Second value
    • isBeforeCondition

      public boolean isBeforeCondition()
      Specified by:
      isBeforeCondition in interface Condition
      Specified by:
      isBeforeCondition in class ConditionOrAction
      Returns:
      true if the action/condition is allowed on the "Pre-Condition" tab
    • isAfterCondition

      public boolean isAfterCondition()
      Specified by:
      isAfterCondition in interface Condition
      Specified by:
      isAfterCondition in class ConditionOrAction
      Returns:
      true if the action/condition is allowed on the "Post-Condition" tab
    • getId

      public String getId()
      Specified by:
      getId in interface Condition
      Specified by:
      getId in class ConditionOrAction
      Returns:
      ID of the condition or action
    • addWhen

      public void addWhen(ConditionOrAction item)
      Description copied from interface: Condition
      Adds a condition or action to the list of conditions/actions which should be executed when this condition is true.
      Specified by:
      addWhen in interface Condition
      Parameters:
      item - Condition or Action
    • addElse

      public void addElse(ConditionOrAction item)
      Description copied from interface: Condition
      Adds a condition or action to the list of conditions/actions which should be executed when this condition is false.
      Specified by:
      addElse in interface Condition
      Parameters:
      item - Condition or Action
    • whenSize

      public int whenSize()
      Description copied from interface: Condition
      Returns the number of action/conditions which should be executed when this condition is true.
      Specified by:
      whenSize in interface Condition
      Returns:
      Number of conditions/actions
    • elseSize

      public int elseSize()
      Description copied from interface: Condition
      Returns the number of action/conditions which should be executed when this condition is false.
      Specified by:
      elseSize in interface Condition
      Returns:
      Number of conditions/actions
    • whenIterator

      public Iterator<ConditionOrAction> whenIterator()
      Description copied from interface: Condition
      The returned iterator can be used to get the actions/conditions which are executed when this condition is true. The remove() method of the java.util.Iterator can be used to remove conditions or actions.
      Specified by:
      whenIterator in interface Condition
      Returns:
      Iterator
    • elseIterator

      public Iterator<ConditionOrAction> elseIterator()
      Description copied from interface: Condition
      The returned iterator can be used to get the actions/conditions which are executed when this condition is false. The remove() method of the java.util.Iterator can be used to remove conditions or actions.
      Specified by:
      elseIterator in interface Condition
      Returns:
      Iterator
    • isAction

      public boolean isAction()
      Specified by:
      isAction in class ConditionOrAction
      Returns:
      true if the sub class is an instance of com.uc4.api.objects.Action or false if the sub class is an instance of com.uc4.api.objects.Condition
    • isIF

      public boolean isIF()
      Specified by:
      isIF in class ConditionOrAction
      Returns:
      true if the action/condition is allowed in the condition of an IF workflow
    • getParameterMessageID

      public int getParameterMessageID()
      Specified by:
      getParameterMessageID in class ConditionOrAction
      Returns:
      Message number of the parameter message
    • getSkeletonMessageID

      public int getSkeletonMessageID()
      Specified by:
      getSkeletonMessageID in class ConditionOrAction
      Returns:
      Message number of this condition or action
    • getDisplayMessageID

      public int getDisplayMessageID()
      Specified by:
      getDisplayMessageID in class ConditionOrAction
      Returns:
      Message number for displaying this condition