public class ExchangeConnector extends AbstractMessagingConnector
MessagingConnector.AttendeeInformation, MessagingConnector.FreeBusyStatus, MessagingConnector.ResponseType| Modifier and Type | Field and Description | 
|---|---|
| private UserManager | _userManagerThe user manager | 
_cryptoHelper, _currentUserProvider, _userPopulationDAO, _userPrefROLE| Constructor and Description | 
|---|
| ExchangeConnector() | 
| Modifier and Type | Method and Description | 
|---|---|
| private MessagingConnectorException.ExceptionType | _getExceptionType(Throwable exception)get the type of exception from the Throwable | 
| private microsoft.exchange.webservices.data.core.ExchangeService | _getImpersonatedService(UserIdentity userIdentity) | 
| private MessagingConnector.ResponseType | _getResponseStatus(microsoft.exchange.webservices.data.core.enumeration.property.MeetingResponseType meetingResponseType) | 
| private microsoft.exchange.webservices.data.core.ExchangeService | _getSimpleService(UserIdentity userIdentity) | 
| private microsoft.exchange.webservices.data.core.ExchangeService | _initService(String userName,
            String password) | 
| 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) | 
| 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 | 
| String | internalCreateEvent(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 | internalDeleteEvent(String eventId,
                   UserIdentity organiser)Delete an event | 
| Map<String,MessagingConnector.AttendeeInformation> | internalGetAttendees(String eventId,
                    UserIdentity organiser)Get the map of attendees for an event | 
| 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,
                 int maxDays,
                 int maxEvents)Get upcoming events (no caching) | 
| protected int | internalGetEventsCount(UserIdentity userIdentity,
                      int maxDays)Get upcoming events count (no caching) | 
| Map<String,MessagingConnector.FreeBusyStatus> | internalGetFreeBusy(Date startDate,
                   Date endDate,
                   boolean isAllDay,
                   Set<String> attendees,
                   UserIdentity organiser)Get free/busy status for attendees for a time window | 
| boolean | internalIsEventExist(String eventId,
                    UserIdentity organiser)True if the event exist in the messaging connector | 
| void | internalSetAttendees(String eventId,
                    Map<String,Boolean> attendees,
                    UserIdentity organiser)Set attendees for an event | 
| void | internalUpdateEvent(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 | 
| boolean | isUserExist(UserIdentity userIdentity)True if the user exist | 
| void | service(ServiceManager manager) | 
| boolean | supportInvitation()Tell if the messaging connector supports event invitation | 
| boolean | supportUserCredential()Check if a user credential should be saved | 
createEvent, deleteEvent, getAllowedPopulationIds, getAttendees, getEvents, getEventsCount, getFreeBusy, getUnreadEmailCount, getUnreadEmails, getUserCryptedPassword, getUserPassword, initialize, isAllowed, isEventExist, setAttendees, setUserPassword, updateEvent, userCredentialNeededgetLogger, setLoggerprivate 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 occurredpublic boolean supportUserCredential()
MessagingConnectorsupportUserCredential in interface MessagingConnectorsupportUserCredential in class AbstractMessagingConnectorprivate microsoft.exchange.webservices.data.core.ExchangeService _getSimpleService(UserIdentity userIdentity)
private microsoft.exchange.webservices.data.core.ExchangeService _getImpersonatedService(UserIdentity userIdentity)
private microsoft.exchange.webservices.data.core.ExchangeService _initService(String userName, String password)
protected List<CalendarEvent> internalGetEvents(UserIdentity userIdentity, int maxDays, int maxEvents) throws MessagingConnectorException
AbstractMessagingConnectorinternalGetEvents in class AbstractMessagingConnectoruserIdentity - The user identitymaxDays - The maximum number of days to search formaxEvents - The maximum number of events to retrieveMessagingConnectorException - if failed to get events from serverprotected int internalGetEventsCount(UserIdentity userIdentity, int maxDays) throws MessagingConnectorException
AbstractMessagingConnectorinternalGetEventsCount in class AbstractMessagingConnectoruserIdentity - The user identitymaxDays - The maximum number of days to search forMessagingConnectorException - 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 internalIsEventExist(String eventId, UserIdentity organiser) throws MessagingConnectorException
AbstractMessagingConnectorinternalIsEventExist in class AbstractMessagingConnectoreventId - the event idorganiser - the organiserMessagingConnectorException - if an error occurredpublic String internalCreateEvent(String title, String description, String place, boolean isAllDay, Date startDate, Date endDate, EventRecurrenceTypeEnum recurrenceType, Date untilDate, Map<String,Boolean> attendees, UserIdentity organiser) throws MessagingConnectorException
AbstractMessagingConnectorinternalCreateEvent 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 internalUpdateEvent(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
AbstractMessagingConnectorinternalUpdateEvent 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 internalDeleteEvent(String eventId, UserIdentity organiser) throws MessagingConnectorException
AbstractMessagingConnectorinternalDeleteEvent in class AbstractMessagingConnectoreventId - the event id to deleteorganiser - the event organiserMessagingConnectorException - if failed to get events from serverpublic Map<String,MessagingConnector.AttendeeInformation> internalGetAttendees(String eventId, UserIdentity organiser) throws MessagingConnectorException
AbstractMessagingConnectorinternalGetAttendees in class AbstractMessagingConnectoreventId - the event idorganiser - the event organiserMessagingConnectorException - if failed to get events from serverpublic void internalSetAttendees(String eventId, Map<String,Boolean> attendees, UserIdentity organiser) throws MessagingConnectorException
AbstractMessagingConnectorinternalSetAttendees 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> internalGetFreeBusy(Date startDate, Date endDate, boolean isAllDay, Set<String> attendees, UserIdentity organiser) throws MessagingConnectorException
AbstractMessagingConnectorinternalGetFreeBusy 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
Exceptionprotected static String html2text(String html)
html - the html String that will be convertedprivate MessagingConnectorException.ExceptionType _getExceptionType(Throwable exception)
exception - exception thrown by Exchange APIMessagingConnectorException.ExceptionType