Interface CatalogEntryNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CatalogEntryNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to a catalog assignment. 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 assignments of Ids to this catalog. For notifications of changes to the Catalog object use CatalogNotificationSession .

  • Method Details

    • getCatalogId

      Id getCatalogId()
      Gets the Catalog Id associated with this session.
      Returns:
      the Catalog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCatalog

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

      boolean canRegisterForCatalogEntryNotifications()
      Tests if this user can register for Catalog entry 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.
    • useFederatedCatalogView

      void useFederatedCatalogView()
      Federates the view for methods in this session. A federated view will include entries from parent catalogs in the catalog hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedCatalogView

      void useIsolatedCatalogView()
      Isolates the view for methods in this session. An isolated view restricts notifications for entries to this catalog only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableCatalogEntryNotifications

      void reliableCatalogEntryNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeCatalogEntryNotification() .
      Compliance:
      mandatory - This method is must be implemented.
    • unreliableCatalogEntryNotifications

      void unreliableCatalogEntryNotifications()
      Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.
      Compliance:
      mandatory - This method is must be implemented.
    • acknowledgeCatalogEntryNotification

      void acknowledgeCatalogEntryNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a catalog entry notification.
      Parameters:
      notificationId - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewCatalogEntries

      void registerForNewCatalogEntries() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new catalogs. CatalogEntryReceiver.newCatalogEntries() is invoked when a new Catalog entry is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedCatalogEntries

      void registerForDeletedCatalogEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted catalogs entries. CatalogEntryReceiver.deletedCatalogEntries() is invoked when a catalog entry is removed from this catalog.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.