Class MessagingConnectorCalendarManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.workspaces.calendars.MessagingConnectorCalendarManager
- All Implemented Interfaces:
Component
,Contextualizable
,LogEnabled
,Serviceable
public class MessagingConnectorCalendarManager
extends AbstractLogEnabled
implements Serviceable, Component, Contextualizable
Manager for manipulating messaging connector linked to calendars event of a project
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_createEvent
(JCRCalendarEvent event, UserIdentity organiser, List<CalendarEventAttendee> attendees) Create event in the messaging connectorprotected void
_editEvent
(JCRCalendarEvent event, UserIdentity organiser, List<CalendarEventAttendee> attendees) Edit event in the messaging connectorprotected List
<CalendarEventAttendee> _getAttendeeListFromParameter
(List<Map<String, Object>> attendeesList) Get attendees list from the attendees parameterprotected String
_getEventTitle
(JCRCalendarEvent event) Get the computed title of the eventprotected UserIdentity
_getUserFromParameter
(Map<String, Object> userMap) Get user from the user parametervoid
addEventInvitation
(Map<String, Object> parameters, String eventId) Add event invitation parameters (attendees and organiser)void
contextualize
(Context context) void
deleteEvent
(JCRCalendarEvent event) Delete event in the messaging connectorvoid
editEventInvitation
(Map<String, Object> parameters, String eventId) Edit event invitation parameters (attendees and organiser)Get the synchronized id (for messaging connector) of the eventboolean
isEventSynchronized
(String eventId) True if the event is synchronized in the messaging connectorvoid
service
(ServiceManager manager) void
setAttendees
(String eventId, List<CalendarEventAttendee> attendees) Set attendees to the eventvoid
setOrganiser
(String eventId, UserIdentity organiser) Set organiser to the eventvoid
setSynchronizedId
(JCRCalendarEvent event, String synchronizedId) Set the synchronized id (for messaging connector) to the eventMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
Avalon Role -
PROPERTY_SYNCHRONIZED_ID
Property's name for synchronized id id- See Also:
-
-
Constructor Details
-
MessagingConnectorCalendarManager
public MessagingConnectorCalendarManager()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
setSynchronizedId
Set the synchronized id (for messaging connector) to the event- Parameters:
event
- the eventsynchronizedId
- the synchronized id
-
getSynchronizedId
Get the synchronized id (for messaging connector) of the event- Parameters:
event
- the event- Returns:
- the synchronized id
-
setAttendees
Set attendees to the event- Parameters:
eventId
- the event idattendees
- the list of attendees
-
setOrganiser
Set organiser to the event- Parameters:
eventId
- the event idorganiser
- the organiser
-
addEventInvitation
Add event invitation parameters (attendees and organiser)- Parameters:
parameters
- the map of parameterseventId
- the event id
-
editEventInvitation
Edit event invitation parameters (attendees and organiser)- Parameters:
parameters
- the map of parameterseventId
- the event id
-
_createEvent
protected void _createEvent(JCRCalendarEvent event, UserIdentity organiser, List<CalendarEventAttendee> attendees) Create event in the messaging connector- Parameters:
event
- the eventorganiser
- the organiserattendees
- the list of attendee
-
deleteEvent
Delete event in the messaging connector- Parameters:
event
- the event
-
isEventSynchronized
True if the event is synchronized in the messaging connector- Parameters:
eventId
- the event id- Returns:
- true if the event exist
-
_editEvent
protected void _editEvent(JCRCalendarEvent event, UserIdentity organiser, List<CalendarEventAttendee> attendees) Edit event in the messaging connector- Parameters:
event
- the eventorganiser
- the organiserattendees
- the list of attendee
-
_getEventTitle
Get the computed title of the event- Parameters:
event
- the event- Returns:
- the computed title of the event
-
_getUserFromParameter
Get user from the user parameter- Parameters:
userMap
- the user map from parameters- Returns:
- the user
-
_getAttendeeListFromParameter
protected List<CalendarEventAttendee> _getAttendeeListFromParameter(List<Map<String, Object>> attendeesList) Get attendees list from the attendees parameter- Parameters:
attendeesList
- the attendees list from parameters- Returns:
- the attendees list
-