Interface TimeWindowElement
-
- All Superinterfaces:
Detail
,Readable
,SchedulerEntity
,SchedulerEntityComp
public interface TimeWindowElement extends Detail, Readable
Represents a period in time [start-moment, end-moment). Each interval is defined as an intersection of constraints on timestamp, month, day of month, weekday of month (such as third Friday of a month), weekday (such as every Friday) and time of day. Each of these constraints is represented with two restrictions:fromRestriction
andtoRestriction
. Setting one of them tonull
lifts the corresponding restriction up: SettingfromRestriction
to null implies that the interval opens as early as possible; settingtoRestriction
to null implies that the interval opens as late as possible. Setting both tonull
eliminates the whole constraint. The default value for these constraints isnull
and as a result an emptyTimeWindowElement
is always open. The open periods of the "enabled during" time window are intersected with the constraints to define the open times. The open periods of the "disabled during" time window are subtracted from the open periods.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "TimeWindowElement" objects.static String
SEC_RANK_ALL
This rank is made of the following privileges:static String
SEC_RANK_NONE
This rank has no privileges assigned to it.static QueryObjectType<TimeWindowElement>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.Readable
COPYRIGHT_MESSAGE_E, ID_E
-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Period>
allStatusChanges(DateTimeZone startTime, DateTimeZone endTime, TimeZone defaultTimeZone)
All changes of the open-close status of this time window interval.String
describe()
Human-readable description of the intervalDateTimeZone
getDateFrom()
Get the value for DateFrom.DateTimeZone
getDateTo()
Get the value for DateTo.Long
getDayFrom()
Get the value for DayFrom.Long
getDayShift()
Get the value for DayShift.Long
getDayTo()
Get the value for DayTo.String
getDescription()
Get the value for Description.TimeWindow
getDisabledDuringTimeWindow()
Get the DisabledDuringTimeWindow.TimeWindow
getEnabledDuringTimeWindow()
Get the EnabledDuringTimeWindow.Long
getMonthFrom()
Get the value for MonthFrom.Long
getMonthTo()
Get the value for MonthTo.Long
getOffsetTimeOfDay()
Get the value for OffsetTimeOfDay.String
getParameters()
Get the value for Parameters.PeriodFunction
getPeriodFunction()
Get the PeriodFunction.Long
getTimeOfDayFrom()
Get the value for TimeOfDayFrom.Long
getTimeOfDayTo()
Get the value for TimeOfDayTo.TimeWindow
getTimeWindow()
Get the TimeWindow.TimeZone
getTimeZone()
Get the TimeZone.Long
getWeekdayFrom()
Get the value for WeekdayFrom.Long
getWeekdayTo()
Get the value for WeekdayTo.Long
getWeekFrom()
Get the value for WeekFrom.Long
getWeekTo()
Get the value for WeekTo.boolean
isOpen(DateTimeZone atTime, TimeZone defaultTimeZone)
Returns status of this interval atatTime
void
setDateFrom(DateTimeZone newDateFrom)
Set the value for DateFrom.void
setDateTo(DateTimeZone newDateTo)
Set the value for DateTo.void
setDayFrom(Long newDayFrom)
Set the value for DayFrom.void
setDayShift(Long newDayShift)
Set the value for DayShift.void
setDayTo(Long newDayTo)
Set the value for DayTo.void
setDescription(String newDescription)
Set the value for Description.void
setDisabledDuringTimeWindow(TimeWindow newDisabledDuringTimeWindow)
Set the value for DisabledDuringTimeWindow.void
setEnabledDuringTimeWindow(TimeWindow newEnabledDuringTimeWindow)
Set the value for EnabledDuringTimeWindow.void
setMonthFrom(Long newMonthFrom)
Set the value for MonthFrom.void
setMonthTo(Long newMonthTo)
Set the value for MonthTo.void
setOffsetTimeOfDay(Long newOffsetTimeOfDay)
Set the value for OffsetTimeOfDay.void
setParameters(String newParameters)
Set the value for Parameters.void
setPeriodFunction(PeriodFunction newPeriodFunction)
Set the value for PeriodFunction.void
setTimeOfDayFrom(Long newTimeOfDayFrom)
Set the value for TimeOfDayFrom.void
setTimeOfDayTo(Long newTimeOfDayTo)
Set the value for TimeOfDayTo.void
setTimeZone(TimeZone newTimeZone)
Set the value for TimeZone.void
setWeekdayFrom(Long newWeekdayFrom)
Set the value for WeekdayFrom.void
setWeekdayTo(Long newWeekdayTo)
Set the value for WeekdayTo.void
setWeekFrom(Long newWeekFrom)
Set the value for WeekFrom.void
setWeekTo(Long newWeekTo)
Set the value for WeekTo.-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "TimeWindowElement" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<TimeWindowElement> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges:- See Also:
- Constant Field Values
-
-
Method Detail
-
getDateFrom
DateTimeZone getDateFrom()
Get the value for DateFrom. (The date-time stamp from which the time window is active. If both constraints are set andDateTo
is beforeDateFrom
then the interval is restricted to a complement of[DateFrom, DateTo)
, i.e. to(lowDate, DateTo) ∪ [DateFrom, highDate)
. IfDateFrom
=DateTo
then the window is always closed.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDateTo
DateTimeZone getDateTo()
Get the value for DateTo. (The date until which the time window is active. SeeDateFrom
for extra details.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDayFrom
Long getDayFrom()
Get the value for DayFrom. (The day from which the time window is active counted from the first day of the month (1-31). The values 1, 0, andnull
are treated the same and define the first day. The value 1000 is a special value to indicate the last day. If a month has less days then specified, the interval will start on the last day of the month. )- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDayTo
Long getDayTo()
Get the value for DayTo. (The day until which the time window is active counted from the first day of the month (1-31). The values 31, 1000, 0, andnull
are treated the same and define the first day. The value 1000 is a special value to indicate the last day. If a month has less days then specified, the interval will close on the last day of the month. )- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDescription
String getDescription()
Get the value for Description. (Optional description for the time window element defined by the user.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMonthFrom
Long getMonthFrom()
Get the value for MonthFrom. (The month from which the time window is active (1-12). The values 1, 0, andnull
are treated the same and define the first month.Examples:
- Every March: <3,3>, i.e.[1.03 00:00, 1.04 00:00)
- First quarter: <0,3> or <1,3>
- Last quarter: <10,12> or <10,0>
- First and last quarters: <10,3> (will be wrapped);
- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getMonthTo
Long getMonthTo()
Get the value for MonthTo. (The month until which the time window is active (1-12). The values 0, 12, andnull
are treated the same and define the last month. SeeMonthFrom
for more details.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getParameters
String getParameters()
Get the value for Parameters. (Parameters for period functions. Period functions receive all of theconstraintFrom
andconstraintTo
attributes plus theParameters
. Parameters are represented with one line per parameter, of the form parameter-name = value. )- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getTimeOfDayFrom
Long getTimeOfDayFrom()
Get the value for TimeOfDayFrom. (Time of day in ms from which the time window is active. Resolution is in seconds; the value entered will be rounded to the second.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getTimeOfDayTo
Long getTimeOfDayTo()
Get the value for TimeOfDayTo. (Time of day in ms until which the time window is active. Resolution is in seconds; the value entered will be rounded to the second.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getOffsetTimeOfDay
Long getOffsetTimeOfDay()
Get the value for OffsetTimeOfDay. (Specifies the day rollover, which is the time in ms of the start of the day, in whichTimeOfDayFrom
andTimeOfDayTo
are set. May wrap to the next day. )- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getWeekdayFrom
Long getWeekdayFrom()
Get the value for WeekdayFrom. ( The weekday from which the time window is active. Allowed values areDateTimeZone.SUNDAY
..DateTimeZone.SATURDAY
, and the wildcards (DateTimeZone.WORKDAY
,DateTimeZone.WORKWEEK
,DateTimeZone.WEEKEND
, andDateTimeZone.ANYDAY
) Missing one of the constraints leads to a half-restricted interval computed from Monday. To specify a single weekday one needs to set both constraints equal, e.g.- Friday: <6,6> or <
DateTimeZone.FRIDAY
,DateTimeZone.FRIDAY
> - Weekend: <
DateTimeZone.WEEKEND
,DateTimeZone.WEEKEND
> or <DateTimeZone.SATURDAY
,DateTimeZone.SUNDAY
> - Workweek: <
DateTimeZone.MONDAY
,DateTimeZone.FRIDAY
> or <DateTimeZone.WORKDAY
,DateTimeZone.WORKDAY
> or <DateTimeZone.WORKWEEK
,DateTimeZone.WORKWEEK
> - Friday and Weekend: <
DateTimeZone.FRIDAY
,DateTimeZone.WEEKEND
> or <DateTimeZone.FRIDAY
,DateTimeZone.SUNDAY
>
- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
- Friday: <6,6> or <
-
getWeekdayTo
Long getWeekdayTo()
Get the value for WeekdayTo. (The weekday until which the time window is active. SeeWeekdayFrom
for extra details.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getWeekFrom
Long getWeekFrom()
Get the value for WeekFrom. (The day or week number that is used together withWeekdayFrom
andWeekdayTo
constraints.If the corresponding weekday constraint refers to a weekly day (e.g., Friday, or weekend) then this attribute refers to the week number of the weekday. For example, if this attribute is not set, and
WeekdayFrom
= Friday,WeekdayTo
= Saturday, then the interval will be open every week from Friday to Saturday. IfWeekFrom
is set to 3 andWeekTo
is set to 5 then the interval will be opened every month from the third Friday to the last Saturday.If the corresponding weekday constraint refers to a monthly day (e.g.,
WORKDAY
orANYYDAY
) then this attribute refers to the day number in a month. For example, ifWeekdayFrom
is set toWORKDAY
,WeekdayTo
is set toWORKDAY
, andWeekFrom
is set to 3 andWeekTo
is set to 5 then the interval will be opened from the 3-rd to the 5-th working day of the month.For conventional months we can have maximal of 5 weeks, 23 working days and 31 days. If a month has less days than set in
WeekFrom
orWeekTo
then the LAST (working) day of the month is used. Thus, setting the latter to 31 will create an interval that is open every last day of a month, that may, for example, fall on the 28-th of February as well. The value 1000 can be used as a special value to indicate the last day. )- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getWeekTo
Long getWeekTo()
Get the value for WeekTo. (The day or week number that is used together withWeekdayFrom
andWeekdayTo
constraints. SeeWeekdayFrom
for extra details.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDayShift
Long getDayShift()
Get the value for DayShift. (The number of days that the open period for the time window element must be shifted.)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setDateFrom
void setDateFrom(DateTimeZone newDateFrom)
Set the value for DateFrom. (The date-time stamp from which the time window is active. If both constraints are set andDateTo
is beforeDateFrom
then the interval is restricted to a complement of[DateFrom, DateTo)
, i.e. to(lowDate, DateTo) ∪ [DateFrom, highDate)
. IfDateFrom
=DateTo
then the window is always closed.) This value is optional.- Parameters:
newDateFrom
- the new value for DateFrom.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setDateTo
void setDateTo(DateTimeZone newDateTo)
Set the value for DateTo. (The date until which the time window is active. SeeDateFrom
for extra details.) This value is optional.- Parameters:
newDateTo
- the new value for DateTo.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setDayFrom
void setDayFrom(Long newDayFrom)
Set the value for DayFrom. (The day from which the time window is active counted from the first day of the month (1-31). The values 1, 0, andnull
are treated the same and define the first day. The value 1000 is a special value to indicate the last day. If a month has less days then specified, the interval will start on the last day of the month. ) This value is optional.- Parameters:
newDayFrom
- the new value for DayFrom.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setDayTo
void setDayTo(Long newDayTo)
Set the value for DayTo. (The day until which the time window is active counted from the first day of the month (1-31). The values 31, 1000, 0, andnull
are treated the same and define the first day. The value 1000 is a special value to indicate the last day. If a month has less days then specified, the interval will close on the last day of the month. ) This value is optional.- Parameters:
newDayTo
- the new value for DayTo.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setDescription
void setDescription(String newDescription)
Set the value for Description. (Optional description for the time window element defined by the user.) This value is optional.- Parameters:
newDescription
- the new value for Description.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMonthFrom
void setMonthFrom(Long newMonthFrom)
Set the value for MonthFrom. (The month from which the time window is active (1-12). The values 1, 0, andnull
are treated the same and define the first month.Examples:
- Every March: <3,3>, i.e.[1.03 00:00, 1.04 00:00)
- First quarter: <0,3> or <1,3>
- Last quarter: <10,12> or <10,0>
- First and last quarters: <10,3> (will be wrapped);
- Parameters:
newMonthFrom
- the new value for MonthFrom.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setMonthTo
void setMonthTo(Long newMonthTo)
Set the value for MonthTo. (The month until which the time window is active (1-12). The values 0, 12, andnull
are treated the same and define the last month. SeeMonthFrom
for more details.) This value is optional.- Parameters:
newMonthTo
- the new value for MonthTo.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setParameters
void setParameters(String newParameters)
Set the value for Parameters. (Parameters for period functions. Period functions receive all of theconstraintFrom
andconstraintTo
attributes plus theParameters
. Parameters are represented with one line per parameter, of the form parameter-name = value. ) This value is optional.- Parameters:
newParameters
- the new value for Parameters.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setTimeOfDayFrom
void setTimeOfDayFrom(Long newTimeOfDayFrom)
Set the value for TimeOfDayFrom. (Time of day in ms from which the time window is active. Resolution is in seconds; the value entered will be rounded to the second.) This value is optional.- Parameters:
newTimeOfDayFrom
- the new value for TimeOfDayFrom.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setTimeOfDayTo
void setTimeOfDayTo(Long newTimeOfDayTo)
Set the value for TimeOfDayTo. (Time of day in ms until which the time window is active. Resolution is in seconds; the value entered will be rounded to the second.) This value is optional.- Parameters:
newTimeOfDayTo
- the new value for TimeOfDayTo.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setOffsetTimeOfDay
void setOffsetTimeOfDay(Long newOffsetTimeOfDay)
Set the value for OffsetTimeOfDay. (Specifies the day rollover, which is the time in ms of the start of the day, in whichTimeOfDayFrom
andTimeOfDayTo
are set. May wrap to the next day. ) This value is optional.- Parameters:
newOffsetTimeOfDay
- the new value for OffsetTimeOfDay.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setWeekdayFrom
void setWeekdayFrom(Long newWeekdayFrom)
Set the value for WeekdayFrom. ( The weekday from which the time window is active. Allowed values areDateTimeZone.SUNDAY
..DateTimeZone.SATURDAY
, and the wildcards (DateTimeZone.WORKDAY
,DateTimeZone.WORKWEEK
,DateTimeZone.WEEKEND
, andDateTimeZone.ANYDAY
) Missing one of the constraints leads to a half-restricted interval computed from Monday. To specify a single weekday one needs to set both constraints equal, e.g.- Friday: <6,6> or <
DateTimeZone.FRIDAY
,DateTimeZone.FRIDAY
> - Weekend: <
DateTimeZone.WEEKEND
,DateTimeZone.WEEKEND
> or <DateTimeZone.SATURDAY
,DateTimeZone.SUNDAY
> - Workweek: <
DateTimeZone.MONDAY
,DateTimeZone.FRIDAY
> or <DateTimeZone.WORKDAY
,DateTimeZone.WORKDAY
> or <DateTimeZone.WORKWEEK
,DateTimeZone.WORKWEEK
> - Friday and Weekend: <
DateTimeZone.FRIDAY
,DateTimeZone.WEEKEND
> or <DateTimeZone.FRIDAY
,DateTimeZone.SUNDAY
>
- Parameters:
newWeekdayFrom
- the new value for WeekdayFrom.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
- Friday: <6,6> or <
-
setWeekdayTo
void setWeekdayTo(Long newWeekdayTo)
Set the value for WeekdayTo. (The weekday until which the time window is active. SeeWeekdayFrom
for extra details.) This value is optional.- Parameters:
newWeekdayTo
- the new value for WeekdayTo.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setWeekFrom
void setWeekFrom(Long newWeekFrom)
Set the value for WeekFrom. (The day or week number that is used together withWeekdayFrom
andWeekdayTo
constraints.If the corresponding weekday constraint refers to a weekly day (e.g., Friday, or weekend) then this attribute refers to the week number of the weekday. For example, if this attribute is not set, and
WeekdayFrom
= Friday,WeekdayTo
= Saturday, then the interval will be open every week from Friday to Saturday. IfWeekFrom
is set to 3 andWeekTo
is set to 5 then the interval will be opened every month from the third Friday to the last Saturday.If the corresponding weekday constraint refers to a monthly day (e.g.,
WORKDAY
orANYYDAY
) then this attribute refers to the day number in a month. For example, ifWeekdayFrom
is set toWORKDAY
,WeekdayTo
is set toWORKDAY
, andWeekFrom
is set to 3 andWeekTo
is set to 5 then the interval will be opened from the 3-rd to the 5-th working day of the month.For conventional months we can have maximal of 5 weeks, 23 working days and 31 days. If a month has less days than set in
WeekFrom
orWeekTo
then the LAST (working) day of the month is used. Thus, setting the latter to 31 will create an interval that is open every last day of a month, that may, for example, fall on the 28-th of February as well. The value 1000 can be used as a special value to indicate the last day. ) This value is optional.- Parameters:
newWeekFrom
- the new value for WeekFrom.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setWeekTo
void setWeekTo(Long newWeekTo)
Set the value for WeekTo. (The day or week number that is used together withWeekdayFrom
andWeekdayTo
constraints. SeeWeekdayFrom
for extra details.) This value is optional.- Parameters:
newWeekTo
- the new value for WeekTo.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setDayShift
void setDayShift(Long newDayShift)
Set the value for DayShift. (The number of days that the open period for the time window element must be shifted.) This value is optional.- Parameters:
newDayShift
- the new value for DayShift.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
allStatusChanges
List<Period> allStatusChanges(DateTimeZone startTime, DateTimeZone endTime, TimeZone defaultTimeZone) throws NoTimeZoneForTimeWindowCalculation
All changes of the open-close status of this time window interval. Returns all status changes of the interval in the period AFTERstartTime
and BEFOREendTime
.- Parameters:
startTime
- starting time stampendTime
- ending time stampdefaultTimeZone
- The TimeZone to use if the TimeWindowElement does not specify a TimeZone. The result will be in this time zone.- Returns:
- Sorted list with status changes between (
startTime
,endTime
) in the default time zone. - Throws:
NoTimeZoneForTimeWindowCalculation
- No timezone could be found to calculate this TimeWindowElement. This means that the object that includes the TimeWindow should set the TimeZone to use for the calculation of the TimeWindow, or a TimeZone must be set on the TimeWindow or TimeWindowElement.
-
isOpen
boolean isOpen(DateTimeZone atTime, TimeZone defaultTimeZone) throws NoTimeZoneForTimeWindowCalculation
Returns status of this interval atatTime
- Parameters:
atTime
- as of what time stampdefaultTimeZone
- The TimeZone to use if the TimeWindowElement does not specify a TimeZone- Returns:
- Is open?
- Throws:
NoTimeZoneForTimeWindowCalculation
- No timezone could be found to calculate this TimeWindowElement. This means that the object that includes the TimeWindow should set the TimeZone to use for the calculation of the TimeWindow, or a TimeZone must be set on the TimeWindow or TimeWindowElement.
-
describe
String describe()
Human-readable description of the interval- Returns:
- text
-
getDisabledDuringTimeWindow
TimeWindow getDisabledDuringTimeWindow()
Get the DisabledDuringTimeWindow.- Returns:
- DisabledDuringTimeWindow
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getEnabledDuringTimeWindow
TimeWindow getEnabledDuringTimeWindow()
Get the EnabledDuringTimeWindow.- Returns:
- EnabledDuringTimeWindow
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getPeriodFunction
PeriodFunction getPeriodFunction()
Get the PeriodFunction.- Returns:
- PeriodFunction
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getTimeWindow
TimeWindow getTimeWindow()
Get the TimeWindow.- Returns:
- TimeWindow
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getTimeZone
TimeZone getTimeZone()
Get the TimeZone.- Returns:
- TimeZone
- Throws:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
setDisabledDuringTimeWindow
void setDisabledDuringTimeWindow(TimeWindow newDisabledDuringTimeWindow)
Set the value for DisabledDuringTimeWindow. This value is optional.- Parameters:
newDisabledDuringTimeWindow
- is the object to set DisabledDuringTimeWindow to. A time window during which a time window interval is closed
-
setEnabledDuringTimeWindow
void setEnabledDuringTimeWindow(TimeWindow newEnabledDuringTimeWindow)
Set the value for EnabledDuringTimeWindow. This value is optional.- Parameters:
newEnabledDuringTimeWindow
- is the object to set EnabledDuringTimeWindow to. A time window during which a time window interval is open.
-
setPeriodFunction
void setPeriodFunction(PeriodFunction newPeriodFunction)
Set the value for PeriodFunction. This value is optional.- Parameters:
newPeriodFunction
- is the object to set PeriodFunction to. The period function defined for a time window interval
-
setTimeZone
void setTimeZone(TimeZone newTimeZone)
Set the value for TimeZone. This value is optional.- Parameters:
newTimeZone
- is the object to set TimeZone to. The timezone for the timewindowinterval
-
-