Interface StoreNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface StoreNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Store 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 Store object itself. Adding and removing orders result in notifications available from the notification session for orders.

  • Method Details

    • canRegisterForStoreNotifications

      boolean canRegisterForStoreNotifications()
      Tests if this user can register for Store 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.
    • reliableStoreNotifications

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

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

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

      void registerForNewStores() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new stores. StoreReceiver.newStores() is invoked when a new Store is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedStores

      void registerForChangedStores() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated stores. StoreReceiver.changedStores() is invoked when a store is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedStore

      void registerForChangedStore(Id storeId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated store. StoreReceiver.changedStores() is invoked when the specified store is changed.
      Parameters:
      storeId - the Id of the Store to monitor
      Throws:
      NullArgumentException - storeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedStores

      void registerForDeletedStores() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted stores. StoreReceiver.deletedStores() is invoked when a store is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedStore

      void registerForDeletedStore(Id storeId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted store. StoreReceiver.deletedStores() is invoked when the specified store is deleted.
      Parameters:
      storeId - the Id of the Store to monitor
      Throws:
      NullArgumentException - storeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedStoreHierarchy

      void registerForChangedStoreHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated store hierarchy structure. StoreReceiver.changedChildOfStores() is invoked when a node experiences a change in its children.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedStoreHierarchyForAncestors

      void registerForChangedStoreHierarchyForAncestors(Id storeId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated store hierarchy structure. StoreReceiver.changedChildOfStores() is invoked when a node experiences a change in its children.
      Parameters:
      storeId - the Id of the Store node to monitor
      Throws:
      NullArgumentException - storeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedStoreHierarchyForDescendants

      void registerForChangedStoreHierarchyForDescendants(Id storeId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated store hierarchy structure. StoreReceiver.changedChildOfStores() is invoked when a node experiences a change in its children.
      Parameters:
      storeId - the Id of the Store node to monitor
      Throws:
      NullArgumentException - storeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.