Interface OrderNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OrderNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Order 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.

  • Method Details

    • getStoreId

      Id getStoreId()
      Gets the Store Id associated with this session.
      Returns:
      the Store Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getStore

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

      boolean canRegisterForOrderNotifications()
      Tests if this user can register for Order 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.
    • useFederatedStoreView

      void useFederatedStoreView()
      Federates the view for methods in this session. A federated view will include orders in stores which are children of this store in the store hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedStoreView

      void useIsolatedStoreView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this store only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableOrderNotifications

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

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

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

      void registerForNewOrders() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new orders. OrderReceiver.newOrders() is invoked when a new Order is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewOrdersByCustomer

      void registerForNewOrdersByCustomer(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new orders for the given customer resource Id . OrderReceiver.newOrders() is invoked when a new Order is created.
      Parameters:
      resourceId - the Id of the customer to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedOrders

      void registerForChangedOrders() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated orders. OrderReceiver.changedOrders() is invoked when an order is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedOrdersByCustomer

      void registerForChangedOrdersByCustomer(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed orders for the given customer Id . OrderReceiver.changedOrders() is invoked when an Order for the resource is changed.
      Parameters:
      resourceId - the Id of the customer to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedOrder

      void registerForChangedOrder(Id orderId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated order. OrderReceiver.changedOrders() is invoked when the specified order is changed.
      Parameters:
      orderId - the Id of the Order to monitor
      Throws:
      NullArgumentException - orderId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedOrders

      void registerForDeletedOrders() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted orders. OrderReceiver.deletedOrders() is invoked when an order is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedOrdersByCustomer

      void registerForDeletedOrdersByCustomer(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted orders for the given customer Id . OrderReceiver.deletedOrders() is invoked when an Order for the resource is deleted.
      Parameters:
      resourceId - the Id of the customer to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedOrder

      void registerForDeletedOrder(Id orderId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted order. OrderReceiver.deletedOrders() is invoked when the specified order is deleted.
      Parameters:
      orderId - the Id of the Order to monitor
      Throws:
      NullArgumentException - orderId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.