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
public class GraphConnector extends AbstractMessagingConnector
The connector used by the messaging connector plugin when connecting to Exchange Online.
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
Fields Modifier and Type Field Description static String
INNER_ROLE
The avalon role-
Fields 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
Constructors Constructor Description GraphConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize()
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)void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.messagingconnector.AbstractMessagingConnector
createEvent, deleteEvent, getAllowedPopulationIds, getAttendees, getEvents, getEventsCount, getFreeBusy, getUnreadEmailCount, getUnreadEmails, getUserCryptedPassword, getUserPassword, 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 Detail
-
INNER_ROLE
public static final String INNER_ROLE
The avalon role
-
-
Constructor Detail
-
GraphConnector
public GraphConnector()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractMessagingConnector
- Throws:
ServiceException
-
initialize
public void initialize()
- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classAbstractMessagingConnector
-
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
protected int internalGetEmailsCount(UserIdentity userIdentity) throws MessagingConnectorException
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
-
-