Package com.uc4.api.objects
Class TaskCalendar
- java.lang.Object
-
- com.uc4.api.objects.TaskCalendar
-
- All Implemented Interfaces:
java.lang.Iterable<CalendarCondition>
public class TaskCalendar extends java.lang.Object implements java.lang.Iterable<CalendarCondition>
Task calendar conditions.
-
-
Constructor Summary
Constructors Modifier Constructor Description TaskCalendar()Constructs an empty TaskCalendar whereConditionMatchOneis set totrue.protectedTaskCalendar(com.uc4.util.XMLDocument doc, org.w3c.dom.Element task)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddCalendarCondition(CalendarCondition cale)Adds a newCalendarCondition.voidclearCalendarList()Removes all calendar conditions.TaskCalendarclone()Deprecated.Use copy() instead.TaskCalendarcopy()java.util.List<CalendarCondition>getCaleList()booleanisConditionMatchAll()Returnstrueif the task will be executed when the date of JobPlan activation or the logical date matches all specified calendar conditions.booleanisConditionMatchExt()Returnstrueif the calendar definition of external dependency should be used.booleanisConditionMatchNone()Returnstrueif the task will be executed when the date of JobPlan activation or the logical date does not match any of the specified calendar conditions.booleanisConditionMatchOne()Returnstrueif the task will be executed when the date of JobPlan activation or the logical date matches one of the specified calendar conditions.java.util.Iterator<CalendarCondition>iterator()Returns an iterator overCalendarCondition.voidsetCalendarConditions(java.util.List<CalendarCondition> calendarConditions)OverridesCalendarConditionvoidsetConditionMatchAll()The task will be executed when the date of JobPlan activation or the logical date matches all specified calendar conditions.voidsetConditionMatchExt()Use calendar definition of external dependency.voidsetConditionMatchNone()The task will be executed when the date of JobPlan activation or the logical date does not match any of the specified calendar conditions.voidsetConditionMatchOne()The task will be executed when the date of JobPlan activation or the logical date matches one of the specified calendar conditions.intsize()Returns the number of calendar conditions.
-
-
-
Method Detail
-
addCalendarCondition
public void addCalendarCondition(CalendarCondition cale)
Adds a newCalendarCondition.- Parameters:
cale- CalendarCondition which should be added
-
setCalendarConditions
public void setCalendarConditions(java.util.List<CalendarCondition> calendarConditions)
OverridesCalendarCondition- Parameters:
calendarConditions- CalendarCondition which are overriding existing ones
-
getCaleList
public java.util.List<CalendarCondition> getCaleList()
-
iterator
public java.util.Iterator<CalendarCondition> iterator()
Returns an iterator overCalendarCondition.- Specified by:
iteratorin interfacejava.lang.Iterable<CalendarCondition>- Returns:
- Iterator which can be used to get the
CalendarCondition
-
clearCalendarList
public void clearCalendarList()
Removes all calendar conditions.
-
setConditionMatchOne
public void setConditionMatchOne()
The task will be executed when the date of JobPlan activation or the logical date matches one of the specified calendar conditions.
-
isConditionMatchOne
public boolean isConditionMatchOne()
Returnstrueif the task will be executed when the date of JobPlan activation or the logical date matches one of the specified calendar conditions.- Returns:
- True if one condition matches
-
setConditionMatchNone
public void setConditionMatchNone()
The task will be executed when the date of JobPlan activation or the logical date does not match any of the specified calendar conditions.
-
isConditionMatchNone
public boolean isConditionMatchNone()
Returnstrueif the task will be executed when the date of JobPlan activation or the logical date does not match any of the specified calendar conditions.- Returns:
- Execute if no condition matches
-
setConditionMatchAll
public void setConditionMatchAll()
The task will be executed when the date of JobPlan activation or the logical date matches all specified calendar conditions.
-
isConditionMatchAll
public boolean isConditionMatchAll()
Returnstrueif the task will be executed when the date of JobPlan activation or the logical date matches all specified calendar conditions.- Returns:
- Execute if all conditions match
-
setConditionMatchExt
public void setConditionMatchExt()
Use calendar definition of external dependency. This option is only available for external dependencies.
-
isConditionMatchExt
public boolean isConditionMatchExt()
Returnstrueif the calendar definition of external dependency should be used. This option is only available for external dependencies.- Returns:
- True if the calendar definition of external dependency should be used
-
size
public int size()
Returns the number of calendar conditions.- Returns:
- number of calendar conditions
-
clone
@Deprecated(since="23.0") public TaskCalendar clone() throws java.lang.CloneNotSupportedException
Deprecated.Use copy() instead.- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
copy
public TaskCalendar copy()
-
-