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
|
_userPopulationDAOROLE| 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, isAllowedgetLogger, setLoggerprotected CurrentUserProvider _currentUserProvider
private UserManager _userManager
public ExchangeConnector()
public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class AbstractMessagingConnectorServiceExceptionprotected 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
AbstractMessagingConnectorinternalGetEvents in class AbstractMessagingConnectoruserIdentity - 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
AbstractMessagingConnectorinternalGetEventsCount in class AbstractMessagingConnectoruserIdentity - 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
AbstractMessagingConnectorinternalGetEmails in class AbstractMessagingConnectoruserIdentity - The user identitymaxEmails - The maximum number of emails to retrieveMessagingConnectorException - if failed to get events from serverprotected int internalGetEmailsCount(UserIdentity userIdentity) throws MessagingConnectorException
AbstractMessagingConnectorinternalGetEmailsCount in class AbstractMessagingConnectoruserIdentity - The user identityMessagingConnectorException - if failed to get events from serverpublic boolean supportInvitation() throws MessagingConnectorException
MessagingConnectorsupportInvitation in interface MessagingConnectorsupportInvitation in class AbstractMessagingConnectorMessagingConnectorException - if failed to get events from serverpublic boolean isEventExist(String eventId, UserIdentity organiser) throws MessagingConnectorException
MessagingConnectorisEventExist in interface MessagingConnectorisEventExist in class AbstractMessagingConnectoreventId - 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
MessagingConnectorcreateEvent in interface MessagingConnectorcreateEvent in class AbstractMessagingConnectortitle - 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
MessagingConnectorupdateEvent in interface MessagingConnectorupdateEvent in class AbstractMessagingConnectoreventId - 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
Exceptionprivate void _setRecurrence(microsoft.exchange.webservices.data.core.service.item.Appointment appointment, Date startDate, EventRecurrenceTypeEnum recurrenceType, Date untilDate) throws Exception
Exceptionpublic void deleteEvent(String eventId, UserIdentity organiser) throws MessagingConnectorException
MessagingConnectordeleteEvent in interface MessagingConnectordeleteEvent in class AbstractMessagingConnectoreventId - 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
MessagingConnectorgetAttendees in interface MessagingConnectorgetAttendees in class AbstractMessagingConnectoreventId - 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
MessagingConnectorsetAttendees in interface MessagingConnectorsetAttendees in class AbstractMessagingConnectoreventId - 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
MessagingConnectorgetFreeBusy in interface MessagingConnectorgetFreeBusy in class AbstractMessagingConnectorstartDate - 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
MessagingConnectorisUserExist in interface MessagingConnectorisUserExist in class AbstractMessagingConnectoruserIdentity - 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