Package org.silverpeas.core.calendar
Class CalendarEventFilter
- java.lang.Object
-
- org.silverpeas.core.calendar.CalendarEventFilter
-
public class CalendarEventFilter extends Object
A filter to apply on the calendar events that occur in a given window of time.- Author:
- mmoquillon
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Calendar>
getCalendars()
Gets a list of calendars on which the events to filter must be planned.List<User>
getParticipants()
Gets a list of participants that should be concerned by the events to filter.Optional<Instant>
getSynchronizationDateLimit()
Gets the datetime before which all the last synchronization date of events should be.CalendarEventFilter
onCalendar(List<Calendar> calendars)
Filters on the specified calendars.CalendarEventFilter
onCalendar(Calendar... calendars)
Filters on the specified calendars.CalendarEventFilter
onParticipants(Collection<User> users)
Filters on the specified participants for an event.CalendarEventFilter
onParticipants(User... users)
Filters on the specified participants for an event.CalendarEventFilter
onSynchronizationDateLimit(Instant dateTime)
Filters on the specified synchronization datetime limit.
-
-
-
Method Detail
-
onCalendar
public CalendarEventFilter onCalendar(Calendar... calendars)
Filters on the specified calendars.- Parameters:
calendars
- one or several calendars in which the events will have to be fetched.- Returns:
- itself.
-
onCalendar
public CalendarEventFilter onCalendar(List<Calendar> calendars)
Filters on the specified calendars.- Parameters:
calendars
- one or several calendars in which the events will have to be fetched.- Returns:
- itself.
-
onParticipants
public CalendarEventFilter onParticipants(User... users)
Filters on the specified participants for an event. A participant can be the author or an attendee of an event.- Parameters:
users
- the users in Silverpeas that participate for at least one event.- Returns:
- itself.
-
onParticipants
public CalendarEventFilter onParticipants(Collection<User> users)
Filters on the specified participants for an event. A participant can be the author or an attendee of an event.- Parameters:
users
- the users in Silverpeas that participate for at least one event.- Returns:
- itself.
-
onSynchronizationDateLimit
public CalendarEventFilter onSynchronizationDateLimit(Instant dateTime)
Filters on the specified synchronization datetime limit. Only events being synchronized before the specified datetime will be taken into account.- Parameters:
dateTime
- anOffsetDateTime
the last synchronization date of events shouldn't be after.- Returns:
- itself.
-
getCalendars
public List<Calendar> getCalendars()
Gets a list of calendars on which the events to filter must be planned.- Returns:
- a list of calendars or an empty list if there is no filter on calendars.
-
getParticipants
public List<User> getParticipants()
Gets a list of participants that should be concerned by the events to filter. A participant is a Silverpeas user that is the author or an attendee for an event.- Returns:
- a list of users participating for at least one event or an empty list if there is no filter on participants.
-
-