Interface OfferingNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OfferingNotificationSession extends OsidSession

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

    • getCatalogueId

      Id getCatalogueId()
      Gets the Catalogue Id associated with this session.
      Returns:
      the Catalogue Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCatalogue

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

      boolean canRegisterForOfferingNotifications()
      Tests if this user can register for Offering 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.
    • useFederatedCatalogueView

      void useFederatedCatalogueView()
      Federates the view for methods in this session. A federated view will include notifications for offeringss in catalogues which are children of this catalogue in the catalogue hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedCatalogueView

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

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

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

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

      void registerForNewOfferings() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new offerings. OfferingReceiver.newOfferings() is invoked when a new Offering is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewOfferingsForCanonicalUnit

      void registerForNewOfferingsForCanonicalUnit(Id canonicalUnitId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new offerings for the given canonical unit. OfferingReceiver.newOfferings() is invoked when an offering appears in this catalogue.
      Parameters:
      canonicalUnitId - the Id of the CanonicalUnit to monitor
      Throws:
      NullArgumentException - canonicalUnitId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewOfferingsForTimePeriod

      void registerForNewOfferingsForTimePeriod(Id timePeriodId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new offerings for the given time period. OfferingReceiver.newOfferings() is invoked when an offering appears in this catalogue.
      Parameters:
      timePeriodId - the Id of the TimePeriod to monitor
      Throws:
      NullArgumentException - timePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedOfferings

      void registerForChangedOfferings() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated offerings. OfferingReceiver.changedOfferings() is invoked when an offering in this catalogue is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedOfferingsForCanonicalUnit

      void registerForChangedOfferingsForCanonicalUnit(Id canonicalUnitId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated offerings for the given canonical unit. OfferingReceiver.changedOfferings() is invoked when an offering in this catalogue is updated.
      Parameters:
      canonicalUnitId - the Id of the CanonicalUnit to monitor
      Throws:
      NullArgumentException - canonicalUnitId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedOfferingsForTimePeriod

      void registerForChangedOfferingsForTimePeriod(Id timePeriodId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated offerings for the given time period. OfferingReceiver.changedOfferings() is invoked when an offering in this catalogue is updated.
      Parameters:
      timePeriodId - the Id of the TimePeriod to monitor
      Throws:
      NullArgumentException - timePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedOffering

      void registerForChangedOffering(Id offeringId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Registers for notification of an updated offering. OfferingReceiver.changedOfferings() is invoked when the specified offering in this catalogue is changed.
      Parameters:
      offeringId - the Id of the Offering to monitor
      Throws:
      NotFoundException - an offering was not found identified by the given Id
      NullArgumentException - offeringId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedOfferings

      void registerForDeletedOfferings() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted offerings. OfferingReceiver.deletedOfferings() is invoked when an offering is removed from this catalogue.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedOfferingsForCanonicalUnit

      void registerForDeletedOfferingsForCanonicalUnit(Id canonicalUnitId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted offerings for the given canonical unit. OfferingReceiver.changedOfferings() is invoked when an offering is remoevd from this catalogue.
      Parameters:
      canonicalUnitId - the Id of the CanonicalUnit to monitor
      Throws:
      NullArgumentException - canonicalUnitId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedOfferingsForTimePeriod

      void registerForDeletedOfferingsForTimePeriod(Id timePeriodId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated offerings for the given time period. OfferingReceiver.changedOfferings() is invoked when an offering is removed from this catalogue.
      Parameters:
      timePeriodId - the Id of the TimePeriod to monitor
      Throws:
      NullArgumentException - timePeriodId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedOffering

      void registerForDeletedOffering(Id offeringId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted offering. OfferingReceiver.deletedOfferings() is invoked when the specified offering is removed from this catalogue.
      Parameters:
      offeringId - the Id of the Offering to monitor
      Throws:
      NotFoundException - an offering was not found identified by the given Id
      NullArgumentException - offeringId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.