Interface AcademyNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Academy objects. This session is intended for consumers needing
to synchronize their state with this service without the use of polling.
Notifications are cancelled when this session is closed.
Notifications are triggered with changes to the Academy object
itself. Adding and removing conferrals result in notifications available
from the notification session for conferrals.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeAcademyNotification(Id notificationId) Acknowledge an academy notification.booleanTests if this user can register forAcademynotifications.voidRegisters for notification of updated academies.voidregisterForChangedAcademy(Id academyId) Registers for notification of an updated academy.voidRegisters for notification of an updated academy hierarchy structure.voidregisterForChangedAcademyHierarchyForAncestors(Id academyId) Registers for notification of an updated academy hierarchy structure.voidRegisters for notification of an updated academy hierarchy structure.voidRegisters for notification of deleted academies.voidregisterForDeletedAcademy(Id academyId) Registers for notification of a deleted academy.voidRegister for notifications of new academies.voidReliable notifications are desired.voidUnreliable notifications are desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canRegisterForAcademyNotifications
boolean canRegisterForAcademyNotifications()Tests if this user can register forAcademynotifications. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
reliableAcademyNotifications
void reliableAcademyNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeAcademyNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableAcademyNotifications
void unreliableAcademyNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeAcademyNotification
void acknowledgeAcademyNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge an academy notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewAcademies
Register for notifications of new academies.AcademyReceiver.newAcademies()is invoked when a newAcademyis created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAcademies
Registers for notification of updated academies.AcademyReceiver.changedAcademies()is invoked when an academy is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAcademy
void registerForChangedAcademy(Id academyId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated academy.AcademyReceiver.changedAcademies()is invoked when the specified academy is changed.- Parameters:
academyId- theIdof theAcademyto monitor- Throws:
NullArgumentException-academyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedAcademies
Registers for notification of deleted academies.AcademyReceiver.deletedAcademies()is invoked when an academy is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedAcademy
void registerForDeletedAcademy(Id academyId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted academy.AcademyReceiver.deletedAcademies()is invoked when the specified academy is deleted.- Parameters:
academyId- theIdof theAcademyto monitor- Throws:
NullArgumentException-academyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAcademyHierarchy
void registerForChangedAcademyHierarchy() throws OperationFailedException, PermissionDeniedExceptionRegisters for notification of an updated academy hierarchy structure.AcademyReceiver.changedChildOfAcademies()is invoked when a node experiences a change in its children.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAcademyHierarchyForAncestors
void registerForChangedAcademyHierarchyForAncestors(Id academyId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated academy hierarchy structure.AcademyReceiver.changedChildOfAcademies()is invoked when a node experiences a change in its children.- Parameters:
academyId- theIdof theAcademynode to monitor- Throws:
NullArgumentException-academyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAcademyHierarchyForDescendants
void registerForChangedAcademyHierarchyForDescendants(Id academyId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated academy hierarchy structure.AcademyReceiver.changedChildOfAcademies()is invoked when a node experiences a change in its children.- Parameters:
academyId- theIdof theAcademynode to monitor- Throws:
NullArgumentException-academyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-