Interface ProfileItemNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProfileItemNotificationSession extends OsidSession

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

The two views defined in this session correspond to the views in the ProfileItemLookupSession .

  • Method Details

    • getProfileId

      Id getProfileId()
      Gets the Profile Id associated with this session.
      Returns:
      the Profile Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getProfile

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

      boolean canRegisterForProfileItemNotifications()
      Tests if this user can register for ProfileItem 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.
    • useFederatedProfileView

      void useFederatedProfileView()
      Federates the view for methods in this session. A federated view will include items in profiles which are children of this profile in the profile hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedProfileView

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

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

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

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

      void registerForNewProfileItems() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new pofile items. ProfileItemReceiver.newProfileItems() is invoked when a new ProfileItem is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedProfileItems

      void registerForChangedProfileItems() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated profile items. ProfileItemReceiver.changedProfileItems() is invoked when a profile item is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedProfileItem

      void registerForChangedProfileItem(Id profileItemId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated profile item. ProfileItemReceiver.changedProfileItems() is invoked when the specified profile item is changed.
      Parameters:
      profileItemId - the Id of the ProfileItem to monitor
      Throws:
      NullArgumentException - profileItemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedProfileItems

      void registerForDeletedProfileItems() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted profile items. ProfileItemReceiver.deletedProfileItems() is invoked when a profile is removed from this profile.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedProfileItem

      void registerForDeletedProfileItem(Id profileItemId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted profile item. ProfileItemReceiver.changedProfileItems() is invoked when the specified profile item is removed from this profile.
      Parameters:
      profileItemId - the Id of the ProfileItem to monitor
      Throws:
      NullArgumentException - profileItemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.