Interface ProfileEntryNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ProfileEntryNotificationSession extends OsidSession

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

  • 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.
    • canRegisterForProfileEntryNotifications

      boolean canRegisterForProfileEntryNotifications()
      Tests if this user can register for ProfileEntry 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 profile entries 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 for profile entries in this profile only.
      Compliance:
      mandatory - This method is must be implemented.
    • useImplicitProfileEntryView

      void useImplicitProfileEntryView()
      Sets the view for methods in this session to implicit profile entries. An implicit view will include profile entries derived from other authorizations as a result of the ProfileItem or Resource hierarchies. This method is the opposite of explicitProfileEntryView() .
      Compliance:
      mandatory - This method is must be implemented.
    • useExplicitProfileEntryView

      void useExplicitProfileEntryView()
      Sets the view for methods in this session to explicit profile entries. An explicit view includes only those entries that were explicitly defined and not implied. This method is the opposite of implicitProfileEntryView() .
      Compliance:
      mandatory - This method is must be implemented.
    • reliableProfileEntryNotifications

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

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

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

      void registerForNewProfileEntries() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new profile entries. ProfileEntryReceiver.newProfileEntries() is invoked when a new ProfileEntry appears in this profile.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewProfileEntriesForResource

      void registerForNewProfileEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new profile entries for the given resource including any profile entries related to the resource through an agent. ProfileEntryReceiver.newProfileEntries() is invoked when a profile entry appears in this profile.
      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.
    • registerForNewProfileEntriesForProfileItem

      void registerForNewProfileEntriesForProfileItem(Id profileItemId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new profile entries for the given profile item. ProfileEntryReceiver.newProfileEntries() is invoked when a new ProfileEntry appears in 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.
    • registerForChangedProfileEntries

      void registerForChangedProfileEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated profile entries. ProfileEntryReceiver.changedProfileEntries() is invoked when an entry is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedProfileEntriesForResource

      void registerForChangedProfileEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated profile entries for the given resource including any profile entries related to the resource through an agent. ProfileEntryReceiver.changedProfileEntries() is invoked when a profile entry in this profile 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.
    • registerForChangedProfileEntriesForProfileItem

      void registerForChangedProfileEntriesForProfileItem(Id profileItemId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated profile entries for the given profile item. ProfileEntryReceiver.changedProfileEntry() is invoked when a new ProfileEntry in this profile 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.
    • registerForChangedProfileEntry

      void registerForChangedProfileEntry(Id profileEntryId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated profile entry. ProfileEntryReceiver.changedProfileEntries() is invoked when the specified entry in this profile changed.
      Parameters:
      profileEntryId - the Id of the ProfileEntry to monitor
      Throws:
      NullArgumentException - profileEntryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedProfileEntries

      void registerForDeletedProfileEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted profile entries. ProfileEntryReceiver.deletedProfileEntries() is invoked when a profile entry is removed from this profile.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedProfileEntriesForResource

      void registerForDeletedProfileEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted profile entries for the given resource including any profile entries related to the resource through an agent. ProfileEntryReceiver.changedProfileEntries() is invoked when a profile entry is removed from this profile.
      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.
    • registerForDeletedProfileEntriesForProfileItem

      void registerForDeletedProfileEntriesForProfileItem(Id profileItemId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted profile entries for the given profile item. ProfileEntryReceiver.deletedProfileEntries() is invoked when a ProfileEntry 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.
    • registerForDeletedProfileEntry

      void registerForDeletedProfileEntry(Id profileEntryId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted profile entry. ProfileEntryReceiver.deletedProfileEntries() is invoked when the specified entry is removed from this profile.
      Parameters:
      profileEntryId - the Id of the ProfileEntry to monitor
      Throws:
      NullArgumentException - profileEntryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.