public interface JournalNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Journal
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.
Notifications are triggered with changes to the Journal
object itself. Adding and removing entries result in notifications
available from the notification session for journal entries.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForJournalNotifications()
Tests if this user can register for
Journal
notifications. |
void |
registerForChangedJournal(Id journalId)
Registers for notification of an updated journal.
|
void |
registerForChangedJournals()
Registers for notification of updated journals.
|
void |
registerForDeletedJournal(Id journalId)
Registers for notification of a deleted journal.
|
void |
registerForDeletedJournalAncestors(Id journalId)
Registers for notification of an updated hierarchy structure that
removes an ancestor of the specified journal
JournalReceiver.deletedAncestor() is invoked when the
specified journal node loses an ancestor. |
void |
registerForDeletedJournalDescendants(Id journalId)
Registers for notification of an updated hierarchy structure that
removes a descendant of the specified journal.
|
void |
registerForDeletedJournals()
Registers for notification of deleted journals.
|
void |
registerForNewJournalAncestors(Id journalId)
Registers for notification of an updated hierarchy structure that
introduces a new ancestor of the specified journal.
|
void |
registerForNewJournalDescendants(Id journalId)
Registers for notification of an updated hierarchy structure that
introduces a new descendant of the specified journal.
|
void |
registerForNewJournals()
Register for notifications of new journals.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForJournalNotifications()
Journal
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. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void registerForNewJournals() throws OperationFailedException, PermissionDeniedException
JournalReceiver.newJournal()
is invoked when a new
Journal
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewJournalAncestors(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.newAncestorJournal()
is invoked when the
specified journal node gets a new ancestor.journalId
- the Id
of the Journal
node to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewJournalDescendants(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.newDescendantJournal()
is invoked when the
specified journal node gets a new descendant.journalId
- the Id
of the Journal
node to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedJournals() throws OperationFailedException, PermissionDeniedException
JournalReceiver.changedJournal()
is invoked when a journal is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedJournal(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.changedJournal()
is invoked when the specified
journal is changed.journalId
- the Id
of the Journal
to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedJournals() throws OperationFailedException, PermissionDeniedException
JournalReceiver.deletedJournal()
is invoked when a journal is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedJournal(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.deletedJournal()
is invoked when the specified
journal is deleted.journalId
- the Id
of the Journal
to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedJournalAncestors(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.deletedAncestor()
is invoked when the
specified journal node loses an ancestor.journalId
- the Id
of the Journal
to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedJournalDescendants(Id journalId) throws OperationFailedException, PermissionDeniedException
JournalReceiver.deletedDescendant()
is invoked when the
specified journal node loses a descendant.journalId
- the Id
of the Journal
to monitorNullArgumentException
- journalId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.