Package com.uc4.api.objects
Interface Condition
- All Known Implementing Classes:
CheckActivitiesCondition,CheckConnectionCondition,CheckFileCondition,CheckHistoryCondition,CheckProcessCondition,CurrentQueueCondition,CurrentTimeCondition,ReturnCodeCondition,StatusCondition,TimeSinceActivationCondition,UserDefinedCondition
public interface Condition
Condition of a JobPlan task (PreCondition or PostCondition).
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddElse(ConditionOrAction item) Adds a condition or action to the list of conditions/actions which should be executed when this condition is false.voidaddWhen(ConditionOrAction item) Adds a condition or action to the list of conditions/actions which should be executed when this condition is true.The returned iterator can be used to get the actions/conditions which are executed when this condition is false.intelseSize()Returns the number of action/conditions which should be executed when this condition is false.getId()booleanbooleanThe returned iterator can be used to get the actions/conditions which are executed when this condition is true.intwhenSize()Returns the number of action/conditions which should be executed when this condition is true.
-
Method Details
-
isBeforeCondition
boolean isBeforeCondition()- Returns:
- true if this condition can be used as Pre-Condition
-
isAfterCondition
boolean isAfterCondition()- Returns:
- true if this condition can be used as Post-Condition
-
addWhen
Adds a condition or action to the list of conditions/actions which should be executed when this condition is true.- Parameters:
item- Condition or Action
-
addElse
Adds a condition or action to the list of conditions/actions which should be executed when this condition is false.- Parameters:
item- Condition or Action
-
whenSize
int whenSize()Returns the number of action/conditions which should be executed when this condition is true.- Returns:
- Number of conditions/actions
-
elseSize
int elseSize()Returns the number of action/conditions which should be executed when this condition is false.- Returns:
- Number of conditions/actions
-
whenIterator
Iterator<ConditionOrAction> whenIterator()The returned iterator can be used to get the actions/conditions which are executed when this condition is true. The remove() method of thejava.util.Iteratorcan be used to remove conditions or actions.- Returns:
- Iterator
-
elseIterator
Iterator<ConditionOrAction> elseIterator()The returned iterator can be used to get the actions/conditions which are executed when this condition is false. The remove() method of thejava.util.Iteratorcan be used to remove conditions or actions.- Returns:
- Iterator
-
getId
String getId()- Returns:
- Unique ID of this condition
-