Interface AuthorizationNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AuthorizationNotificationSession extends 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 Details

    • getVaultId

      Id getVaultId()
      Gets the Vault Id associated with this session.
      Returns:
      the Vault Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getVault

      Gets the Vault associated with this session.
      Returns:
      the Vault associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRegisterForAuthorizationNotifications

      boolean canRegisterForAuthorizationNotifications()
      Tests if this user can register for Authorization notifications. 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer notification operations.
      Returns:
      false if notification methods are not authorized, true otherwise
      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 using acknowledgeAuthorizationNotification() .
      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 - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 the Qualifier , Function or Resource hierarchies. This method is the opposite of explicitAuthorizationView() .
      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 of implicitAuthorizationView() .
      Compliance:
      mandatory - This method is must be implemented.
    • registerForNewAuthorizations

      void registerForNewAuthorizations() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new authorizations. AuthorizationReceiver.newAuthorizations() is invoked when a new Authorization appears in this vault.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 new Authorization appears in this vault.
      Parameters:
      functionId - the Id of the Function to monitor
      Throws:
      NullArgumentException - functionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAuthorizations

      void registerForChangedAuthorizations() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated authorizations. AuthorizationReceiver.changedAuthorizations() is invoked when an authorization in this vault is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Function to monitor
      Throws:
      NullArgumentException - functionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Authorization to monitor
      Throws:
      NullArgumentException - authorizationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAuthorizations

      void registerForDeletedAuthorizations() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted authorizations. AuthorizationReceiver.deletedAuthorizations() is invoked when an authorization is removed from this vault.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Function to monitor
      Throws:
      NullArgumentException - functionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Authorization to monitor
      Throws:
      NullArgumentException - authorizationId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.