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 whereConditionMatchOne
is set totrue
.protected
TaskCalendar(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 void
addCalendarCondition(CalendarCondition cale)
Adds a newCalendarCondition
.void
clearCalendarList()
Removes all calendar conditions.TaskCalendar
clone()
Deprecated.Use copy() instead.TaskCalendar
copy()
java.util.List<CalendarCondition>
getCaleList()
boolean
isConditionMatchAll()
Returnstrue
if the task will be executed when the date of JobPlan activation or the logical date matches all specified calendar conditions.boolean
isConditionMatchExt()
Returnstrue
if the calendar definition of external dependency should be used.boolean
isConditionMatchNone()
Returnstrue
if the task will be executed when the date of JobPlan activation or the logical date does not match any of the specified calendar conditions.boolean
isConditionMatchOne()
Returnstrue
if 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
.void
setCalendarConditions(java.util.List<CalendarCondition> calendarConditions)
OverridesCalendarCondition
void
setConditionMatchAll()
The task will be executed when the date of JobPlan activation or the logical date matches all specified calendar conditions.void
setConditionMatchExt()
Use calendar definition of external dependency.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.void
setConditionMatchOne()
The task will be executed when the date of JobPlan activation or the logical date matches one of the specified calendar conditions.int
size()
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:
iterator
in 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()
Returnstrue
if 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()
Returnstrue
if 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()
Returnstrue
if 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()
Returnstrue
if 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:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
copy
public TaskCalendar copy()
-
-