Interface AppointmentNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AppointmentNotificationSession extends OsidSession

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

    • getRealmId

      Id getRealmId()
      Gets the Realm Id associated with this session.
      Returns:
      the Realm Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getRealm

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

      boolean canRegisterForAppointmentNotifications()
      Tests if this user can register for Appointment 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.
    • useFederatedRealmView

      void useFederatedRealmView()
      Federates the view for methods in this session. A federated view will include notifications for appointmentss in realms which are children of this realm in the realm hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedRealmView

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

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

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

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

      void registerForNewAppointments() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new appointments. AppointmentReceiver.newAppointments() is invoked when a new Appointment is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewAppointmentsForPerson

      void registerForNewAppointmentsForPerson(Id personId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new appointments for the given person Id . AppointmentReceiver.newAppointments() is invoked when a new Appointment appears in this realm.
      Parameters:
      personId - the person to monitor
      Throws:
      NullArgumentException - personId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewAppointmentsForPosition

      void registerForNewAppointmentsForPosition(Id positionId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new appointments for the given position Id . AppointmentReceiver.newAppointments() is invoked when a new Appointment appears in this realm.
      Parameters:
      positionId - the Id of the position to monitor
      Throws:
      NullArgumentException - positionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAppointments

      void registerForChangedAppointments() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated appointments. AppointmentReceiver.changedAppointments() is invoked when an appointment in this realm is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAppointmentsForPerson

      void registerForChangedAppointmentsForPerson(Id personId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed appointments for the given person Id . AppointmentReceiver.changedAppointments() is invoked when an Appointment for the reference in this realm is changed.
      Parameters:
      personId - the Id of the person to monitor
      Throws:
      NullArgumentException - personId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAppointmentsForPosition

      void registerForChangedAppointmentsForPosition(Id positionId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed appointments for the given position Id . AppointmentReceiver.changedAppointments() is invoked when an Appointment for the resource is changed in this realm.
      Parameters:
      positionId - the Id of the position to monitor
      Throws:
      NullArgumentException - positionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAppointment

      void registerForChangedAppointment(Id appointmentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Registers for notification of an updated appointment. AppointmentReceiver.changedAppointments() is invoked when the specified appointment in this realm is changed.
      Parameters:
      appointmentId - the Id of the Appointment to monitor
      Throws:
      NotFoundException - an appointment was not found identified by the given Id
      NullArgumentException - appointmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAppointments

      void registerForDeletedAppointments() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted appointments. AppointmentReceiver.deletedAppointments() is invoked when an appointment is removed from this realm.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAppointmentsForPerson

      void registerForDeletedAppointmentsForPerson(Id personId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted appointments for the given person Id . AppointmentReceiver.deletedAppointments() is invoked when an Appointment for the reference is removed from this realm.
      Parameters:
      personId - the Id of the person to monitor
      Throws:
      NullArgumentException - personId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAppointmentsForPosition

      void registerForDeletedAppointmentsForPosition(Id positionId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted appointments for the given position Id . AppointmentReceiver.deletedAppointments() is invoked when an Appointment for the resource is removed from this realm.
      Parameters:
      positionId - the Id of the position to monitor
      Throws:
      NullArgumentException - positionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedAppointment

      void registerForDeletedAppointment(Id appointmentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted appointment. AppointmentReceiver.deletedAppointments() is invoked when the specified appointment is removed from this realm.
      Parameters:
      appointmentId - the Id of the Appointment to monitor
      Throws:
      NotFoundException - an appointment was not found identified by the given Id
      NullArgumentException - appointmentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.