Interface BusinessNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BusinessNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Businesses . This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this sess

  • Method Details

    • canRegisterForBusinessNotifications

      boolean canRegisterForBusinessNotifications()
      Tests if this user can register for Business 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.
    • reliableBusinessNotifications

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

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

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

      void registerForNewBusinesses() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new businesses. BusinessReceiver.newBusinesses() is invoked when a new Business is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBusinesses

      void registerForChangedBusinesses() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated businesses. BusinessReceiver.changedBusinesses() is invoked when a business is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBusiness

      void registerForChangedBusiness(Id businessId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated business. BusinessReceiver.changedBusinesses() is invoked when the specified business is changed.
      Parameters:
      businessId - the Id of the Business to monitor
      Throws:
      NullArgumentException - businessId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedBusinesses

      void registerForDeletedBusinesses() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted businesses. BusinessReceiver.deletedBusinesses() is invoked when a business is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedBusiness

      void registerForDeletedBusiness(Id businessId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted business. BusinessReceiver.deletedBusinesses() is invoked when the specified business is deleted.
      Parameters:
      businessId - the Id of the Business to monitor
      Throws:
      NullArgumentException - businessId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBusinessHierarchy

      void registerForChangedBusinessHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated business hierarchy structure. BusinessReceiver.changedChildOfBusinesses() 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.
    • registerForChangedBusinessHierarchyForAncestors

      void registerForChangedBusinessHierarchyForAncestors(Id businessId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated business hierarchy structure. BusinessReceiver.changedChildOfBusinesses() is invoked when the specified node or any of its ancestors experiences a change in its children.
      Parameters:
      businessId - the Id of the Business node to monitor
      Throws:
      NullArgumentException - businessId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBusinessHierarchyForDescendants

      void registerForChangedBusinessHierarchyForDescendants(Id businessId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated business hierarchy structure. BusinessReceiver.changedChildOfBusinesses() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      businessId - the Id of the Business node to monitor
      Throws:
      NullArgumentException - businessId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.