Interface JournalEntryNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionvoidacknowledgeJournalEntryNotification(Id notificationId) Acknowledge a journal entry notification.booleanTests if this user can register forJournalEntrynotifications.Gets theJournalassociated with this session.Gets theJournalIdassociated with this session.voidRegisters for notification of updated journal entries.voidregisterForChangedJournalEntriesForBranch(Id branchId) Register for notifications of changed journal entries for the given branchId.voidregisterForChangedJournalEntriesForResource(Id resourceId) Register for notifications of changed journal entries for the given resourceId.voidregisterForChangedJournalEntriesForSource(Id sourceId) Register for notifications of changed journal entries for the given sourceId.voidregisterForChangedJournalEntry(Id journalEntryId) Registers for notification of an updated journal entry.voidRegisters for notification of deleted journal entries.voidregisterForDeletedJournalEntriesForBranch(Id branchId) Register for notifications of deleted journal entries for the given sourceId.voidregisterForDeletedJournalEntriesForResource(Id resourceId) Register for notifications of deleted journal entries for the given resourceId.voidregisterForDeletedJournalEntriesForSource(Id sourceId) Register for notifications of deleted journal entries for the given sourceId.voidregisterForDeletedJournalEntry(Id journalEntryId) Registers for notification of a deleted journal entry.voidRegister for notifications of new journal entries.voidregisterForNewJournalEntriesForBranch(Id branchId) Register for notifications of new journal entries for the given branchId.voidregisterForNewJournalEntriesForResource(Id resourceId) Register for notifications of new journal entries for the given resourceId.voidregisterForNewJournalEntriesForSource(Id sourceId) Register for notifications of new journal entries for the given sourceId.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getJournalId
Id getJournalId()Gets theJournalIdassociated with this session.- Returns:
- the
Journal Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getJournal
Gets theJournalassociated with this session.- Returns:
- the journal
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForJournalEntryNotifications
boolean canRegisterForJournalEntryNotifications()Tests if this user can register forJournalEntrynotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- 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 usingacknowledgeJournalEntryNotification().- 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- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewJournalEntries
Register for notifications of new journal entries.JournalEntryReceiver.newJournalEntries()is invoked when a newJournalEntryis created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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 branchId.JournalEntryReceiver.newJournalEntries()is invoked when a newJournalEntryis created.- Parameters:
branchId- theIdof the branch to monitor- Throws:
NullArgumentException-branchIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 sourceId.JournalEntryReceiver.newJournalEntries()is invoked when a newJournalEntryis created.- Parameters:
sourceId- theIdof the source to monitor- Throws:
NullArgumentException-sourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 resourceId.JournalEntryReceiver.newJournalEntries()is invoked when a newJournalEntryis created.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedJournalEntries
Registers for notification of updated journal entries.JournalEntryReceiver.changedJournalEntries()is invoked when a journal entry is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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 branchId.JournalEntryReceiver.changedJournalEntries()is invoked when aJournalEntryfor the branch is changed.- Parameters:
branchId- theIdof the branch to monitor- Throws:
NullArgumentException-branchIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 sourceId.JournalEntryReceiver.changedJournalEntries()is invoked when aJournalEntryfor the source is changed.- Parameters:
sourceId- theIdof the source to monitor- Throws:
NullArgumentException-sourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 resourceId.JournalEntryReceiver.changedJournalEntries()is invoked when aJournalEntryfor the source is changed.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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- theIdof theJournalEntryto monitor- Throws:
NullArgumentException-journalEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedJournalEntries
Registers for notification of deleted journal entries.JournalEntryReceiver.deletedJournalEntries()is invoked when a journal entry is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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 sourceId.JournalEntryReceiver.deletedJournalEntries()is invoked when aJournalEntryfor the branch is deleted.- Parameters:
branchId- theIdof the branch to monitor- Throws:
NullArgumentException-branchIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 sourceId.JournalEntryReceiver.deletedJournalEntries()is invoked when aJournalEntryfor the source is deleted.- Parameters:
sourceId- theIdof the source to monitor- Throws:
NullArgumentException-sourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 resourceId.JournalEntryReceiver.deletedJournalEntries()is invoked when aJournalEntryfor the source is deleted.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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- theIdof theJournalEntryto monitor- Throws:
NullArgumentException-journalEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-