Class CalendarEventOccurrence
- java.lang.Object
-
- org.ametys.plugins.workspaces.calendars.events.CalendarEventOccurrence
-
public class CalendarEventOccurrence extends Object
Occurrence of a calendar event
-
-
Constructor Summary
Constructors Constructor Description CalendarEventOccurrence(CalendarEvent calendarEvent, ZonedDateTime occurrenceDate)Creates aCalendarEventOccurrence.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanafter(ZonedDateTime date)Check if the occurrence is after a given datebooleanbefore(ZonedDateTime date)Check if the occurrence is before a given dateZonedDateTimegetEndDate()Get the date of the end of the occurrenceCalendarEventgetEvent()Get the eventList<String>getResourceIds()Retrieves the resource id's list.ZonedDateTimegetStartDate()Get the date of the begin of the occurrencebooleanisFullDay()Get if the occurrence last all the dayvoidsetEndDate(ZonedDateTime endDate)Set the endDate of the occurrencevoidsetFullDay(boolean isFullDay)Set if the occurrence last all the dayvoidsetResourceIds(List<String> resourceIds)Set the resources idsvoidsetStartDate(ZonedDateTime startDate)Set the startDate of the occurrenceMap<String,Object>toJSON()occurrence info as a JSONizable map
-
-
-
Constructor Detail
-
CalendarEventOccurrence
public CalendarEventOccurrence(CalendarEvent calendarEvent, ZonedDateTime occurrenceDate)
Creates aCalendarEventOccurrence.- Parameters:
calendarEvent- the calendar eventoccurrenceDate- the occurrence date
-
-
Method Detail
-
getStartDate
public ZonedDateTime getStartDate()
Get the date of the begin of the occurrence- Returns:
- the date of the occurrence
-
setStartDate
public void setStartDate(ZonedDateTime startDate)
Set the startDate of the occurrence- Parameters:
startDate- the start date
-
getEndDate
public ZonedDateTime getEndDate()
Get the date of the end of the occurrence- Returns:
- the date of the occurrence
-
setEndDate
public void setEndDate(ZonedDateTime endDate)
Set the endDate of the occurrence- Parameters:
endDate- the end date
-
isFullDay
public boolean isFullDay()
Get if the occurrence last all the day- Returns:
- true if the occurrence last all the day
-
setFullDay
public void setFullDay(boolean isFullDay)
Set if the occurrence last all the day- Parameters:
isFullDay- true if the occurrence last all the day
-
getResourceIds
public List<String> getResourceIds()
Retrieves the resource id's list.- Returns:
- the resource id's list.
-
setResourceIds
public void setResourceIds(List<String> resourceIds)
Set the resources ids- Parameters:
resourceIds- The list of ressource ids
-
before
public boolean before(ZonedDateTime date)
Check if the occurrence is before a given date- Parameters:
date- the date- Returns:
- true if the occurrence is before a given date
-
after
public boolean after(ZonedDateTime date)
Check if the occurrence is after a given date- Parameters:
date- the date- Returns:
- true if the occurrence is after a given date
-
getEvent
public CalendarEvent getEvent()
Get the event- Returns:
- the event
-
-