Package org.ametys.plugins.exchange
Class GraphConnector
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.messagingconnector.AbstractMessagingConnector
org.ametys.plugins.exchange.GraphConnector
- All Implemented Interfaces:
MessagingConnector
,LogEnabled
,Initializable
,Component
,Serviceable
The connector used by the messaging connector plugin when connecting to Exchange Online.
Implemented through the Microsoft Graph API.
Implemented through the Microsoft Graph API.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.plugins.messagingconnector.MessagingConnector
MessagingConnector.AttendeeInformation, MessagingConnector.FreeBusyStatus, MessagingConnector.ResponseType
-
Field Summary
Modifier and TypeFieldDescriptionprotected GraphClientProvider
The Graph client providerstatic final String
The avalon roleFields inherited from class org.ametys.plugins.messagingconnector.AbstractMessagingConnector
_cacheManager, _cryptoHelper, _currentUserProvider, _userPopulationDAO, _userPref
Fields inherited from interface org.ametys.plugins.messagingconnector.MessagingConnector
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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)void
service
(ServiceManager manager) Methods inherited from class org.ametys.plugins.messagingconnector.AbstractMessagingConnector
createEvent, deleteEvent, getAllowedPopulationIds, getAttendees, getEvents, getEventsCount, getFreeBusy, getUnreadEmailCount, getUnreadEmails, getUserCryptedPassword, getUserPassword, initialize, internalCreateEvent, internalDeleteEvent, internalGetAttendees, internalGetFreeBusy, internalIsEventExist, internalSetAttendees, internalUpdateEvent, isAllowed, isEventExist, isUserExist, setAttendees, setUserPassword, supportInvitation, supportUserCredential, updateEvent, userCredentialNeeded
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
INNER_ROLE
The avalon role -
_graphClientProvider
The Graph client provider
-
-
Constructor Details
-
GraphConnector
public GraphConnector()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractMessagingConnector
- Throws:
ServiceException
-
internalGetEvents
protected List<CalendarEvent> internalGetEvents(UserIdentity userIdentity, int maxDays, int maxEvents) throws MessagingConnectorException Description copied from class:AbstractMessagingConnector
Get upcoming events (no caching)- Specified by:
internalGetEvents
in classAbstractMessagingConnector
- Parameters:
userIdentity
- The user identitymaxDays
- The maximum number of days to search formaxEvents
- The maximum number of events to retrieve- Returns:
- The calendar events
- Throws:
MessagingConnectorException
- if failed to get events from server
-
internalGetEventsCount
protected int internalGetEventsCount(UserIdentity userIdentity, int maxDays) throws MessagingConnectorException Description copied from class:AbstractMessagingConnector
Get upcoming events count (no caching)- Specified by:
internalGetEventsCount
in classAbstractMessagingConnector
- Parameters:
userIdentity
- The user identitymaxDays
- The maximum number of days to search for- Returns:
- The number of calendar events
- Throws:
MessagingConnectorException
- if failed to get events from server
-
internalGetEmails
protected List<EmailMessage> internalGetEmails(UserIdentity userIdentity, int maxEmails) throws MessagingConnectorException Description copied from class:AbstractMessagingConnector
Get emails (no caching)- Specified by:
internalGetEmails
in classAbstractMessagingConnector
- Parameters:
userIdentity
- The user identitymaxEmails
- The maximum number of emails to retrieve- Returns:
- The emails
- Throws:
MessagingConnectorException
- if failed to get events from server
-
internalGetEmailsCount
Description copied from class:AbstractMessagingConnector
Get emails count (no caching)- Specified by:
internalGetEmailsCount
in classAbstractMessagingConnector
- Parameters:
userIdentity
- The user identity- Returns:
- The emails count
- Throws:
MessagingConnectorException
- if failed to get events from server
-