Package org.opencms.acacia.shared
Class A_CmsSerialDateValue
java.lang.Object
org.opencms.acacia.shared.A_CmsSerialDateValue
- All Implemented Interfaces:
I_CmsSerialDateValue
- Direct Known Subclasses:
CmsSerialDateValue
The base class for implementations of serial date values.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.acacia.shared.I_CmsSerialDateValue
I_CmsSerialDateValue.DateType, I_CmsSerialDateValue.EndType, I_CmsSerialDateValue.JsonKey, I_CmsSerialDateValue.Month, I_CmsSerialDateValue.PatternType, I_CmsSerialDateValue.WeekDay, I_CmsSerialDateValue.WeekOfMonth
-
Field Summary
Fields inherited from interface org.opencms.acacia.shared.I_CmsSerialDateValue
DAY_IN_MILLIS, NUM_OF_WEEKDAYS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addException
(Date date) Add a date where the event should not take place, even if they are part of the series.final void
Add a week of month.final void
Clear the exceptions.final void
Clear the individual dates.final void
Clear the week days.final void
Clear the weeks of month.boolean
Returns a flag, indicating if the event ends at midnight.final boolean
Returns the type of the specified date.final int
Returns the day of the month, the events should take place.final Date
getEnd()
Returns the end time of the events.Returns the end type of the event series.Returns the dates, where the event should not take place.Returns the dates of an individual date series.final int
Returns the pattern type specific interval of the event.getMonth()
Returns the month in which the events take place.final int
Returns the number of occurrences of the event.Returns the uuid of the content that holds the series, the current event was extracted from.Returns the pattern type of the event series.final Date
Returns the date of the last day, events of the series should take place.final Date
getStart()
Returns the start time of the events.Returns the week day where the event should take place.Returns the week days where the event should take place.Returns the week of the month, the event should take place.Returns the weeks of the month, the event should take place.final boolean
Returns a flag, indicating if exceptions are present.final int
hashCode()
boolean
Returns a flag, indicating if the events should be treated as "current" till they end (or only till they start).protected final boolean
Checks, if a valid day of month is set.protected final boolean
Checks if the duration option is valid.protected final boolean
Check, if the end date of the single event is valid, i.e., either not set or not before the start date.final boolean
Returns a flag, indicating if the event should take place every working day.boolean
Returns a flag, indicating if the event is extracted from another series.protected final boolean
Checks, if a valid interval is specified.protected final boolean
Checks, if a month is specified.protected final boolean
Checks, if all values necessary for a specific pattern are valid.protected final boolean
Check, if the start time stamp is set.final boolean
isValid()
Returns a flag, indicating if the value specifies a valid date (series).protected final boolean
Checks, if the end type is valid for the set pattern type.protected final boolean
Checks if at least one weekday is specified.protected final boolean
Checks, if at least one week of month is set.final boolean
Returns a flag, indicating if the event last the whole day/whole days.final void
Remove a week of month.final void
setCurrentTillEnd
(Boolean isCurrentTillEnd) Set the flag, indicating if the event is treated as "current" till the end.final void
setDayOfMonth
(int dayOfMonth) Set the day of month.protected final void
Sets the value to a default.protected final void
Set the end type as derived from other values.final void
Set the end time for the event.final void
setEndType
(I_CmsSerialDateValue.EndType endType) Set the end type of the series.final void
setEveryWorkingDay
(Boolean isEveryWorkingDay) Set the flag, indicating if the event should take place every working day.final void
setExceptions
(SortedSet<Date> dates) Set dates where the event should not take place, even if they are part of the series.final void
setIndividualDates
(SortedSet<Date> dates) Set the individual dates where the event should take place.final void
setInterval
(int interval) Set the pattern type specific interval between two events, e.g., number of days, weeks, month, years.final void
Set the month in which the event should take place.final void
setOccurrences
(int occurrences) Set the number of occurrences of the event.final void
setParentSeriesId
(CmsUUID structureId) Set the series, the current event (series) is extracted from.final void
Set the pattern type of the event series.final void
setSeriesEndDate
(Date date) Set the last day events of the series should occur.final void
Set the start time of the events.final void
setWeekDay
(I_CmsSerialDateValue.WeekDay weekDay) Set the week day the events should occur.final void
setWeekDays
(SortedSet<I_CmsSerialDateValue.WeekDay> weekDays) Set the week days the events should occur.final void
setWeekOfMonth
(I_CmsSerialDateValue.WeekOfMonth weekOfMonth) Set the week of the month the events should occur.final void
setWeeksOfMonth
(SortedSet<I_CmsSerialDateValue.WeekOfMonth> weeksOfMonth) Set the weeks of the month the events should occur.final void
setWholeDay
(Boolean isWholeDay) Set the flag, indicating if the event last the whole day/whole days.
-
Constructor Details
-
A_CmsSerialDateValue
public A_CmsSerialDateValue()
-
-
Method Details
-
addException
Add a date where the event should not take place, even if they are part of the series.- Parameters:
date
- the date to add as exception.
-
clearExceptions
Clear the exceptions. -
clearIndividualDates
Clear the individual dates. -
clearWeekDays
Clear the week days. -
clearWeeksOfMonth
Clear the weeks of month. -
endsAtMidNight
Description copied from interface:I_CmsSerialDateValue
Returns a flag, indicating if the event ends at midnight.- Specified by:
endsAtMidNight
in interfaceI_CmsSerialDateValue
- Returns:
- a flag, indicating if the event ends at midnight.
- See Also:
-
equals
-
getDateType
Description copied from interface:I_CmsSerialDateValue
Returns the type of the specified date.- Specified by:
getDateType
in interfaceI_CmsSerialDateValue
- Returns:
- the type of the specified date.
- See Also:
-
getDayOfMonth
Description copied from interface:I_CmsSerialDateValue
Returns the day of the month, the events should take place.- Specified by:
getDayOfMonth
in interfaceI_CmsSerialDateValue
- Returns:
- the day of the month, the events should take place.
- See Also:
-
getEnd
Description copied from interface:I_CmsSerialDateValue
Returns the end time of the events.- Specified by:
getEnd
in interfaceI_CmsSerialDateValue
- Returns:
- the end time of the events.
- See Also:
-
getEndType
Description copied from interface:I_CmsSerialDateValue
Returns the end type of the event series.- Specified by:
getEndType
in interfaceI_CmsSerialDateValue
- Returns:
- the end type of the event series.
- See Also:
-
getExceptions
Description copied from interface:I_CmsSerialDateValue
Returns the dates, where the event should not take place.- Specified by:
getExceptions
in interfaceI_CmsSerialDateValue
- Returns:
- the dates, where the event should not take place.
- See Also:
-
getIndividualDates
Description copied from interface:I_CmsSerialDateValue
Returns the dates of an individual date series.- Specified by:
getIndividualDates
in interfaceI_CmsSerialDateValue
- Returns:
- the dates of an individual date series.
- See Also:
-
getInterval
Description copied from interface:I_CmsSerialDateValue
Returns the pattern type specific interval of the event.- Specified by:
getInterval
in interfaceI_CmsSerialDateValue
- Returns:
- the pattern type specific interval of the event.
- See Also:
-
getMonth
Description copied from interface:I_CmsSerialDateValue
Returns the month in which the events take place.- Specified by:
getMonth
in interfaceI_CmsSerialDateValue
- Returns:
- the month in which the events take place.
- See Also:
-
getOccurrences
Description copied from interface:I_CmsSerialDateValue
Returns the number of occurrences of the event.- Specified by:
getOccurrences
in interfaceI_CmsSerialDateValue
- Returns:
- the number of occurrences of the event.
- See Also:
-
getParentSeriesId
Description copied from interface:I_CmsSerialDateValue
Returns the uuid of the content that holds the series, the current event was extracted from. Ornull
if the current event series was not extracted from another one.- Specified by:
getParentSeriesId
in interfaceI_CmsSerialDateValue
- Returns:
- the uuid of the original series' content,
or
null
, if the event is not extracted from another event series.
- See Also:
-
getPatternType
Description copied from interface:I_CmsSerialDateValue
Returns the pattern type of the event series.- Specified by:
getPatternType
in interfaceI_CmsSerialDateValue
- Returns:
- the pattern type of the event series.
- See Also:
-
getSeriesEndDate
Description copied from interface:I_CmsSerialDateValue
Returns the date of the last day, events of the series should take place.- Specified by:
getSeriesEndDate
in interfaceI_CmsSerialDateValue
- Returns:
- the date of the last day, events of the series should take place.
- See Also:
-
getStart
Description copied from interface:I_CmsSerialDateValue
Returns the start time of the events.- Specified by:
getStart
in interfaceI_CmsSerialDateValue
- Returns:
- the start time of the events.
- See Also:
-
getWeekDay
Description copied from interface:I_CmsSerialDateValue
Returns the week day where the event should take place.- Specified by:
getWeekDay
in interfaceI_CmsSerialDateValue
- Returns:
- the week day where the event should take place.
- See Also:
-
getWeekDays
Description copied from interface:I_CmsSerialDateValue
Returns the week days where the event should take place.- Specified by:
getWeekDays
in interfaceI_CmsSerialDateValue
- Returns:
- the week days where the event should take place.
- See Also:
-
getWeekOfMonth
Description copied from interface:I_CmsSerialDateValue
Returns the week of the month, the event should take place.- Specified by:
getWeekOfMonth
in interfaceI_CmsSerialDateValue
- Returns:
- the week of the month, the event should take place.
- See Also:
-
getWeeksOfMonth
Description copied from interface:I_CmsSerialDateValue
Returns the weeks of the month, the event should take place.- Specified by:
getWeeksOfMonth
in interfaceI_CmsSerialDateValue
- Returns:
- the weeks of the month, the event should take place.
- See Also:
-
hasExceptions
Returns a flag, indicating if exceptions are present.- Returns:
- a flag, indicating if exceptions are present.
-
hashCode
-
isCurrentTillEnd
Description copied from interface:I_CmsSerialDateValue
Returns a flag, indicating if the events should be treated as "current" till they end (or only till they start).- Specified by:
isCurrentTillEnd
in interfaceI_CmsSerialDateValue
- Returns:
true
if the event is "current" till it ends,false
if it is current till it starts.- See Also:
-
isEveryWorkingDay
Description copied from interface:I_CmsSerialDateValue
Returns a flag, indicating if the event should take place every working day.- Specified by:
isEveryWorkingDay
in interfaceI_CmsSerialDateValue
- Returns:
- a flag, indicating if the event should take place every working day.
- See Also:
-
isFromOtherSeries
Description copied from interface:I_CmsSerialDateValue
Returns a flag, indicating if the event is extracted from another series.- Specified by:
isFromOtherSeries
in interfaceI_CmsSerialDateValue
- Returns:
- a flag, indicating if the event is extracted from another series.
- See Also:
-
isValid
Description copied from interface:I_CmsSerialDateValue
Returns a flag, indicating if the value specifies a valid date (series).- Specified by:
isValid
in interfaceI_CmsSerialDateValue
- Returns:
- a flag, indicating if the value specifies a valid date (series).
- See Also:
-
isWholeDay
Description copied from interface:I_CmsSerialDateValue
Returns a flag, indicating if the event last the whole day/whole days.- Specified by:
isWholeDay
in interfaceI_CmsSerialDateValue
- Returns:
- a flag, indicating if the event last the whole day/whole days.
- See Also:
-
setCurrentTillEnd
Set the flag, indicating if the event is treated as "current" till the end.- Parameters:
isCurrentTillEnd
- the flag, indicating if the event is treated as "current" till the end.
-
setDayOfMonth
Set the day of month.- Parameters:
dayOfMonth
- the day of month to set.
-
setEnd
Set the end time for the event.- Parameters:
date
- the end time to set.
-
setEveryWorkingDay
Set the flag, indicating if the event should take place every working day.- Parameters:
isEveryWorkingDay
- the flag, indicating if the event should take place every working day.
-
setExceptions
Set dates where the event should not take place, even if they are part of the series.- Parameters:
dates
- dates to set.
-
setIndividualDates
Set the individual dates where the event should take place.- Parameters:
dates
- the dates to set.
-
setInterval
Set the pattern type specific interval between two events, e.g., number of days, weeks, month, years.- Parameters:
interval
- the interval to set.
-
setOccurrences
Set the number of occurrences of the event.- Parameters:
occurrences
- the number of occurrences to set.
-
setParentSeriesId
Set the series, the current event (series) is extracted from.- Parameters:
structureId
- the structure id of the series content, the event is extracted from.
-
setSeriesEndDate
Set the last day events of the series should occur.- Parameters:
date
- the day to set.
-
setStart
Set the start time of the events. Unless you specify a single event, the day information is discarded.- Parameters:
date
- the time to set.
-
setWeekDays
Set the week days the events should occur.- Parameters:
weekDays
- the week days to set.
-
setWeeksOfMonth
Set the weeks of the month the events should occur.- Parameters:
weeksOfMonth
- the weeks of month to set (first to fifth, where fifth means last).
-
setWholeDay
Set the flag, indicating if the event last the whole day/whole days.- Parameters:
isWholeDay
- the flag to set
-
isDayOfMonthValid
Checks, if a valid day of month is set.- Returns:
- a flag, indicating if the set day of month is valid.
-
isDurationValid
Checks if the duration option is valid. NOTE: This does NOT check, if too many events are specified.- Returns:
- a flag, indicating if the duration option is valid.
-
isEndValid
Check, if the end date of the single event is valid, i.e., either not set or not before the start date.- Returns:
- a flag, indicating if the end date is set.
-
isIntervalValid
Checks, if a valid interval is specified.- Returns:
- a flag, indicating if the specified interval is valid.
-
isMonthSet
Checks, if a month is specified.- Returns:
- flag, indicating if a month is specified.
-
isPatternValid
Checks, if all values necessary for a specific pattern are valid.- Returns:
- a flag, indicating if all values required for the pattern are valid.
-
isStartSet
Check, if the start time stamp is set.- Returns:
- a flag, indicating if a start date is set.
-
isValidEndTypeForPattern
Checks, if the end type is valid for the set pattern type.- Returns:
- a flag, indicating if the end type is valid for the pattern type.
-
isWeekDaySet
Checks if at least one weekday is specified.- Returns:
- a flag, indicating if at least one weekday is specified.
-
isWeekOfMonthSet
Checks, if at least one week of month is set.- Returns:
- a flag, indicating if at least one week of month is set.
-
setDefaultValue
Sets the value to a default. -
setDerivedEndType
Set the end type as derived from other values.
-