Class CmsJspDateSeriesBean


  • public class CmsJspDateSeriesBean
    extends java.lang.Object
    Bean for easy access to information of an event series.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.util.Date> getDates()
      Returns the list of start dates for all instances of the series.
      CmsJspInstanceDateBean getFirst()
      Returns the first event of this series.
      java.lang.Long getInstanceDuration()
      Returns the duration of a single instance in milliseconds.
      java.util.Map<java.lang.Object,​CmsJspInstanceDateBean> getInstanceInfo()
      Returns a lazy map from the start time of a single instance of the series to the date information on the single instance.
      boolean getIsExtractedDate()
      Returns a flag, indicating if the series is extracted from another series.
      boolean getIsSeries()
      Returns a flag, indicating if the series is defined via a pattern, i.e., not just as via single date.
      boolean getIsSingleDate()
      Returns a flag, indicating if the series is defined by only a single date and not extracted from another series.
      CmsJspInstanceDateBean getLast()
      Returns the last event of this series.
      java.util.Locale getLocale()
      Returns the locale to use for rendering dates.
      CmsJspInstanceDateBean getNext()
      Returns the next event of this series relative to the current date.
      CmsJspInstanceDateBean getNextFor​(java.lang.Object date)
      Returns the next event of this series that takes place at the given date or after it.
      CmsJspDateSeriesBean getParentSeries()
      Returns the parent series, if it is present, otherwise null.
      CmsJspInstanceDateBean getPrevious()
      Returns the next event of this series relative to the current date.
      CmsJspInstanceDateBean getPreviousFor​(java.lang.Object date)
      Returns the next event of this series that takes place at the given date or after it.
      java.lang.String getTitle()
      Returns the gallery title of the series content.
      boolean isMultiDay()
      Returns a flag, indicating if the single events last over night.
      boolean isWholeDay()
      Returns a flag, indicating if the events in the series last whole days.
      java.util.Date toDate​(java.lang.Object date)
      Converts the provided object to a date, if possible.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmsJspDateSeriesBean

        public CmsJspDateSeriesBean​(CmsJspContentAccessValueWrapper value,
                                    java.util.Locale locale)
        Constructor for a date series bean.

        Parameters:
        value - the content value wrapper for the element that stores the series definition
        locale - the locale in which dates should be rendered. This can differ from the content locale, if e.g. on a German page a content that is only present in English is rendered.
    • Method Detail

      • getDates

        public java.util.List<java.util.Date> getDates()
        Returns the list of start dates for all instances of the series.

        Returns:
        the list of start dates for all instances of the series
      • getFirst

        public CmsJspInstanceDateBean getFirst()
        Returns the first event of this series.

        In case this is just a single event and not a series, this is identical to the date of the event.

        Returns:
        the first event of this series
      • getInstanceDuration

        public java.lang.Long getInstanceDuration()
        Returns the duration of a single instance in milliseconds.

        Returns:
        the duration of a single instance in milliseconds
      • getInstanceInfo

        public java.util.Map<java.lang.Object,​CmsJspInstanceDateBeangetInstanceInfo()
        Returns a lazy map from the start time of a single instance of the series to the date information on the single instance.

        Start time can be provided as Long, as a String representation of the long value or as Date.

        If no event exists for the start time, the information for the first event of the series is returned.

        Returns:
        a lazy map from the start time of a single instance of the series to the date information on the single instance.
      • getIsExtractedDate

        public boolean getIsExtractedDate()
        Returns a flag, indicating if the series is extracted from another series.

        Returns:
        a flag, indicating if the series is extracted from another series
      • getIsSeries

        public boolean getIsSeries()
        Returns a flag, indicating if the series is defined via a pattern, i.e., not just as via single date.

        Returns:
        a flag, indicating if the series is defined via a pattern, i.e., not just as via single date
      • getIsSingleDate

        public boolean getIsSingleDate()
        Returns a flag, indicating if the series is defined by only a single date and not extracted from another series.

        Returns:
        a flag, indicating if the series is defined by only a single date and not extracted from another series
      • getLast

        public CmsJspInstanceDateBean getLast()
        Returns the last event of this series.

        In case this is just a single event and not a series, this is identical to the date of the event.

        Returns:
        the last event of this series
      • getLocale

        public java.util.Locale getLocale()
        Returns the locale to use for rendering dates.

        Returns:
        the locale to use for rendering dates
      • getNext

        public CmsJspInstanceDateBean getNext()
        Returns the next event of this series relative to the current date.

        In case this is just a single event and not a series, this is identical to the date of the event.

        Returns:
        the next event of this series
      • getNextFor

        public CmsJspInstanceDateBean getNextFor​(java.lang.Object date)
        Returns the next event of this series that takes place at the given date or after it.

        In case this is just a single event and not a series, this is identical to the date of the event.

        Parameters:
        date - the date relative to which the event is returned.
        Returns:
        the next event of this series
      • getParentSeries

        public CmsJspDateSeriesBean getParentSeries()
        Returns the parent series, if it is present, otherwise null.

        Returns:
        the parent series, if it is present, otherwise null
      • getPrevious

        public CmsJspInstanceDateBean getPrevious()
        Returns the next event of this series relative to the current date.

        In case this is just a single event and not a series, this is identical to the date of the event.

        Returns:
        the next event of this series
      • getPreviousFor

        public CmsJspInstanceDateBean getPreviousFor​(java.lang.Object date)
        Returns the next event of this series that takes place at the given date or after it.

        In case this is just a single event and not a series, this is identical to the date of the event.

        Parameters:
        date - the date relative to which the event is returned.
        Returns:
        the next event of this series
      • getTitle

        public java.lang.String getTitle()
        Returns the gallery title of the series content.

        Returns:
        the gallery title of the series content
      • isMultiDay

        public boolean isMultiDay()
        Returns a flag, indicating if the single events last over night.

        Returns:
        true if the event ends on another day than it starts, false if it ends on the same day
      • isWholeDay

        public boolean isWholeDay()
        Returns a flag, indicating if the events in the series last whole days.

        Returns:
        a flag, indicating if the events in the series last whole days
      • toDate

        public java.util.Date toDate​(java.lang.Object date)
        Converts the provided object to a date, if possible.
        Parameters:
        date - the date.
        Returns:
        the date as Date