Interface JournalEntryNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface JournalEntryNotificationSession extends OsidSession

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

    • getJournalId

      Id getJournalId()
      Gets the Journal Id associated with this session.
      Returns:
      the Journal Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getJournal

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

      boolean canRegisterForJournalEntryNotifications()
      Tests if this user can register for JournalEntry 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.
    • useFederatedJournalView

      void useFederatedJournalView()
      Federates the view for methods in this session. A federated view will include notifications for entries in journals which are children of this journal in the journal hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedJournalView

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

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

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

      void acknowledgeJournalEntryNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a journal 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.
    • registerForNewJournalEntries

      void registerForNewJournalEntries() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new journal entries. JournalEntryReceiver.newJournalEntries() is invoked when a new JournalEntry is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewJournalEntriesForBranch

      void registerForNewJournalEntriesForBranch(Id branchId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new journal entries for the given branch Id . JournalEntryReceiver.newJournalEntries() is invoked when a new JournalEntry is created.
      Parameters:
      branchId - the Id of the branch to monitor
      Throws:
      NullArgumentException - branchId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewJournalEntriesForSource

      void registerForNewJournalEntriesForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new journal entries for the given source Id . JournalEntryReceiver.newJournalEntries() is invoked when a new JournalEntry is created.
      Parameters:
      sourceId - the Id of the source to monitor
      Throws:
      NullArgumentException - sourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewJournalEntriesForResource

      void registerForNewJournalEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new journal entries for the given resource Id . JournalEntryReceiver.newJournalEntries() is invoked when a new JournalEntry 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.
    • registerForChangedJournalEntries

      void registerForChangedJournalEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated journal entries. JournalEntryReceiver.changedJournalEntries() is invoked when a journal entry is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedJournalEntriesForBranch

      void registerForChangedJournalEntriesForBranch(Id branchId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed journal entries for the given branch Id . JournalEntryReceiver.changedJournalEntries() is invoked when a JournalEntry for the branch is changed.
      Parameters:
      branchId - the Id of the branch to monitor
      Throws:
      NullArgumentException - branchId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedJournalEntriesForSource

      void registerForChangedJournalEntriesForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed journal entries for the given source Id . JournalEntryReceiver.changedJournalEntries() is invoked when a JournalEntry for the source is changed.
      Parameters:
      sourceId - the Id of the source to monitor
      Throws:
      NullArgumentException - sourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedJournalEntriesForResource

      void registerForChangedJournalEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed journal entries for the given resource Id . JournalEntryReceiver.changedJournalEntries() is invoked when a JournalEntry for the source 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.
    • registerForChangedJournalEntry

      void registerForChangedJournalEntry(Id journalEntryId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated journal entry. JournalEntryReceiver.changedJournalEntries() is invoked when the specified journal entry is changed.
      Parameters:
      journalEntryId - the Id of the JournalEntry to monitor
      Throws:
      NullArgumentException - journalEntryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedJournalEntries

      void registerForDeletedJournalEntries() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted journal entries. JournalEntryReceiver.deletedJournalEntries() is invoked when a journal entry is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedJournalEntriesForBranch

      void registerForDeletedJournalEntriesForBranch(Id branchId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted journal entries for the given source Id . JournalEntryReceiver.deletedJournalEntries() is invoked when a JournalEntry for the branch is deleted.
      Parameters:
      branchId - the Id of the branch to monitor
      Throws:
      NullArgumentException - branchId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedJournalEntriesForSource

      void registerForDeletedJournalEntriesForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted journal entries for the given source Id . JournalEntryReceiver.deletedJournalEntries() is invoked when a JournalEntry for the source is deleted.
      Parameters:
      sourceId - the Id of the source to monitor
      Throws:
      NullArgumentException - sourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedJournalEntriesForResource

      void registerForDeletedJournalEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted journal entries for the given resource Id . JournalEntryReceiver.deletedJournalEntries() is invoked when a JournalEntry for the source 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.
    • registerForDeletedJournalEntry

      void registerForDeletedJournalEntry(Id journalEntryId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted journal entry. JournalEntryReceiver.deletedJournalEntries() is invoked when the specified journal entry is deleted.
      Parameters:
      journalEntryId - the Id of the JournalEntry to monitor
      Throws:
      NullArgumentException - journalEntryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.