Package org.exoplatform.agenda.service
Class AgendaEventServiceImpl
java.lang.Object
org.exoplatform.agenda.service.AgendaEventServiceImpl
- All Implemented Interfaces:
org.exoplatform.agenda.service.AgendaEventService
public class AgendaEventServiceImpl
extends Object
implements org.exoplatform.agenda.service.AgendaEventService
-
Field Summary
Fields inherited from interface org.exoplatform.agenda.service.AgendaEventService
CALENDAR_EDITED_BY_SHAREE_EVENT -
Constructor Summary
ConstructorsConstructorDescriptionAgendaEventServiceImpl(org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.service.AgendaEventAttendeeService attendeeService, org.exoplatform.agenda.service.AgendaEventConferenceService conferenceService, org.exoplatform.agenda.service.AgendaEventReminderService reminderService, org.exoplatform.agenda.service.AgendaRemoteEventService remoteEventService, org.exoplatform.agenda.service.AgendaEventDatePollService datePollService, AgendaSearchConnector agendaSearchConnector, AgendaEventStorage agendaEventStorage, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.social.metadata.MetadataService metadataService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccessEvent(org.exoplatform.agenda.model.Event event, long identityId) booleancanCreateEvent(org.exoplatform.agenda.model.Calendar calendar, long userIdentityId) Never in a subscribed calendar (EXO-90278), whose events come from its feed alone.booleancanUpdateEvent(org.exoplatform.agenda.model.Event event, long userIdentityId) longcountEventDatePolls(List<Long> ownerIds, long userIdentityId) longcountPendingEvents(List<Long> ownerIds, long userIdentityId) org.exoplatform.agenda.model.EventcreateEvent(org.exoplatform.agenda.model.Event event, List<org.exoplatform.agenda.model.EventAttendee> attendees, List<org.exoplatform.agenda.model.EventConference> conferences, List<org.exoplatform.agenda.model.EventReminder> reminders, List<org.exoplatform.agenda.model.EventDateOption> dateOptions, org.exoplatform.agenda.model.RemoteEvent remoteEvent, boolean sendInvitation, boolean confirmClose, long userIdentityId) org.exoplatform.agenda.model.EventcreateEventExceptionalOccurrence(long eventId, List<org.exoplatform.agenda.model.EventAttendee> attendees, List<org.exoplatform.agenda.model.EventConference> conferences, List<org.exoplatform.agenda.model.EventReminder> reminders, ZonedDateTime occurrenceId) org.exoplatform.agenda.model.EventdeleteEventById(long eventId, long userIdentityId) org.exoplatform.agenda.constant.EventAccessgetEventAccess(org.exoplatform.agenda.model.Event event, long identityId) org.exoplatform.agenda.model.EventgetEventById(long eventId) org.exoplatform.agenda.model.EventgetEventById(long eventId, ZoneId timeZone, long userIdentityId) List<org.exoplatform.agenda.model.Event> getEventDatePolls(org.exoplatform.agenda.model.EventFilter eventFilter, ZoneId userTimeZone, long userIdentityId) org.exoplatform.agenda.model.EventgetEventOccurrence(long parentEventId, ZonedDateTime occurrenceId, ZoneId timeZone, long userIdentityId) List<org.exoplatform.agenda.model.Event> getEventOccurrencesInPeriod(org.exoplatform.agenda.model.Event recurrentEvent, ZonedDateTime start, ZonedDateTime end, ZoneId timezone, int limit) List<org.exoplatform.agenda.model.Event> getEvents(org.exoplatform.agenda.model.EventFilter eventFilter, ZoneId userTimeZone, long userIdentityId) org.exoplatform.agenda.model.EventgetExceptionalOccurrenceEvent(long eventId, ZonedDateTime occurrenceId) List<org.exoplatform.agenda.model.Event> getExceptionalOccurrenceEvents(long parentEventId, ZoneId timeZone, long userIdentityId) List<org.exoplatform.agenda.model.Event> getParentRecurrentEvents(ZonedDateTime start, ZonedDateTime end, ZoneId timeZone) List<org.exoplatform.agenda.model.Event> getPendingEvents(List<Long> ownerIds, long userIdentityId, ZoneId userTimeZone, int offset, int limit) moveExceptionalOccurrences(long fromEventId, long toEventId, ZonedDateTime fromDate, long userIdentityId) org.exoplatform.agenda.model.EventsaveEventExceptionalOccurrence(long eventId, ZonedDateTime occurrenceId) List<org.exoplatform.agenda.model.EventSearchResult> search(org.exoplatform.agenda.model.AgendaEventSearchFilter filter) voidselectEventDateOption(long eventId, long dateOptionId, long userIdentityId) voidsetCalendarShareAccess(CalendarShareAccess calendarShareAccess) Replaces how calendar shares are looked up, for tests: the default resolves the share service from the container on first use.voidsetCalendarSubscriptionAccess(CalendarSubscriptionAccess calendarSubscriptionAccess) Replaces how the calendars of an owner's subscriptions are looked up, for tests: the default resolves the subscription service from the container on first use.org.exoplatform.agenda.model.EventsplitEvent(long seriesId, org.exoplatform.agenda.model.EventSplit split, ZonedDateTime splitFrom, boolean sendInvitation, boolean confirmClose, long userIdentityId) org.exoplatform.agenda.model.EventupdateEvent(org.exoplatform.agenda.model.Event event, List<org.exoplatform.agenda.model.EventAttendee> attendees, List<org.exoplatform.agenda.model.EventConference> conferences, List<org.exoplatform.agenda.model.EventReminder> reminders, List<org.exoplatform.agenda.model.EventDateOption> dateOptions, org.exoplatform.agenda.model.RemoteEvent remoteEvent, boolean sendInvitation, boolean confirmClose, long userIdentityId) voidupdateEventFields(long eventId, Map<String, List<String>> fields, boolean updateAllOccurrences, boolean sendInvitations, boolean confirmClose, long userIdentityId) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.exoplatform.agenda.service.AgendaEventService
createEvent, updateEvent, updateEventFields
-
Constructor Details
-
AgendaEventServiceImpl
public AgendaEventServiceImpl(org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.service.AgendaEventAttendeeService attendeeService, org.exoplatform.agenda.service.AgendaEventConferenceService conferenceService, org.exoplatform.agenda.service.AgendaEventReminderService reminderService, org.exoplatform.agenda.service.AgendaRemoteEventService remoteEventService, org.exoplatform.agenda.service.AgendaEventDatePollService datePollService, AgendaSearchConnector agendaSearchConnector, AgendaEventStorage agendaEventStorage, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.social.metadata.MetadataService metadataService)
-
-
Method Details
-
getEventById
public org.exoplatform.agenda.model.Event getEventById(long eventId, ZoneId timeZone, long userIdentityId) throws IllegalAccessException - Specified by:
getEventByIdin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessException
-
getEventById
public org.exoplatform.agenda.model.Event getEventById(long eventId) - Specified by:
getEventByIdin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
getEventOccurrence
public org.exoplatform.agenda.model.Event getEventOccurrence(long parentEventId, ZonedDateTime occurrenceId, ZoneId timeZone, long userIdentityId) throws IllegalAccessException - Specified by:
getEventOccurrencein interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessException
-
getExceptionalOccurrenceEvents
public List<org.exoplatform.agenda.model.Event> getExceptionalOccurrenceEvents(long parentEventId, ZoneId timeZone, long userIdentityId) throws IllegalAccessException - Specified by:
getExceptionalOccurrenceEventsin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessException
-
getExceptionalOccurrenceEvent
public org.exoplatform.agenda.model.Event getExceptionalOccurrenceEvent(long eventId, ZonedDateTime occurrenceId) - Specified by:
getExceptionalOccurrenceEventin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
createEvent
public org.exoplatform.agenda.model.Event createEvent(org.exoplatform.agenda.model.Event event, List<org.exoplatform.agenda.model.EventAttendee> attendees, List<org.exoplatform.agenda.model.EventConference> conferences, List<org.exoplatform.agenda.model.EventReminder> reminders, List<org.exoplatform.agenda.model.EventDateOption> dateOptions, org.exoplatform.agenda.model.RemoteEvent remoteEvent, boolean sendInvitation, boolean confirmClose, long userIdentityId) throws IllegalAccessException, org.exoplatform.agenda.exception.AgendaException - Specified by:
createEventin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessExceptionorg.exoplatform.agenda.exception.AgendaException
-
moveExceptionalOccurrences
public List<Long> moveExceptionalOccurrences(long fromEventId, long toEventId, ZonedDateTime fromDate, long userIdentityId) throws IllegalAccessException, org.exoplatform.agenda.exception.AgendaException - Specified by:
moveExceptionalOccurrencesin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessExceptionorg.exoplatform.agenda.exception.AgendaException
-
splitEvent
public org.exoplatform.agenda.model.Event splitEvent(long seriesId, org.exoplatform.agenda.model.EventSplit split, ZonedDateTime splitFrom, boolean sendInvitation, boolean confirmClose, long userIdentityId) throws IllegalAccessException, org.exoplatform.agenda.exception.AgendaException - Specified by:
splitEventin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessExceptionorg.exoplatform.agenda.exception.AgendaException
-
saveEventExceptionalOccurrence
public org.exoplatform.agenda.model.Event saveEventExceptionalOccurrence(long eventId, ZonedDateTime occurrenceId) throws org.exoplatform.agenda.exception.AgendaException - Specified by:
saveEventExceptionalOccurrencein interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
org.exoplatform.agenda.exception.AgendaException
-
createEventExceptionalOccurrence
public org.exoplatform.agenda.model.Event createEventExceptionalOccurrence(long eventId, List<org.exoplatform.agenda.model.EventAttendee> attendees, List<org.exoplatform.agenda.model.EventConference> conferences, List<org.exoplatform.agenda.model.EventReminder> reminders, ZonedDateTime occurrenceId) throws org.exoplatform.agenda.exception.AgendaException - Specified by:
createEventExceptionalOccurrencein interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
org.exoplatform.agenda.exception.AgendaException
-
updateEvent
public org.exoplatform.agenda.model.Event updateEvent(org.exoplatform.agenda.model.Event event, List<org.exoplatform.agenda.model.EventAttendee> attendees, List<org.exoplatform.agenda.model.EventConference> conferences, List<org.exoplatform.agenda.model.EventReminder> reminders, List<org.exoplatform.agenda.model.EventDateOption> dateOptions, org.exoplatform.agenda.model.RemoteEvent remoteEvent, boolean sendInvitation, boolean confirmClose, long userIdentityId) throws org.exoplatform.agenda.exception.AgendaException, IllegalAccessException - Specified by:
updateEventin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
org.exoplatform.agenda.exception.AgendaExceptionIllegalAccessException
-
updateEventFields
public void updateEventFields(long eventId, Map<String, List<String>> fields, boolean updateAllOccurrences, boolean sendInvitations, boolean confirmClose, long userIdentityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.agenda.exception.AgendaException- Specified by:
updateEventFieldsin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.agenda.exception.AgendaException
-
deleteEventById
public org.exoplatform.agenda.model.Event deleteEventById(long eventId, long userIdentityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
deleteEventByIdin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
setCalendarSubscriptionAccess
Replaces how the calendars of an owner's subscriptions are looked up, for tests: the default resolves the subscription service from the container on first use.- Parameters:
calendarSubscriptionAccess- the lookup
-
getEvents
public List<org.exoplatform.agenda.model.Event> getEvents(org.exoplatform.agenda.model.EventFilter eventFilter, ZoneId userTimeZone, long userIdentityId) throws IllegalAccessException - Specified by:
getEventsin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessException
-
getParentRecurrentEvents
public List<org.exoplatform.agenda.model.Event> getParentRecurrentEvents(ZonedDateTime start, ZonedDateTime end, ZoneId timeZone) - Specified by:
getParentRecurrentEventsin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
canAccessEvent
public boolean canAccessEvent(org.exoplatform.agenda.model.Event event, long identityId) - Specified by:
canAccessEventin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
getEventAccess
public org.exoplatform.agenda.constant.EventAccess getEventAccess(org.exoplatform.agenda.model.Event event, long identityId) The reading that existed before sharing — the reader may see the calendar, or is invited — is
EventAccess.FULL; a reader admitted only by a share record (EXO-90357) isEventAccess.SHAREDwhen the share is for viewing andEventAccess.SHARED_EDITwhen it is for editing (EXO-90378), and only a user can be either: a share names a user, never a space or a guest. The share is asked last, so nobody who could read before is ever read as a sharee, and it is asked once — the level comes back with the answer, from the reader's own cached map.- Specified by:
getEventAccessin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
canUpdateEvent
public boolean canUpdateEvent(org.exoplatform.agenda.model.Event event, long userIdentityId) - Specified by:
canUpdateEventin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
canCreateEvent
public boolean canCreateEvent(org.exoplatform.agenda.model.Calendar calendar, long userIdentityId) Never in a subscribed calendar (EXO-90278), whose events come from its feed alone. A colleague holding an edit share on a personal calendar creates in it as its owner would (EXO-90378).- Specified by:
canCreateEventin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
search
public List<org.exoplatform.agenda.model.EventSearchResult> search(org.exoplatform.agenda.model.AgendaEventSearchFilter filter) - Specified by:
searchin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
getEventOccurrencesInPeriod
public List<org.exoplatform.agenda.model.Event> getEventOccurrencesInPeriod(org.exoplatform.agenda.model.Event recurrentEvent, ZonedDateTime start, ZonedDateTime end, ZoneId timezone, int limit) - Specified by:
getEventOccurrencesInPeriodin interfaceorg.exoplatform.agenda.service.AgendaEventService
-
selectEventDateOption
public void selectEventDateOption(long eventId, long dateOptionId, long userIdentityId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
selectEventDateOptionin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getPendingEvents
public List<org.exoplatform.agenda.model.Event> getPendingEvents(List<Long> ownerIds, long userIdentityId, ZoneId userTimeZone, int offset, int limit) throws Exception - Specified by:
getPendingEventsin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
Exception
-
countPendingEvents
- Specified by:
countPendingEventsin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
Exception
-
getEventDatePolls
public List<org.exoplatform.agenda.model.Event> getEventDatePolls(org.exoplatform.agenda.model.EventFilter eventFilter, ZoneId userTimeZone, long userIdentityId) throws IllegalAccessException - Specified by:
getEventDatePollsin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessException
-
countEventDatePolls
public long countEventDatePolls(List<Long> ownerIds, long userIdentityId) throws IllegalAccessException - Specified by:
countEventDatePollsin interfaceorg.exoplatform.agenda.service.AgendaEventService- Throws:
IllegalAccessException