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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddException(Date date) Add a date where the event should not take place, even if they are part of the series.final voidAdd a week of month.final voidClear the exceptions.final voidClear the individual dates.final voidClear the week days.final voidClear the weeks of month.booleanReturns a flag, indicating if the event ends at midnight.final booleanReturns the type of the specified date.final intReturns the day of the month, the events should take place.final DategetEnd()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 intReturns the pattern type specific interval of the event.getMonth()Returns the month in which the events take place.final intReturns 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 DateReturns the date of the last day, events of the series should take place.final DategetStart()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 booleanReturns a flag, indicating if exceptions are present.final inthashCode()booleanReturns a flag, indicating if the events should be treated as "current" till they end (or only till they start).protected final booleanChecks, if a valid day of month is set.protected final booleanChecks if the duration option is valid.protected final booleanCheck, if the end date of the single event is valid, i.e., either not set or not before the start date.final booleanReturns a flag, indicating if the event should take place every working day.booleanReturns a flag, indicating if the event is extracted from another series.protected final booleanChecks, if a valid interval is specified.protected final booleanChecks, if a month is specified.protected final booleanChecks, if all values necessary for a specific pattern are valid.protected final booleanCheck, if the start time stamp is set.final booleanisValid()Returns a flag, indicating if the value specifies a valid date (series).protected final booleanChecks, if the end type is valid for the set pattern type.protected final booleanChecks if at least one weekday is specified.protected final booleanChecks, if at least one week of month is set.final booleanReturns a flag, indicating if the event last the whole day/whole days.final voidRemove a week of month.final voidsetCurrentTillEnd(Boolean isCurrentTillEnd) Set the flag, indicating if the event is treated as "current" till the end.final voidsetDayOfMonth(int dayOfMonth) Set the day of month.protected final voidSets the value to a default.protected final voidSet the end type as derived from other values.final voidSet the end time for the event.final voidsetEndType(I_CmsSerialDateValue.EndType endType) Set the end type of the series.final voidsetEveryWorkingDay(Boolean isEveryWorkingDay) Set the flag, indicating if the event should take place every working day.final voidsetExceptions(SortedSet<Date> dates) Set dates where the event should not take place, even if they are part of the series.final voidsetIndividualDates(SortedSet<Date> dates) Set the individual dates where the event should take place.final voidsetInterval(int interval) Set the pattern type specific interval between two events, e.g., number of days, weeks, month, years.final voidSet the month in which the event should take place.final voidsetOccurrences(int occurrences) Set the number of occurrences of the event.final voidsetParentSeriesId(CmsUUID structureId) Set the series, the current event (series) is extracted from.final voidSet the pattern type of the event series.final voidsetSeriesEndDate(Date date) Set the last day events of the series should occur.final voidSet the start time of the events.final voidsetWeekDay(I_CmsSerialDateValue.WeekDay weekDay) Set the week day the events should occur.final voidsetWeekDays(SortedSet<I_CmsSerialDateValue.WeekDay> weekDays) Set the week days the events should occur.final voidsetWeekOfMonth(I_CmsSerialDateValue.WeekOfMonth weekOfMonth) Set the week of the month the events should occur.final voidsetWeeksOfMonth(SortedSet<I_CmsSerialDateValue.WeekOfMonth> weeksOfMonth) Set the weeks of the month the events should occur.final voidsetWholeDay(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_CmsSerialDateValueReturns a flag, indicating if the event ends at midnight.- Specified by:
endsAtMidNightin interfaceI_CmsSerialDateValue- Returns:
- a flag, indicating if the event ends at midnight.
- See Also:
-
equals
-
getDateType
Description copied from interface:I_CmsSerialDateValueReturns the type of the specified date.- Specified by:
getDateTypein interfaceI_CmsSerialDateValue- Returns:
- the type of the specified date.
- See Also:
-
getDayOfMonth
Description copied from interface:I_CmsSerialDateValueReturns the day of the month, the events should take place.- Specified by:
getDayOfMonthin interfaceI_CmsSerialDateValue- Returns:
- the day of the month, the events should take place.
- See Also:
-
getEnd
Description copied from interface:I_CmsSerialDateValueReturns the end time of the events.- Specified by:
getEndin interfaceI_CmsSerialDateValue- Returns:
- the end time of the events.
- See Also:
-
getEndType
Description copied from interface:I_CmsSerialDateValueReturns the end type of the event series.- Specified by:
getEndTypein interfaceI_CmsSerialDateValue- Returns:
- the end type of the event series.
- See Also:
-
getExceptions
Description copied from interface:I_CmsSerialDateValueReturns the dates, where the event should not take place.- Specified by:
getExceptionsin interfaceI_CmsSerialDateValue- Returns:
- the dates, where the event should not take place.
- See Also:
-
getIndividualDates
Description copied from interface:I_CmsSerialDateValueReturns the dates of an individual date series.- Specified by:
getIndividualDatesin interfaceI_CmsSerialDateValue- Returns:
- the dates of an individual date series.
- See Also:
-
getInterval
Description copied from interface:I_CmsSerialDateValueReturns the pattern type specific interval of the event.- Specified by:
getIntervalin interfaceI_CmsSerialDateValue- Returns:
- the pattern type specific interval of the event.
- See Also:
-
getMonth
Description copied from interface:I_CmsSerialDateValueReturns the month in which the events take place.- Specified by:
getMonthin interfaceI_CmsSerialDateValue- Returns:
- the month in which the events take place.
- See Also:
-
getOccurrences
Description copied from interface:I_CmsSerialDateValueReturns the number of occurrences of the event.- Specified by:
getOccurrencesin interfaceI_CmsSerialDateValue- Returns:
- the number of occurrences of the event.
- See Also:
-
getParentSeriesId
Description copied from interface:I_CmsSerialDateValueReturns the uuid of the content that holds the series, the current event was extracted from. Ornullif the current event series was not extracted from another one.- Specified by:
getParentSeriesIdin 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_CmsSerialDateValueReturns the pattern type of the event series.- Specified by:
getPatternTypein interfaceI_CmsSerialDateValue- Returns:
- the pattern type of the event series.
- See Also:
-
getSeriesEndDate
Description copied from interface:I_CmsSerialDateValueReturns the date of the last day, events of the series should take place.- Specified by:
getSeriesEndDatein interfaceI_CmsSerialDateValue- Returns:
- the date of the last day, events of the series should take place.
- See Also:
-
getStart
Description copied from interface:I_CmsSerialDateValueReturns the start time of the events.- Specified by:
getStartin interfaceI_CmsSerialDateValue- Returns:
- the start time of the events.
- See Also:
-
getWeekDay
Description copied from interface:I_CmsSerialDateValueReturns the week day where the event should take place.- Specified by:
getWeekDayin interfaceI_CmsSerialDateValue- Returns:
- the week day where the event should take place.
- See Also:
-
getWeekDays
Description copied from interface:I_CmsSerialDateValueReturns the week days where the event should take place.- Specified by:
getWeekDaysin interfaceI_CmsSerialDateValue- Returns:
- the week days where the event should take place.
- See Also:
-
getWeekOfMonth
Description copied from interface:I_CmsSerialDateValueReturns the week of the month, the event should take place.- Specified by:
getWeekOfMonthin interfaceI_CmsSerialDateValue- Returns:
- the week of the month, the event should take place.
- See Also:
-
getWeeksOfMonth
Description copied from interface:I_CmsSerialDateValueReturns the weeks of the month, the event should take place.- Specified by:
getWeeksOfMonthin 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_CmsSerialDateValueReturns a flag, indicating if the events should be treated as "current" till they end (or only till they start).- Specified by:
isCurrentTillEndin interfaceI_CmsSerialDateValue- Returns:
trueif the event is "current" till it ends,falseif it is current till it starts.- See Also:
-
isEveryWorkingDay
Description copied from interface:I_CmsSerialDateValueReturns a flag, indicating if the event should take place every working day.- Specified by:
isEveryWorkingDayin interfaceI_CmsSerialDateValue- Returns:
- a flag, indicating if the event should take place every working day.
- See Also:
-
isFromOtherSeries
Description copied from interface:I_CmsSerialDateValueReturns a flag, indicating if the event is extracted from another series.- Specified by:
isFromOtherSeriesin interfaceI_CmsSerialDateValue- Returns:
- a flag, indicating if the event is extracted from another series.
- See Also:
-
isValid
Description copied from interface:I_CmsSerialDateValueReturns a flag, indicating if the value specifies a valid date (series).- Specified by:
isValidin interfaceI_CmsSerialDateValue- Returns:
- a flag, indicating if the value specifies a valid date (series).
- See Also:
-
isWholeDay
Description copied from interface:I_CmsSerialDateValueReturns a flag, indicating if the event last the whole day/whole days.- Specified by:
isWholeDayin 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.
-