Interface EntryNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface EntryNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Entry objects in this Blog . This also includes existing entries that may appear or disappear due to changes in the Blog hierarchy, This session is intended for consumers needing to synchronize their entry 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 EntryLookupSession .

  • Method Details

    • getBlogId

      Id getBlogId()
      Gets the Blog Id associated with this session.
      Returns:
      the Blog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBlog

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

      boolean canRegisterForEntryNotifications()
      Tests if this user can register for Entry 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.
    • useFederatedBlogView

      void useFederatedBlogView()
      Federates the view for methods in this session. A federated view will include entries in blogs which are children of this blog in the blog hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedBlogView

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

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

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

      void acknowledgeEntryNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge an 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.
    • registerForNewEntries

      void registerForNewEntries() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new entries. EntryReceiver.newEntries() is invoked when a new Entry is appears in this blog.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewEntriesForPoster

      void registerForNewEntriesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new entries posted by the given resource. EntryReceiver.newEntries() is invoked when a new Entry is appears in this blog.
      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.
    • registerForChangedEntries

      void registerForChangedEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated entries. EntryReceiver.changedEntries() is invoked when an entry in this blog is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedEntriesForPoster

      void registerForChangedEntriesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of updated entries posted by the given resource. EntryReceiver.changedEntries() is invoked when an Entry is changed in this blog.
      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.
    • registerForChangedEntry

      void registerForChangedEntry(Id entryId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated entry. EntryReceiver.changedEntries() is invoked when the specified entry in this blog is changed.
      Parameters:
      entryId - the Id of the Entry to monitor
      Throws:
      NullArgumentException - entryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedEntries

      void registerForDeletedEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted entries. EntryReceiver.deletedEntries() is invoked when an entry is deleted or removed from this blog.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedEntriesForPoster

      void registerForDeletedEntriesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted entries posted by the given resource. EntryReceiver.deletedEntries() is invoked when an Entry is deleted or removed from this blog.
      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.
    • registerForDeletedEntry

      void registerForDeletedEntry(Id entryId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted entry. EntryReceiver.deletedEntries() is invoked when the specified entry is deleted or removed from this blog.
      Parameters:
      entryId - the Id of the Entry to monitor
      Throws:
      NullArgumentException - entryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.