Class CmsJspDateSeriesBean

java.lang.Object
org.opencms.jsp.util.CmsJspDateSeriesBean

public class CmsJspDateSeriesBean extends Object
Bean for easy access to information of an event series.
  • Constructor Details

    • CmsJspDateSeriesBean

      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 Details

    • getDates

      public List<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

      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

      Returns the duration of a single instance in milliseconds.

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

      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

      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 Locale getLocale()
      Returns the locale to use for rendering dates.

      Returns:
      the locale to use for rendering dates
    • 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

      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

      Returns the parent series, if it is present, otherwise null.

      Returns:
      the parent series, if it is present, otherwise null
    • 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

      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 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 Date toDate(Object date)
      Converts the provided object to a date, if possible.
      Parameters:
      date - the date.
      Returns:
      the date as Date