Package com.uc4.api.objects
Class ExecuteRecurring
- java.lang.Object
-
- com.uc4.api.objects.ExecuteRecurring
-
-
Constructor Summary
Constructors Constructor Description ExecuteRecurring()
Constructs a newExecuteRecurring
instance with the default setting to execute the task every 30 minutes on each weekday.ExecuteRecurring(UC4ObjectName uc4ObjectNamme)
Constructs a newExecuteRecurring
instance by also providing the uc4 object name of the recurring object with the default setting to execute the task every 30 minutes on each weekday.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecuteRecurring
clone()
UC4Alias
getAlias()
Returns the alias ornull
if it has not been set.TaskCalendar
getCalendarCondition()
Returns the calendar condition which has been set using the methodsetCalendarCondition(TaskCalendar)
.int
getDateRangeRuns()
int
getExecutionInterval()
int
getGapInterval()
UC4ObjectName
getName()
Returns the name ornull
if it has not been set.java.lang.String
getPeriodDescription()
Description of the periodic cycle in which executions are triggered.UC4ObjectName
getQueue()
Returns the Queue Object.DateTime
getRangeEndDate()
Returns the end date of the date range which has been set using the methodsetDateRange
.DateTime
getRangeStartDate()
Returns the start date of of the date range which has been set using the methodsetDateRange
.Time
getTimeframeEnd()
Returns the end time which was set using the methodsetTimeframe
.Time
getTimeframeStart()
Returns the start time which was set using the methodsetTimeframe
.Time
getTimeOfSingleExecution()
Returns the start time that has been set using the methodsetAtTime
.UC4TimezoneName
getTimeZone()
boolean
hasDateRangeRuns()
boolean
hasDateRangeWithEndTime()
boolean
hasDateRangeWithoutEnd()
boolean
hasTimeframeAdjustment()
boolean
isAllowOneOverlap()
boolean
isExecutedAtTime()
boolean
isExecutedInterval()
boolean
isExecutedWithGap()
boolean
isFriday()
boolean
isMonday()
boolean
isSaturday()
boolean
isSunday()
boolean
isThursday()
boolean
isTuesday()
boolean
isWednesday()
boolean
runsOnDefinedCalendar()
Returns true if the task runs based on calendar conditions.boolean
runsOnDefinedWeekdays()
Returns true if the task runs on defined week days.void
setAlias(UC4Alias alias)
Sets the alias of a recurring task.void
setAllowOneOverlap(boolean overlap)
Sets if one overlap should be allowed.void
setAtTime(Time time)
Sets the start time of the task.void
setCalendarCondition(TaskCalendar calendar)
Sets the calendar condition of the recurring tasks.void
setDateRange(DateTime startDate, int runs)
Sets a date range using a start date and a number of runs.void
setDateRange(DateTime startDate, DateTime endDate)
Sets the date range for the interval.void
setExecutionInterval(int every)
Sets the execution interval in minutes.void
setGapToPreviousRun(int gap)
Sets the gap to the previous run of the task in minutes.void
setOnce(Time time)
Sets the time of the once fieldvoid
setPeriodDescription(java.lang.String periodDescription)
Sets the description that describes the execution cycle of this instance.void
setQueue(UC4ObjectName queue)
Sets the Queue that will be used when this Automation Engine object is executed.void
setRangeWithoutEnd(DateTime startDate)
Sets a date range with a start date and an open end date.void
setTimeframe(Time start, Time end, boolean forceAdjustment)
Sets the execution time frame.void
setTimeZone(UC4TimezoneName tz)
Sets the time zone of all dates used in this class.void
setWeekDays(boolean mo, boolean tu, boolean we, boolean th, boolean fr, boolean sa, boolean su)
Sets Weekdays.void
store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element execPeriod)
Only for internal use.
-
-
-
Constructor Detail
-
ExecuteRecurring
public ExecuteRecurring()
Constructs a newExecuteRecurring
instance with the default setting to execute the task every 30 minutes on each weekday.
-
ExecuteRecurring
public ExecuteRecurring(UC4ObjectName uc4ObjectNamme)
Constructs a newExecuteRecurring
instance by also providing the uc4 object name of the recurring object with the default setting to execute the task every 30 minutes on each weekday.- Parameters:
uc4ObjectNamme
- The name of the UC4 object
-
-
Method Detail
-
clone
public ExecuteRecurring clone()
- Overrides:
clone
in classjava.lang.Object
-
getAlias
public UC4Alias getAlias()
Returns the alias ornull
if it has not been set.
-
setAlias
public void setAlias(UC4Alias alias)
Sets the alias of a recurring task.- Parameters:
alias
- UC4 Alias
-
setTimeframe
public void setTimeframe(Time start, Time end, boolean forceAdjustment)
Sets the execution time frame.- Parameters:
start
- Start timeend
- End timeforceAdjustment
- Aligns the start time on the time frame if set to true
-
getTimeframeStart
public Time getTimeframeStart()
Returns the start time which was set using the methodsetTimeframe
.- Returns:
- Start time of the Time frame
-
getQueue
public UC4ObjectName getQueue()
Returns the Queue Object.- Returns:
- Name of the Queue Object
-
setQueue
public void setQueue(UC4ObjectName queue)
Sets the Queue that will be used when this Automation Engine object is executed.- Parameters:
queue
- Name of the Queue Object
-
getTimeframeEnd
public Time getTimeframeEnd()
Returns the end time which was set using the methodsetTimeframe
.- Returns:
- End time of the Time frame
-
hasTimeframeAdjustment
public boolean hasTimeframeAdjustment()
- Returns:
- True if the start time is aligned to the time frame
-
setExecutionInterval
public void setExecutionInterval(int every)
Sets the execution interval in minutes.- Parameters:
every
- Number of minutes of the execution interval
-
isExecutedInterval
public boolean isExecutedInterval()
- Returns:
- Returns true if an execution interval has been set.
-
getExecutionInterval
public int getExecutionInterval()
- Returns:
- Returns the execution interval in minutes.
-
setGapToPreviousRun
public void setGapToPreviousRun(int gap)
Sets the gap to the previous run of the task in minutes.- Parameters:
gap
- Time gap in minutes
-
isExecutedWithGap
public boolean isExecutedWithGap()
- Returns:
- Returns true if the interval has a gap to the previous run.
-
getGapInterval
public int getGapInterval()
- Returns:
- Returns the time gap in minutes to the previous run.
-
setAtTime
public void setAtTime(Time time)
Sets the start time of the task.- Parameters:
time
- Start time
-
setOnce
public void setOnce(Time time)
Sets the time of the once field- Parameters:
time
- Start time of the once execution
-
getTimeOfSingleExecution
public Time getTimeOfSingleExecution()
Returns the start time that has been set using the methodsetAtTime
.- Returns:
- Start time of the execution
-
isExecutedAtTime
public boolean isExecutedAtTime()
- Returns:
- Returns true if the task is executed at a defined time (the method setAtTime has been called before)
-
setAllowOneOverlap
public void setAllowOneOverlap(boolean overlap)
Sets if one overlap should be allowed. If the parameteroverlap
is set tofalse
there will only be one task at one time even if the old run has not finished.- Parameters:
overlap
- True if one overlap is allowed
-
isAllowOneOverlap
public boolean isAllowOneOverlap()
- Returns:
- Returns True if one overlap is allowed
-
setTimeZone
public void setTimeZone(UC4TimezoneName tz)
Sets the time zone of all dates used in this class.- Parameters:
tz
- Time zone
-
getTimeZone
public UC4TimezoneName getTimeZone()
- Returns:
- Returns the time zone name or an empty name if the default is used.
-
setDateRange
public void setDateRange(DateTime startDate, DateTime endDate)
Sets the date range for the interval.- Parameters:
startDate
- Start dateendDate
- End date
-
hasDateRangeWithEndTime
public boolean hasDateRangeWithEndTime()
- Returns:
- True if a date range was specified using a start date and an end date
-
getRangeStartDate
public DateTime getRangeStartDate()
Returns the start date of of the date range which has been set using the methodsetDateRange
.- Returns:
- Start Date
-
getRangeEndDate
public DateTime getRangeEndDate()
Returns the end date of the date range which has been set using the methodsetDateRange
.- Returns:
- End date
-
setRangeWithoutEnd
public void setRangeWithoutEnd(DateTime startDate)
Sets a date range with a start date and an open end date.- Parameters:
startDate
- start date
-
hasDateRangeWithoutEnd
public boolean hasDateRangeWithoutEnd()
- Returns:
- Returns true if the date range was specified only by a start date
-
setDateRange
public void setDateRange(DateTime startDate, int runs)
Sets a date range using a start date and a number of runs.- Parameters:
startDate
- Start dateruns
- Number of run
-
getDateRangeRuns
public int getDateRangeRuns()
- Returns:
- Returns the number of runs of the date range.
-
hasDateRangeRuns
public boolean hasDateRangeRuns()
- Returns:
- Returns true if the date range was specified using a start date and a number of runs.
-
setCalendarCondition
public void setCalendarCondition(TaskCalendar calendar)
Sets the calendar condition of the recurring tasks.- Parameters:
calendar
- Calendar condition
-
getCalendarCondition
public TaskCalendar getCalendarCondition()
Returns the calendar condition which has been set using the methodsetCalendarCondition(TaskCalendar)
.- Returns:
- Calendar condition
-
setWeekDays
public void setWeekDays(boolean mo, boolean tu, boolean we, boolean th, boolean fr, boolean sa, boolean su)
Sets Weekdays.- Parameters:
mo
- Mondaytu
- Tuesdaywe
- Wednesdayth
- Thursdayfr
- Fridaysa
- Saturdaysu
- Sunday
-
runsOnDefinedWeekdays
public boolean runsOnDefinedWeekdays()
Returns true if the task runs on defined week days. This method returnstrue
ifsetWeekDays
has been called before.Note: When this method returns true, calls to
runsOnDefinedCalendar()
will return false.- Returns:
- True if weekdays are used as calendar condition
-
runsOnDefinedCalendar
public boolean runsOnDefinedCalendar()
Returns true if the task runs based on calendar conditions. This method returnstrue
ifsetCalendarCondition(TaskCalendar)
has been called before.Note: When this method returns true, calls to
runsOnDefinedWeekdays()
will return false.- Returns:
- Returns true if the task runs on defined calendar conditions
-
isSunday
public boolean isSunday()
- Returns:
- True if sunday is selected and the task runs on weekdays
-
isMonday
public boolean isMonday()
- Returns:
- True if monday is selected and the task runs on weekdays
-
isTuesday
public boolean isTuesday()
- Returns:
- True if tuesday is selected and the task runs on weekdays
-
isWednesday
public boolean isWednesday()
- Returns:
- True if wednesday is selected and the task runs on weekdays
-
isThursday
public boolean isThursday()
- Returns:
- True if thursday is selected and the task runs on weekdays
-
isFriday
public boolean isFriday()
- Returns:
- True if friday is selected and the task runs on weekdays
-
isSaturday
public boolean isSaturday()
- Returns:
- True if saturday is selected and the task runs on weekdays
-
store
public void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element execPeriod)
Only for internal use.Stores the content of this class under the specified XML element in
doc
.- Parameters:
doc
- XML DocumentexecPeriod
- Element
-
setPeriodDescription
public void setPeriodDescription(java.lang.String periodDescription)
Sets the description that describes the execution cycle of this instance.- Parameters:
periodDescription
- The new description.- Throws:
java.lang.IllegalArgumentException
- whenperiodDescription
is longer than 255 characters.
-
getPeriodDescription
public java.lang.String getPeriodDescription()
Description of the periodic cycle in which executions are triggered. When this object is based on aPeriod
instance, the period description is initialized with title of thePeriod
instance.- Returns:
- Description for this object, or
null
if no description has been specified. - See Also:
Period.createExecuteRecurring()
-
getName
public UC4ObjectName getName()
Returns the name ornull
if it has not been set.- Returns:
- UC4 Name
-
-