public class MessagingConnectorCalendarManager extends AbstractLogEnabled implements Serviceable, Component, Contextualizable
Modifier and Type | Field and Description |
---|---|
private Context |
_context |
private CurrentUserProvider |
_currentUserProvider |
private I18nUtils |
_i18nUtils |
private MessagingConnector |
_messagingConnector |
private ObservationManager |
_observationManager |
private ProjectManager |
_projectManager |
private AmetysObjectResolver |
_resolver |
private UserManager |
_userManager |
static String |
PROPERTY_SYNCHRONIZED_ID
Property's name for synchronized id id
|
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
MessagingConnectorCalendarManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
_createEvent(JCRCalendarEvent event,
UserIdentity organiser,
List<CalendarEventAttendee> attendees)
Create event in the messaging connector
|
protected void |
_editEvent(JCRCalendarEvent event,
UserIdentity organiser,
List<CalendarEventAttendee> attendees)
Edit event in the messaging connector
|
protected List<CalendarEventAttendee> |
_getAttendeeListFromParameter(List<Map<String,Object>> attendeesList)
Get attendees list from the attendees parameter
|
protected String |
_getEventTitle(JCRCalendarEvent event)
Get the computed title of the event
|
protected UserIdentity |
_getUserFromParameter(Map<String,Object> userMap)
Get user from the user parameter
|
void |
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 connector
|
void |
editEventInvitation(Map<String,Object> parameters,
String eventId)
Edit event invitation parameters (attendees and organiser)
|
Map<String,Object> |
getAttendees(String eventId)
Retrieves attendees to the event
|
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
|
Map<String,Object> |
getOrganiser(String eventId)
Retrieves organiser to the event
|
String |
getSynchronizedId(JCRCalendarEvent event)
Get the synchronized id (for messaging connector) of the event
|
boolean |
isEventStillSynchronized(String eventId)
True if the event is still synchronized in the messaging connector
|
boolean |
isEventSynchronized(String eventId)
True if the event is synchronized in the messaging connector
|
boolean |
isValidUser(Map<String,Object> userAsMap)
True if user exists in the messaging connector
|
void |
service(ServiceManager manager) |
void |
setAttendees(String eventId,
List<CalendarEventAttendee> attendees)
Set attendees to the event
|
void |
setInvitations(String eventId,
Map<String,Object> organiserMap,
List<Map<String,Object>> attendeesList)
Set invitation to the event
|
void |
setOrganiser(String eventId,
UserIdentity organiser)
Set organiser to the event
|
void |
setSynchronizedId(JCRCalendarEvent event,
String synchronizedId)
Set the synchronized id (for messaging connector) to the event
|
boolean |
supportInvitation()
True if messaging connector support invitation
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final String PROPERTY_SYNCHRONIZED_ID
private MessagingConnector _messagingConnector
private UserManager _userManager
private AmetysObjectResolver _resolver
private ObservationManager _observationManager
private CurrentUserProvider _currentUserProvider
private ProjectManager _projectManager
private I18nUtils _i18nUtils
public MessagingConnectorCalendarManager()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void setSynchronizedId(JCRCalendarEvent event, String synchronizedId)
event
- the eventsynchronizedId
- the synchronized idpublic String getSynchronizedId(JCRCalendarEvent event)
event
- the eventpublic void setAttendees(String eventId, List<CalendarEventAttendee> attendees)
eventId
- the event idattendees
- the list of attendeespublic void setOrganiser(String eventId, UserIdentity organiser)
eventId
- the event idorganiser
- the organiserpublic void addEventInvitation(Map<String,Object> parameters, String eventId)
parameters
- the map of parameterseventId
- the event idpublic void editEventInvitation(Map<String,Object> parameters, String eventId)
parameters
- the map of parameterseventId
- the event idprotected void _createEvent(JCRCalendarEvent event, UserIdentity organiser, List<CalendarEventAttendee> attendees)
event
- the eventorganiser
- the organiserattendees
- the list of attendeepublic void deleteEvent(JCRCalendarEvent event)
event
- the eventprotected void _editEvent(JCRCalendarEvent event, UserIdentity organiser, List<CalendarEventAttendee> attendees)
event
- the eventorganiser
- the organiserattendees
- the list of attendeeprotected String _getEventTitle(JCRCalendarEvent event)
event
- the eventpublic boolean supportInvitation()
public boolean isValidUser(Map<String,Object> userAsMap)
userAsMap
- the userpublic boolean isEventStillSynchronized(String eventId)
eventId
- the event idpublic boolean isEventSynchronized(String eventId)
eventId
- the event idpublic Map<String,MessagingConnector.FreeBusyStatus> getFreeBusy(String startDate, String endDate, boolean isAllDay, Map<String,Object> organiserMap, Map<String,String> attendeesList)
startDate
- the start dateendDate
- the end dateisAllDay
- true if is all dayorganiserMap
- the organiser mapattendeesList
- the attendee listpublic void setInvitations(String eventId, Map<String,Object> organiserMap, List<Map<String,Object>> attendeesList)
eventId
- the event idorganiserMap
- the organiser mapattendeesList
- the attendees listpublic Map<String,Object> getAttendees(String eventId)
eventId
- the event idpublic Map<String,Object> getOrganiser(String eventId)
eventId
- the event idprotected UserIdentity _getUserFromParameter(Map<String,Object> userMap)
userMap
- the user map from parametersprotected List<CalendarEventAttendee> _getAttendeeListFromParameter(List<Map<String,Object>> attendeesList)
attendeesList
- the attendees list from parameters