Interface AuthorizationNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Authorizations . 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.
The views defined in this session correspond to the views in the
AuthorizationLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeAuthorizationNotification(Id notificationId) Acknowledge an authorization notification.booleanTests if this user can register forAuthorizationnotifications.getVault()Gets theVaultassociated with this session.Gets theVaultIdassociated with this session.voidregisterForChangedAuthorization(Id authorizationId) Registers for notification of an updated authorization.voidRegisters for notification of updated authorizations.voidregisterForChangedAuthorizationsForFunction(Id functionId) Registers for notification of updated authorizations for the given function.voidregisterForChangedAuthorizationsForResource(Id resourceId) Registers for notification of updated authorizations for the given resource including any authorizations related to the resource through an agent.voidregisterForDeletedAuthorization(Id authorizationId) Registers for notification of a deleted authorization.voidRegisters for notification of deleted authorizations.voidregisterForDeletedAuthorizationsForFunction(Id functionId) Registers for notification of deleted authorizations for the given function.voidregisterForDeletedAuthorizationsForResource(Id resourceId) Registers for notification of deleted authorizations for the given resource including any authorizations related to the resource through an agent.voidRegister for notifications of new authorizations.voidregisterForNewAuthorizationsForFunction(Id functionId) Register for notifications of new authorizations for the given function.voidregisterForNewAuthorizationsForResource(Id resourceId) Registers for notification of new authorizations for the given resource including any authorizations related to the resource through an agent.voidReliable notifications are desired.voidUnreliable notifications are desired.voidSets the view for methods in this session to explicit authorizations.voidFederates the view for methods in this session.voidSets the view for methods in this session to implicit authorizations.voidIsolates the view for methods in this session.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
-
getVaultId
Id getVaultId()Gets theVaultIdassociated with this session.- Returns:
- the
Vault Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getVault
Gets theVaultassociated with this session.- Returns:
- the
Vaultassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForAuthorizationNotifications
boolean canRegisterForAuthorizationNotifications()Tests if this user can register forAuthorizationnotifications. 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.
-
useFederatedVaultView
void useFederatedVaultView()Federates the view for methods in this session. A federated view will include authorizations in vaults which are children of this vault in the vault hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedVaultView
void useIsolatedVaultView()Isolates the view for methods in this session. An isolated view restricts notifications for authorizations in this vault only.- Compliance:
mandatory- This method is must be implemented.
-
reliableAuthorizationNotifications
void reliableAuthorizationNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeAuthorizationNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableAuthorizationNotifications
void unreliableAuthorizationNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeAuthorizationNotification
void acknowledgeAuthorizationNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge an authorization notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
useImplicitAuthorizationView
void useImplicitAuthorizationView()Sets the view for methods in this session to implicit authorizations. An implicit view will include authorizations derived from other authorizations as a result of theQualifier,FunctionorResourcehierarchies. This method is the opposite ofexplicitAuthorizationView().- Compliance:
mandatory- This method is must be implemented.
-
useExplicitAuthorizationView
void useExplicitAuthorizationView()Sets the view for methods in this session to explicit authorizations. An explicit view includes only those authorizations that were explicitly defined and not implied. This method is the opposite ofimplicitAuthorizationView().- Compliance:
mandatory- This method is must be implemented.
-
registerForNewAuthorizations
Register for notifications of new authorizations.AuthorizationReceiver.newAuthorizations()is invoked when a newAuthorizationappears in this vault.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewAuthorizationsForResource
void registerForNewAuthorizationsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Registers for notification of new authorizations for the given resource including any authorizations related to the resource through an agent.AuthorizationReceiver.newAuthorizations()is invoked when an authorization appears in this vault.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewAuthorizationsForFunction
void registerForNewAuthorizationsForFunction(Id functionId) throws OperationFailedException, PermissionDeniedException Register for notifications of new authorizations for the given function.AuthorizationReceiver.newAuthorizations()is invoked when a newAuthorizationappears in this vault.- Parameters:
functionId- theIdof theFunctionto monitor- Throws:
NullArgumentException-functionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAuthorizations
Registers for notification of updated authorizations.AuthorizationReceiver.changedAuthorizations()is invoked when an authorization in this vault is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAuthorizationsForResource
void registerForChangedAuthorizationsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Registers for notification of updated authorizations for the given resource including any authorizations related to the resource through an agent.AuthorizationReceiver.changedAuthorizations()is invoked when an authorization in this vault is changed.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAuthorizationsForFunction
void registerForChangedAuthorizationsForFunction(Id functionId) throws OperationFailedException, PermissionDeniedException Registers for notification of updated authorizations for the given function.AuthorizationReceiver.changedAuthorizations()is invoked when an authorization in this vault is changed.- Parameters:
functionId- theIdof theFunctionto monitor- Throws:
NullArgumentException-functionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAuthorization
void registerForChangedAuthorization(Id authorizationId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated authorization.AuthorizationReceiver.changedAuthorizations()is invoked when the specified authorization in this vault is changed.- Parameters:
authorizationId- theIdof theAuthorizationto monitor- Throws:
NullArgumentException-authorizationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedAuthorizations
Registers for notification of deleted authorizations.AuthorizationReceiver.deletedAuthorizations()is invoked when an authorization is removed from this vault.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedAuthorizationsForResource
void registerForDeletedAuthorizationsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Registers for notification of deleted authorizations for the given resource including any authorizations related to the resource through an agent.AuthorizationReceiver.deletedAuthorizations()is invoked when an authorization is removed from this vault.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedAuthorizationsForFunction
void registerForDeletedAuthorizationsForFunction(Id functionId) throws OperationFailedException, PermissionDeniedException Registers for notification of deleted authorizations for the given function.AuthorizationReceiver.deletedAuthorizations()is invoked when an authorization is removed from this vault.- Parameters:
functionId- theIdof theFunctionto monitor- Throws:
NullArgumentException-functionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedAuthorization
void registerForDeletedAuthorization(Id authorizationId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted authorization.AuthorizationReceiver.deletedAuthorizations()is invoked when the specified authorization is removed from this vault.- Parameters:
authorizationId- theIdof theAuthorizationto monitor- Throws:
NullArgumentException-authorizationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-