Class CalendarEvent
java.lang.Object
com.webmethods.caf.faces.data.calendar.CalendarEvent
- All Implemented Interfaces:
ICalendarEvent
,Comparable<ICalendarEvent>
Calendar event.
Defines the date range for this event.
Contains the event header, body, and type.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ICalendarEvent that) Implementation of Comparable Calendar Event Overrides Comparableimplementation of compareTo. static CalendarEvent
Creates a Calendar Event and initialize it.Get end date of this event.Get the text of the event body.Get event header that describes this event.Get event type that for this event.Get start date of this event.boolean
isAllDay()
Does this event start and end the same date as a Day unit.void
setAllDay
(boolean day) Set this event to start and end the same date as a Day unit.void
setEndDate
(Date date) Set the Date this event ends on.void
setEventBody
(String body) Set the text of the event body.void
setEventHeader
(String header) Set event header that describes this event.void
setEventType
(String type) Set event type that for this event.void
setStartDate
(Date m_startDate) Set the date this event starts on.
-
Field Details
-
m_endDate
-
m_allDay
protected boolean m_allDay -
m_eventHeader
-
m_eventBody
-
m_eventStyle
-
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 unitheader
- 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
Set the date this event starts on.- Parameters:
m_startDate
- The start date set for this event.
-
getStartDate
Get start date of this event.- Specified by:
getStartDate
in interfaceICalendarEvent
- Returns:
- The start date set for this event.
-
getEndDate
Get end date of this event.- Specified by:
getEndDate
in interfaceICalendarEvent
- Returns:
- The end date set for this event.
-
setEndDate
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 interfaceICalendarEvent
- 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
Get the text of the event body.- Specified by:
getEventBody
in interfaceICalendarEvent
- Returns:
- String Content of this event.
-
setEventBody
Set the text of the event body.- Parameters:
body
- The Content of this event.
-
getEventHeader
Get event header that describes this event. May be considered a title of this event.- Specified by:
getEventHeader
in interfaceICalendarEvent
- Returns:
- String The description or title of this event.
-
setEventHeader
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
Get event type that for this event. A user defined value for defining the type of event.- Specified by:
getEventType
in interfaceICalendarEvent
- Returns:
- String A user defined type for this event.
-
setEventType
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
Implementation of Comparable Calendar Event Overrides Comparableimplementation of compareTo. Compares start date then end date. - Specified by:
compareTo
in interfaceComparable<ICalendarEvent>
- Parameters:
that
- ICalendarEvent event to compare this event to.- Returns:
- -1 if before, 0 if equal, 1 if after.
-