public class ExchangeConnector extends AbstractMessagingConnector
MessagingConnector.AttendeeInformation, MessagingConnector.FreeBusyStatus, MessagingConnector.ResponseType
Modifier and Type | Field and Description |
---|---|
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
private UserManager |
_userManager
The user manager
|
_userPopulationDAO
ROLE
Constructor and Description |
---|
ExchangeConnector() |
Modifier and Type | Method and Description |
---|---|
private MessagingConnector.ResponseType |
_getResponseStatus(microsoft.exchange.webservices.data.core.enumeration.property.MeetingResponseType meetingResponseType) |
private void |
_setAttendees(microsoft.exchange.webservices.data.core.service.item.Appointment appointment,
Map<String,Boolean> attendees) |
private void |
_setDataEvent(microsoft.exchange.webservices.data.core.ExchangeService service,
microsoft.exchange.webservices.data.core.service.item.Appointment appointment,
String title,
String description,
String place,
boolean isAllDay,
Date startDate,
Date endDate,
EventRecurrenceTypeEnum recurrenceType,
Date untilDate,
Map<String,Boolean> attendees) |
private void |
_setRecurrence(microsoft.exchange.webservices.data.core.service.item.Appointment appointment,
Date startDate,
EventRecurrenceTypeEnum recurrenceType,
Date untilDate) |
String |
createEvent(String title,
String description,
String place,
boolean isAllDay,
Date startDate,
Date endDate,
EventRecurrenceTypeEnum recurrenceType,
Date untilDate,
Map<String,Boolean> attendees,
UserIdentity organiser)
Create an event
|
void |
deleteEvent(String eventId,
UserIdentity organiser)
Delete an event
|
Map<String,MessagingConnector.AttendeeInformation> |
getAttendees(String eventId,
UserIdentity organiser)
Get the map of attendees for an event
|
Map<String,MessagingConnector.FreeBusyStatus> |
getFreeBusy(Date startDate,
Date endDate,
boolean isAllDay,
Set<String> attendees,
UserIdentity organiser)
Get free/busy status for attendees for a time window
|
protected microsoft.exchange.webservices.data.core.ExchangeService |
getService(UserIdentity userIdentity)
Get the service of connexion to the server exchange
|
protected static String |
html2text(String html)
Converts a given html String into a plain text String
|
protected List<EmailMessage> |
internalGetEmails(UserIdentity userIdentity,
int maxEmails)
Get emails (no caching)
|
protected int |
internalGetEmailsCount(UserIdentity userIdentity)
Get emails count (no caching)
|
protected List<CalendarEvent> |
internalGetEvents(UserIdentity userIdentity,
Date fromDate,
Date untilDate,
int maxEvents)
Get events between two date (no caching)
|
protected int |
internalGetEventsCount(UserIdentity userIdentity,
Date fromDate,
Date untilDate)
Get events count between two date (no caching)
|
boolean |
isEventExist(String eventId,
UserIdentity organiser)
True if the event exist in the messaging connector
|
boolean |
isUserExist(UserIdentity userIdentity)
True if the user exist
|
void |
service(ServiceManager manager) |
void |
setAttendees(String eventId,
Map<String,Boolean> attendees,
UserIdentity organiser)
Set attendees for an event
|
boolean |
supportInvitation()
Tell if the messaging connector supports event invitation
|
void |
updateEvent(String eventId,
String title,
String description,
String place,
boolean isAllDay,
Date startDate,
Date endDate,
EventRecurrenceTypeEnum recurrenceType,
Date untilDate,
Map<String,Boolean> attendees,
UserIdentity organiser)
Update an event
|
getAllowedPopulationIds, getEvents, getEventsCount, getUnreadEmailCount, getUnreadEmails, initialize, isAllowed
getLogger, setLogger
protected CurrentUserProvider _currentUserProvider
private UserManager _userManager
public ExchangeConnector()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractMessagingConnector
ServiceException
protected microsoft.exchange.webservices.data.core.ExchangeService getService(UserIdentity userIdentity) throws URISyntaxException
userIdentity
- The user identityURISyntaxException
- if an error occurredprotected List<CalendarEvent> internalGetEvents(UserIdentity userIdentity, Date fromDate, Date untilDate, int maxEvents) throws MessagingConnectorException
AbstractMessagingConnector
internalGetEvents
in class AbstractMessagingConnector
userIdentity
- The user identityfromDate
- The date to start searchuntilDate
- The date to end searchmaxEvents
- The maximum number of events to retrieveMessagingConnectorException
- if failed to get events from serverprotected int internalGetEventsCount(UserIdentity userIdentity, Date fromDate, Date untilDate) throws MessagingConnectorException
AbstractMessagingConnector
internalGetEventsCount
in class AbstractMessagingConnector
userIdentity
- The user identityfromDate
- The date to start searchuntilDate
- The date to end searchMessagingConnectorException
- if failed to get events from serverprotected List<EmailMessage> internalGetEmails(UserIdentity userIdentity, int maxEmails) throws MessagingConnectorException
AbstractMessagingConnector
internalGetEmails
in class AbstractMessagingConnector
userIdentity
- The user identitymaxEmails
- The maximum number of emails to retrieveMessagingConnectorException
- if failed to get events from serverprotected int internalGetEmailsCount(UserIdentity userIdentity) throws MessagingConnectorException
AbstractMessagingConnector
internalGetEmailsCount
in class AbstractMessagingConnector
userIdentity
- The user identityMessagingConnectorException
- if failed to get events from serverpublic boolean supportInvitation() throws MessagingConnectorException
MessagingConnector
supportInvitation
in interface MessagingConnector
supportInvitation
in class AbstractMessagingConnector
MessagingConnectorException
- if failed to get events from serverpublic boolean isEventExist(String eventId, UserIdentity organiser) throws MessagingConnectorException
MessagingConnector
isEventExist
in interface MessagingConnector
isEventExist
in class AbstractMessagingConnector
eventId
- the event idorganiser
- the organiserMessagingConnectorException
- if an error occurredpublic String createEvent(String title, String description, String place, boolean isAllDay, Date startDate, Date endDate, EventRecurrenceTypeEnum recurrenceType, Date untilDate, Map<String,Boolean> attendees, UserIdentity organiser) throws MessagingConnectorException
MessagingConnector
createEvent
in interface MessagingConnector
createEvent
in class AbstractMessagingConnector
title
- the event titledescription
- the event descriptionplace
- the event placeisAllDay
- if the event is all daystartDate
- the event start dateendDate
- the event end daterecurrenceType
- recurrence typeuntilDate
- until date of the recurring eventattendees
- the map of attendees (email -> optional or requested) to setorganiser
- the event organiserMessagingConnectorException
- if failed to get events from serverpublic void updateEvent(String eventId, String title, String description, String place, boolean isAllDay, Date startDate, Date endDate, EventRecurrenceTypeEnum recurrenceType, Date untilDate, Map<String,Boolean> attendees, UserIdentity organiser) throws MessagingConnectorException
MessagingConnector
updateEvent
in interface MessagingConnector
updateEvent
in class AbstractMessagingConnector
eventId
- the event id to deletetitle
- the event titledescription
- the event descriptionplace
- the event placeisAllDay
- if the event is all daystartDate
- the event start dateendDate
- the event end daterecurrenceType
- recurrence typeuntilDate
- until date of the recurring eventattendees
- the map of attendees (email -> optional or requested) to setorganiser
- the event organiserMessagingConnectorException
- if failed to get events from serverprivate void _setDataEvent(microsoft.exchange.webservices.data.core.ExchangeService service, microsoft.exchange.webservices.data.core.service.item.Appointment appointment, String title, String description, String place, boolean isAllDay, Date startDate, Date endDate, EventRecurrenceTypeEnum recurrenceType, Date untilDate, Map<String,Boolean> attendees) throws Exception
Exception
private void _setRecurrence(microsoft.exchange.webservices.data.core.service.item.Appointment appointment, Date startDate, EventRecurrenceTypeEnum recurrenceType, Date untilDate) throws Exception
Exception
public void deleteEvent(String eventId, UserIdentity organiser) throws MessagingConnectorException
MessagingConnector
deleteEvent
in interface MessagingConnector
deleteEvent
in class AbstractMessagingConnector
eventId
- the event id to deleteorganiser
- the event organiserMessagingConnectorException
- if failed to get events from serverpublic Map<String,MessagingConnector.AttendeeInformation> getAttendees(String eventId, UserIdentity organiser) throws MessagingConnectorException
MessagingConnector
getAttendees
in interface MessagingConnector
getAttendees
in class AbstractMessagingConnector
eventId
- the event idorganiser
- the event organiserMessagingConnectorException
- if failed to get events from serverpublic void setAttendees(String eventId, Map<String,Boolean> attendees, UserIdentity organiser) throws MessagingConnectorException
MessagingConnector
setAttendees
in interface MessagingConnector
setAttendees
in class AbstractMessagingConnector
eventId
- the event idattendees
- the map of attendees (email -> optional or requested) to setorganiser
- the event organiserMessagingConnectorException
- if failed to get events from serverpublic Map<String,MessagingConnector.FreeBusyStatus> getFreeBusy(Date startDate, Date endDate, boolean isAllDay, Set<String> attendees, UserIdentity organiser) throws MessagingConnectorException
MessagingConnector
getFreeBusy
in interface MessagingConnector
getFreeBusy
in class AbstractMessagingConnector
startDate
- the start dateendDate
- the end dateisAllDay
- true if is an allday eventattendees
- the list of attendees emailorganiser
- the event organiserMessagingConnectorException
- if failed to get events from serverpublic boolean isUserExist(UserIdentity userIdentity) throws MessagingConnectorException
MessagingConnector
isUserExist
in interface MessagingConnector
isUserExist
in class AbstractMessagingConnector
userIdentity
- the user identityMessagingConnectorException
- if failed to get events from serverprivate MessagingConnector.ResponseType _getResponseStatus(microsoft.exchange.webservices.data.core.enumeration.property.MeetingResponseType meetingResponseType)
private void _setAttendees(microsoft.exchange.webservices.data.core.service.item.Appointment appointment, Map<String,Boolean> attendees) throws Exception
Exception