Interface CalendarEvent
- All Superinterfaces:
Cloneable
,Comparable<CalendarEvent>
- All Known Subinterfaces:
RecurringEvent
- All Known Implementing Classes:
CalendarEventImpl
,FullDayRecurringEvent
,RecurringEventImpl
This is a simple calendar event that has a start date and optionally and end date. If no end date is specified and the start date is of type "date" (no time information), the event lasts the whole day.
Start and end date must have the same time zone and must be of same type - which means either both are date-only values, or both are date-time values.
Its "natural" ordering is defined by the start dates of the event.
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a deep copy of this event.org.joda.time.Instant
created()
@Nullable Calendar
If this event is attached to a calendar, this returns the calender that this event belongs to.@Nullable String
The full description.@Nullable DateTimeValue
getEnd()
@Nullable Entity
getId()
The unique id of a calendar event.getLabel()
A short summary of this event.getStart()
getTargetEntity
(@Nullable Context ctx) Resolves and returns the target entity of the relation defined from this calendar event entity.getTargetEntity
(String relationName, @Nullable Context ctx) org.joda.time.DateTimeZone
A shortcut for#getStart().getTimeZone()
boolean
isAllDay()
Returns whether this is an allday event.boolean
resolveRelation
(@Nullable Context ctx) Resolves the relation from this calendar event entity.resolveRelation
(String relationName, @Nullable Context ctx) void
save()
Saves all properties of this event to the database.void
saveAndLink
(String relationName, Entity target) Saves this calendar event into the database and links it to the specified target entity.void
void
setDescription
(String descr) void
setEnd
(@Nullable DateTimeValue end) void
void
setLocation
(String location) void
setOccurrence
(boolean occurrence) void
setOnlineMeetingUrl
(URI onlineMeetingUrl) void
setStart
(DateTimeValue start) void
setStartAndEnd
(DateTimeValue start, @Nullable DateTimeValue end) Sets start and end date and checks for valid values.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getId
UUID getId()The unique id of a calendar event. This is unique across all calendar events of all calendars. -
getCalendar
If this event is attached to a calendar, this returns the calender that this event belongs to. -
getLabel
String getLabel()A short summary of this event. -
setLabel
-
getDescription
The full description. -
setDescription
-
created
org.joda.time.Instant created()- Returns:
- the timestamp when this event has been created.
-
isAllDay
boolean isAllDay()Returns whether this is an allday event. Allday events have only a start value. -
getStart
DateTimeValue getStart()- Returns:
- the start of this event
-
setStartAndEnd
Sets start and end date and checks for valid values. -
setStart
-
setEnd
-
getEnd
-
getTimeZone
org.joda.time.DateTimeZone getTimeZone()A shortcut for#getStart().getTimeZone()
-
isOccurrence
boolean isOccurrence()- Returns:
- whether this calendar event is part of a recurrence set that has been generated
-
setOccurrence
void setOccurrence(boolean occurrence) -
clone
Creates a deep copy of this event.- Throws:
CloneNotSupportedException
-
resolveRelation
Resolves the relation from this calendar event entity. The relation is defined on the calendar of this event.
- Throws:
CalendarDataAccessException
-
resolveRelation
Relation resolveRelation(String relationName, @Nullable @Nullable Context ctx) throws CalendarDataAccessException - Throws:
CalendarDataAccessException
-
getTargetEntity
Resolves and returns the target entity of the relation defined from this calendar event entity. The relation is defined on the calendar of this event.
- Throws:
CalendarDataAccessException
-
getTargetEntity
Entity getTargetEntity(String relationName, @Nullable @Nullable Context ctx) throws CalendarDataAccessException - Throws:
CalendarDataAccessException
-
saveAndLink
Saves this calendar event into the database and links it to the specified target entity. The event must be associated to a calender which is saved if not already present in the database, too. -
save
void save()Saves all properties of this event to the database. -
saveAndRelateCalendar
void saveAndRelateCalendar() -
getEntity
- Returns:
- the entity representing this calendar event, or null if none is found
-
setLocation
-
getLocation
String getLocation() -
setOnlineMeetingUrl
-
getOnlineMeetingUrl
URI getOnlineMeetingUrl()
-