Package org.exoplatform.agenda.storage
Class AgendaCalendarStorage
java.lang.Object
org.exoplatform.agenda.storage.AgendaCalendarStorage
- Direct Known Subclasses:
CachedAgendaCalendarStorage
-
Constructor Summary
ConstructorsConstructorDescriptionAgendaCalendarStorage(AgendaEventStorage agendaEventStorage, CalendarDAO calendarDAO, org.exoplatform.services.listener.ListenerService listenerService) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcalendarDeleted(long calendarId) Called once a calendar is deleted, before its deletion is broadcast; a caching subclass forgets it here.intcountCalendarsByOwners(Long... ownerIds) org.exoplatform.agenda.model.CalendarcreateCalendar(org.exoplatform.agenda.model.Calendar calendar) voiddeleteCalendarById(long calendarId) getAllCalendarIdsByOwnerId(long ownerId) Every calendar id of an owner, subscribed calendars included.org.exoplatform.agenda.model.CalendargetCalendarById(long calendarId) getCalendarIdsByOwnerIds(int offset, int limit, Long... ownerIds) getSystemCalendarIdByOwnerId(long ownerId) Retrieves the technical identifier of the system (default) calendar of a given owner.moveCalendarEvents(long fromCalendarId, long toCalendarId, long modifierId) Moves all events of a calendar to another calendar, then broadcasts oneexo.agenda.event.movedevent per moved event so that listeners (Elasticsearch indexing, connectors) converge on the new calendar membership.voidupdateCalendar(org.exoplatform.agenda.model.Calendar calendar)
-
Constructor Details
-
AgendaCalendarStorage
public AgendaCalendarStorage(AgendaEventStorage agendaEventStorage, CalendarDAO calendarDAO, org.exoplatform.services.listener.ListenerService listenerService)
-
-
Method Details
-
getCalendarIdsByOwnerIds
-
getAllCalendarIdsByOwnerId
Every calendar id of an owner, subscribed calendars included.- Parameters:
ownerId- technical identifier of the calendar owner identity- Returns:
- the ids, possibly empty
-
getSystemCalendarIdByOwnerId
Retrieves the technical identifier of the system (default) calendar of a given owner.- Parameters:
ownerId- technical identifier of the calendar owner identity- Returns:
- technical identifier of the owner's system calendar, or
nullwhen the owner has no system calendar
-
countCalendarsByOwners
-
getCalendarById
public org.exoplatform.agenda.model.Calendar getCalendarById(long calendarId) -
createCalendar
public org.exoplatform.agenda.model.Calendar createCalendar(org.exoplatform.agenda.model.Calendar calendar) -
updateCalendar
public void updateCalendar(org.exoplatform.agenda.model.Calendar calendar) -
moveCalendarEvents
Moves all events of a calendar to another calendar, then broadcasts oneexo.agenda.event.movedevent per moved event so that listeners (Elasticsearch indexing, connectors) converge on the new calendar membership. No business logic here: the decision of what to move and where belongs to the service layer.- Parameters:
fromCalendarId- technical identifier of the calendar the events are moved away fromtoCalendarId- technical identifier of the calendar receiving the eventsmodifierId-Identitytechnical identifier of the user who triggered the move- Returns:
Listof technical identifiers of the moved events, empty when the source calendar had no events
-
deleteCalendarById
public void deleteCalendarById(long calendarId) -
calendarDeleted
protected void calendarDeleted(long calendarId) Called once a calendar is deleted, before its deletion is broadcast; a caching subclass forgets it here.- Parameters:
calendarId- the deleted calendar
-