Package org.opencms.widgets.serialdate
Class CmsSerialDateBeanIndividual
- java.lang.Object
-
- org.opencms.widgets.serialdate.A_CmsSerialDateBean
-
- org.opencms.widgets.serialdate.CmsSerialDateBeanIndividual
-
- All Implemented Interfaces:
I_CmsSerialDateBean
public class CmsSerialDateBeanIndividual extends A_CmsSerialDateBean
Implementation of @{link org.opencms.widgets.serialdate.I_CmsSerialDateBean} that handles series' specified as individual dates.
-
-
Field Summary
-
Fields inherited from class org.opencms.widgets.serialdate.A_CmsSerialDateBean
m_allDates, m_dates, m_datesInMillis, m_endDate, m_endMillis, m_endType, m_exceptions, m_occurrences, m_serialEndDate, m_startDate, MAX_OCCURRENCES
-
-
Constructor Summary
Constructors Constructor Description CmsSerialDateBeanIndividual(java.util.Date startDate, java.util.Date endDate, boolean isWholeDay, I_CmsSerialDateValue.EndType endType, java.util.Date serialEndDate, int occurrences, java.util.SortedSet<java.util.Date> exceptions, java.util.SortedSet<java.util.Date> individualDates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Calendar
getFirstDate()
Generates the first date of the series.protected boolean
isAnyDatePossible()
Check, if the series can have at least one event/date.protected boolean
showMoreEntries(java.util.Calendar nextDate, int previousOccurrences)
Check if the provided date or any date after it are part of the series.protected void
toNextDate(java.util.Calendar date)
Starting with a date that's in the series, the next date is created.-
Methods inherited from class org.opencms.widgets.serialdate.A_CmsSerialDateBean
getDates, getDatesAsLong, getEventDuration, getExceptions, getOccurrences, getSerialEndDate, getSerialEndType, getStartDate, hasTooManyDates
-
-
-
-
Constructor Detail
-
CmsSerialDateBeanIndividual
public CmsSerialDateBeanIndividual(java.util.Date startDate, java.util.Date endDate, boolean isWholeDay, I_CmsSerialDateValue.EndType endType, java.util.Date serialEndDate, int occurrences, java.util.SortedSet<java.util.Date> exceptions, java.util.SortedSet<java.util.Date> individualDates)
- Parameters:
startDate
- the start date of the series as provided by the serial date widget.endDate
- the end date of the series as provided by the serial date widget.isWholeDay
- flag, indicating if the event lasts the whole dayendType
- the end type of the series as provided by the serial date widget.serialEndDate
- the end date of the series as provided by the serial date widget.occurrences
- the maximal number of occurrences of the event as provided by the serial date widget.exceptions
- dates where the event does not take place, even if it is in the series.individualDates
- the individual dates of the series.
-
-
Method Detail
-
getFirstDate
protected java.util.Calendar getFirstDate()
Description copied from class:A_CmsSerialDateBean
Generates the first date of the series.- Specified by:
getFirstDate
in classA_CmsSerialDateBean
- Returns:
- the first date of the series.
- See Also:
A_CmsSerialDateBean.getFirstDate()
-
isAnyDatePossible
protected boolean isAnyDatePossible()
Description copied from class:A_CmsSerialDateBean
Check, if the series can have at least one event/date.- Specified by:
isAnyDatePossible
in classA_CmsSerialDateBean
- Returns:
true
if the series can be non-empty,false
otherwise.- See Also:
A_CmsSerialDateBean.isAnyDatePossible()
-
showMoreEntries
protected boolean showMoreEntries(java.util.Calendar nextDate, int previousOccurrences)
Description copied from class:A_CmsSerialDateBean
Check if the provided date or any date after it are part of the series.- Overrides:
showMoreEntries
in classA_CmsSerialDateBean
- Parameters:
nextDate
- the current date to check.previousOccurrences
- the number of events of the series that took place before the date to check.- Returns:
true
if more dates (including the provided one) could be in the series,false
otherwise.- See Also:
A_CmsSerialDateBean.showMoreEntries(java.util.Calendar, int)
-
toNextDate
protected void toNextDate(java.util.Calendar date)
Description copied from class:A_CmsSerialDateBean
Starting with a date that's in the series, the next date is created.- Specified by:
toNextDate
in classA_CmsSerialDateBean
- Parameters:
date
- the current event date for a event in the series, which is adjusted to the next date potentially in the series.- See Also:
A_CmsSerialDateBean.toNextDate(java.util.Calendar)
-
-