Package com.uc4.api.objects
Class Period
java.lang.Object
com.uc4.api.objects.UC4Object
com.uc4.api.objects.Period
An object that holds settings that may be used for periodic execution of tasks.
It allows to define the time periods once and reuse this information to start
multiple periodic executions.
Usage Example:
Period period = (Period) open("NAME.OF.PERIOD.OBJECT");
//Create a ExecuteRecurring instance with the settings from the Period object.
ExecuteRecurring er = period.createExecuteRecurring();
executeObject.executeRecurring(er);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a newExecuteRecurringinstance with the settings copied from this Period object.Deprecated.Use getExecuteRecurring() insteadintDeprecated.Use getExecuteRecurring() insteadThis method will return theExecuteRecurringdetails.intDeprecated.Use getExecuteRecurring() insteadintDeprecated.Use getExecuteRecurring() insteadDeprecated.Use getExecuteRecurring() insteadDeprecated.Use getExecuteRecurring() insteadDeprecated.Use getExecuteRecurring() insteadDeprecated.Use getExecuteRecurring() insteadDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadheader()Returns the header data of this object.booleanDeprecated.Use getExecuteRecurring() insteadbooleanReturnstrueif this Object can be executed.booleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanisFriday()Deprecated.Use getExecuteRecurring() insteadbooleanisMonday()Deprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanisSunday()Deprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadbooleanDeprecated.Use getExecuteRecurring() insteadvoidsetAllowOneOverlap(boolean overlap) Deprecated.Use setExecuteRecurring() insteadvoidDeprecated.Use setExecuteRecurring() insteadvoidsetCalendarCondition(TaskCalendar calendar) Deprecated.Use setExecuteRecurring() insteadvoidsetDateRange(DateTime startDate, int runs) Deprecated.Use setExecuteRecurring() insteadvoidsetDateRange(DateTime startDate, DateTime endDate) Deprecated.Use setExecuteRecurring() insteadvoidsetExecuteRecurring(ExecuteRecurring executeRecurring) This method is used to set theExecuteRecurringdetails.voidsetExecutionInterval(int every) Deprecated.Use setExecuteRecurring() insteadvoidsetGapToPreviousRun(int gap) Deprecated.Use setExecuteRecurring() insteadvoidsetRangeWithoutEnd(DateTime startDate) Deprecated.Use setExecuteRecurring() insteadvoidsetTimeframe(Time start, Time end, boolean forceAdjustment) Deprecated.Use setExecuteRecurring() insteadvoidsetWeekDays(boolean mo, boolean tu, boolean we, boolean th, boolean fr, boolean sa, boolean su) Deprecated.Use setExecuteRecurring() insteadMethods inherited from class com.uc4.api.objects.UC4Object
docu, getAccess, getIdnr, getModCount, getName, getObjectClient, getType, isOldVersion, load, store, validate
-
Constructor Details
-
Period
public Period()
-
-
Method Details
-
header
Returns the header data of this object. This is the information of the header tab in the dialog client.- Returns:
- Header
-
isExecutable
public boolean isExecutable()Description copied from class:UC4ObjectReturnstrueif this Object can be executed.- Specified by:
isExecutablein classUC4Object- Returns:
- true if the Object can be executed, false if not.
-
setTimeframe
Deprecated.Use setExecuteRecurring() insteadSets the execution time frame.- Parameters:
start- Start timeend- End timeforceAdjustment- Aligns the start time on the time frame if set to true
-
getTimeframeStart
Deprecated.Use getExecuteRecurring() insteadReturns the start time which was set using the methodsetTimeframe.- Returns:
- Start time of the Time frame
-
getTimeframeEnd
Deprecated.Use getExecuteRecurring() insteadReturns the end time which was set using the methodsetTimeframe.- Returns:
- End time of the Time frame
-
hasTimeframeAdjustment
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if the start time is aligned to the time frame
-
setExecutionInterval
Deprecated.Use setExecuteRecurring() insteadSets the execution interval in minutes.- Parameters:
every- Number of minutes of the execution interval
-
isExecutedInterval
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns true if an execution interval has been set.
-
getExecutionInterval
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns the execution interval in minutes.
-
setGapToPreviousRun
Deprecated.Use setExecuteRecurring() insteadSets the gap to the previous run of the task in minutes.- Parameters:
gap- Time gap in minutes
-
isExecutedWithGap
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns true if the interval has a gap to the previous run.
-
getGapInterval
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns the time gap in minutes to the previous run.
-
setAtTime
Deprecated.Use setExecuteRecurring() insteadSets the start time of the task.- Parameters:
time- Start time
-
getTimeOfSingleExecution
Deprecated.Use getExecuteRecurring() insteadReturns the start time that has been set using the methodsetAtTime.- Returns:
- Start time of the execution
-
isExecutedAtTime
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns true if the task is executed at a defined time (the method setAtTime has been called before)
-
setAllowOneOverlap
Deprecated.Use setExecuteRecurring() insteadSets if one overlap should be allowed. If the parameteroverlapis set tofalsethere 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
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns True if one overlap is allowed
-
setDateRange
Deprecated.Use setExecuteRecurring() insteadSets the date range for the interval.- Parameters:
startDate- Start dateendDate- End date
-
hasDateRangeWithEndTime
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if a date range was specified using a start date and an end date
-
getRangeStartDate
Deprecated.Use getExecuteRecurring() insteadReturns the start date of of the date range which has been set using the methodsetDateRange.- Returns:
- Start Date
-
getRangeEndDate
Deprecated.Use getExecuteRecurring() insteadReturns the end date of the date range which has been set using the methodsetDateRange.- Returns:
- End date
-
setRangeWithoutEnd
Deprecated.Use setExecuteRecurring() insteadSets a date range with a start date and an open end date.- Parameters:
startDate- start date
-
hasDateRangeWithoutEnd
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns true if the date range was specified only by a start date
-
setDateRange
Deprecated.Use setExecuteRecurring() insteadSets a date range using a start date and a number of runs.- Parameters:
startDate- Start dateruns- Number of run
-
getDateRangeRuns
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns the number of runs of the date range.
-
hasDateRangeRuns
Deprecated.Use getExecuteRecurring() instead- Returns:
- Returns true if the date range was specified using a start date and a number of runs.
-
setCalendarCondition
Deprecated.Use setExecuteRecurring() insteadSets the calendar condition of the recurring tasks.- Parameters:
calendar- Calendar condition
-
getCalendarCondition
Deprecated.Use getExecuteRecurring() insteadReturns the calendar condition which has been set using the methodsetCalendarCondition.- Returns:
- Calendar condition
-
setWeekDays
@Deprecated public void setWeekDays(boolean mo, boolean tu, boolean we, boolean th, boolean fr, boolean sa, boolean su) Deprecated.Use setExecuteRecurring() insteadSets Weekdays.- Parameters:
mo- Mondaytu- Tuesdaywe- Wednesdayth- Thursdayfr- Fridaysa- Saturdaysu- Sunday
-
runsOnDefinedWeekdays
Deprecated.Use getExecuteRecurring() insteadReturns true if the task runs on defined week days. This method returnstrueifsetWeekDayshas 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
Deprecated.Use getExecuteRecurring() insteadReturns true if the task runs based on calendar conditions. This method returnstrueifsetCalendarCondition(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
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if Sunday is selected and the task runs on weekdays
-
isMonday
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if Monday is selected and the task runs on weekdays
-
isTuesday
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if Tuesday is selected and the task runs on weekdays
-
isWednesday
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if Wednesday is selected and the task runs on weekdays
-
isThursday
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if Thursday is selected and the task runs on weekdays
-
isFriday
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if Friday is selected and the task runs on weekdays
-
isSaturday
Deprecated.Use getExecuteRecurring() instead- Returns:
- True if Saturday is selected and the task runs on weekdays
-
createExecuteRecurring
Creates a newExecuteRecurringinstance with the settings copied from this Period object.The content of
header().getTitle() is transfered to the description field of the returnedExecuteRecurringobject.- Returns:
- A new ExecuteRecurring instance.
- Throws:
IllegalArgumentException- Whenheader().getTitle() is longer than 255 characters.- See Also:
-
setExecuteRecurring
This method is used to set theExecuteRecurringdetails.- Parameters:
executeRecurring- ExecuteRecurring instance
-
getExecuteRecurring
This method will return theExecuteRecurringdetails.- Returns:
- the execute recurring
-