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
-
Constructor Summary
-
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)getAttendees
(String eventId) Retrieves attendees to the eventgetFreeBusy
(String startDate, String endDate, boolean isAllDay, Map<String, Object> organiserMap, Map<String, String> attendeesList) Get the list of attendees email with their free/busy statusgetOrganiser
(String eventId) Retrieves organiser to the eventGet the synchronized id (for messaging connector) of the eventboolean
isEventStillSynchronized
(String eventId) True if the event is still synchronized in the messaging connectorboolean
isEventSynchronized
(String eventId) True if the event is synchronized in the messaging connectorboolean
isValidUser
(Map<String, Object> userAsMap) True if user exists in the messaging connectorvoid
service
(ServiceManager manager) void
setAttendees
(String eventId, List<CalendarEventAttendee> attendees) Set attendees to the eventvoid
setInvitations
(String eventId, Map<String, Object> organiserMap, List<Map<String, Object>> attendeesList) Set invitation 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 eventboolean
True if messaging connector support invitationMethods 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
-
_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
-
supportInvitation
True if messaging connector support invitation- Returns:
- true if messaging connector support invitation
-
isValidUser
True if user exists in the messaging connector- Parameters:
userAsMap
- the user- Returns:
- true if user exists in the messaging connector
-
isEventStillSynchronized
True if the event is still synchronized in the messaging connector- Parameters:
eventId
- the event id- Returns:
- true if the event exist
-
isEventSynchronized
True if the event is synchronized in the messaging connector- Parameters:
eventId
- the event id- Returns:
- true if the event exist
-
getFreeBusy
public Map<String,MessagingConnector.FreeBusyStatus> getFreeBusy(String startDate, String endDate, boolean isAllDay, Map<String, Object> organiserMap, Map<String, String> attendeesList) Get the list of attendees email with their free/busy status- Parameters:
startDate
- the start dateendDate
- the end dateisAllDay
- true if is all dayorganiserMap
- the organiser mapattendeesList
- the attendee list- Returns:
- the list of attendees email with their free/busy status
-
setInvitations
public void setInvitations(String eventId, Map<String, Object> organiserMap, List<Map<String, Object>> attendeesList) Set invitation to the event- Parameters:
eventId
- the event idorganiserMap
- the organiser mapattendeesList
- the attendees list
-
getAttendees
Retrieves attendees to the event- Parameters:
eventId
- the event id- Returns:
- The map of attendees
-
getOrganiser
Retrieves organiser to the event- Parameters:
eventId
- the event id- Returns:
- The organiser
-
_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
-