Class CalendarEvent

java.lang.Object
com.webmethods.caf.faces.data.calendar.CalendarEvent
All Implemented Interfaces:
ICalendarEvent, Comparable<ICalendarEvent>

public class CalendarEvent extends Object implements ICalendarEvent
Calendar event. Defines the date range for this event. Contains the event header, body, and type.
  • Field Details

    • m_endDate

      protected Date m_endDate
    • m_allDay

      protected boolean m_allDay
    • m_eventHeader

      protected String m_eventHeader
    • m_eventBody

      protected String m_eventBody
    • m_eventStyle

      protected String m_eventStyle
    • m_eventType

      protected String m_eventType
  • Constructor Details

    • CalendarEvent

      protected CalendarEvent()
      Default constructor
  • Method Details

    • create

      public static CalendarEvent create(Date start, Date end, boolean allDay, String header, String body, String type)
      Creates a Calendar Event and initialize it.
      Parameters:
      start - Date The date this event starts on. Should not be null.
      end - Date The date this event ends on. Should not be null.
      allDay - boolean this event to start and end on the same date as a Day unit
      header - String A text header used as a title or description of this event.
      body - String The description and information for this event.
      type - String A user defined value for defining the type of event.
      Returns:
      CalendarEvent
    • setStartDate

      public void setStartDate(Date m_startDate)
      Set the date this event starts on.
      Parameters:
      m_startDate - The start date set for this event.
    • getStartDate

      public Date getStartDate()
      Get start date of this event.
      Specified by:
      getStartDate in interface ICalendarEvent
      Returns:
      The start date set for this event.
    • getEndDate

      public Date getEndDate()
      Get end date of this event.
      Specified by:
      getEndDate in interface ICalendarEvent
      Returns:
      The end date set for this event.
    • setEndDate

      public void setEndDate(Date date)
      Set the Date this event ends on.
      Parameters:
      date - Date The end date for this event.
    • isAllDay

      public boolean isAllDay()
      Does this event start and end the same date as a Day unit.
      Specified by:
      isAllDay in interface ICalendarEvent
      Returns:
      boolean true if this event starts and ends the same date as a Day unit. Otherwise false;
    • setAllDay

      public void setAllDay(boolean day)
      Set this event to start and end the same date as a Day unit.
      Parameters:
      day - true - then this event starts and ends the same date as a Day unit.
      See Also:
    • getEventBody

      public String getEventBody()
      Get the text of the event body.
      Specified by:
      getEventBody in interface ICalendarEvent
      Returns:
      String Content of this event.
    • setEventBody

      public void setEventBody(String body)
      Set the text of the event body.
      Parameters:
      body - The Content of this event.
    • getEventHeader

      public String getEventHeader()
      Get event header that describes this event. May be considered a title of this event.
      Specified by:
      getEventHeader in interface ICalendarEvent
      Returns:
      String The description or title of this event.
    • setEventHeader

      public void setEventHeader(String header)
      Set event header that describes this event. May be considered a title of this event.
      Parameters:
      header - The description or title of this event.
    • getEventType

      public String getEventType()
      Get event type that for this event. A user defined value for defining the type of event.
      Specified by:
      getEventType in interface ICalendarEvent
      Returns:
      String A user defined type for this event.
    • setEventType

      public void setEventType(String type)
      Set event type that for this event. A user defined value for defining the type of event.
      Parameters:
      type - String A user defined type for this event.
    • compareTo

      public int compareTo(ICalendarEvent that)
      Implementation of Comparable Calendar Event Overrides Comparable implementation of compareTo. Compares start date then end date.
      Specified by:
      compareTo in interface Comparable<ICalendarEvent>
      Parameters:
      that - ICalendarEvent event to compare this event to.
      Returns:
      -1 if before, 0 if equal, 1 if after.