Interface CommitmentNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CommitmentNotificationSession extends OsidSession

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

The views defined in this session correspond to the views in the CommitmentLookupSession .

  • Method Details

    • getCalendarId

      Id getCalendarId()
      Gets the Calendar Id associated with this session.
      Returns:
      the Calendar Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCalendar

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

      boolean canRegisterForCommitmentNotifications()
      Tests if this user can register for Commitment 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.
    • useFederatedCalendarView

      void useFederatedCalendarView()
      Federates the view for methods in this session. A federated view will include notifications for commitments in calendars which are children of this calendar in the calendar hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedCalendarView

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

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

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

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

      void registerForNewCommitments() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new commitments. CommitmentReceiver.newCommitments() is invoked when a new commitment is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewCommitmentsByGenusType

      void registerForNewCommitmentsByGenusType(Id commitmentGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new commitments by commitment genus type. CommitmentReceiver.newCommitments() is invoked when a new commitment is created.
      Parameters:
      commitmentGenusType - the commitment genus type to monitor
      Throws:
      NullArgumentException - commitmentGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewCommitmentsForEvent

      void registerForNewCommitmentsForEvent(Id eventId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new commitments for the given event. CommitmentReceiver.newCommitments() is invoked when a new commitment is created.
      Parameters:
      eventId - the Id of the Event to monitor
      Throws:
      NullArgumentException - eventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewCommitmentsForResource

      void registerForNewCommitmentsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new commitments for the given resource. CommitmentReceiver.newCommitments() is invoked when a new commitment is created.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCommitments

      void registerForChangedCommitments() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated commitments. CommitmentReceiver.changedCommitments() is invoked when a commitment is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCommitmentsByGenusType

      void registerForChangedCommitmentsByGenusType(Type commitmentGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed commitments by commitment genus type. CommitmentReceiver.changedCommitments() is invoked when a commitment is changed.
      Parameters:
      commitmentGenusType - the commitment genus type to monitor
      Throws:
      NullArgumentException - commitmentGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCommitmentsForEvent

      void registerForChangedCommitmentsForEvent(Id eventId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed commitments for the given event. CommitmentReceiver.changedCommitments() is invoked when a commitment is changed.
      Parameters:
      eventId - the Id of the Event to monitor
      Throws:
      NullArgumentException - eventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCommitmentsForResource

      void registerForChangedCommitmentsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed commitments for the given rsource. CommitmentReceiver.changedCommitments() is invoked when a commitment is changed.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedCommitment

      void registerForChangedCommitment(Id commitmentId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated commitment. CommitmentReceiver.changedCommitments() is invoked when the specified commitment is changed.
      Parameters:
      commitmentId - the Id of the Commitment to monitor
      Throws:
      NullArgumentException - commitmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedCommitments

      void registerForDeletedCommitments() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted commitments. CommitmentReceiver.deletedCommitments() is invoked when a commitment is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedCommitmentsByGenusType

      void registerForDeletedCommitmentsByGenusType(Id commitmentGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted commitments by commitment genus type. CommitmentReceiver.deletedCommitments() is invoked when a commitment is deleted.
      Parameters:
      commitmentGenusType - the commitment genus type to monitor
      Throws:
      NullArgumentException - commitmentGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedCommitmentsForEvent

      void registerForDeletedCommitmentsForEvent(Id eventId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted commitments for the given event. CommitmentReceiver.deletedCommitments() is invoked when a commitment is deleted.
      Parameters:
      eventId - the Id of the Event to monitor
      Throws:
      NullArgumentException - eventId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedCommitmentsForResource

      void registerForDeletedCommitmentsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted commitments for the given rsource. CommitmentReceiver.deletedCommitments() is invoked when a commitment is deleted.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedCommitment

      void registerForDeletedCommitment(Id commitmentId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted commitment. CommitmentReceiver.changedCommitments() is invoked when the specified commitment is deleted.
      Parameters:
      commitmentId - the Id of the Commitment to monitor
      Throws:
      NullArgumentException - commitmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.