public interface HierarchyNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Hierarchy
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 Hierarchy
object itself. Adding and removing Ids
result in
notifications available from the HierarchyNodeNotificationSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForHierarchyNotifications()
Tests if this user can register for
Hierarchy
notifications. |
void |
registerForChangedHierarchies()
Registers for notification of updated hierarchies.
|
void |
registerForChangedHierarchy(Id hierarchyId)
Registers for notification of an updated hierarchy.
|
void |
registerForDeletedHierarchies()
Registers for notification of deleted hierarchies.
|
void |
registerForDeletedHierarchy(Id hierarchyId)
Registers for notification of a deleted hierarchy.
|
void |
registerForNewHierarchies()
Register for notifications of new hierarchies.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForHierarchyNotifications()
Hierarchy
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 registerForNewHierarchies() throws OperationFailedException, PermissionDeniedException
HierarchyReceiver.newHierarchy()
is invoked when a new
Hierarchy
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedHierarchies() throws OperationFailedException, PermissionDeniedException
HierarchyReceiver.changedHierarchy()
is invoked when a
hierarchy is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedHierarchy(Id hierarchyId) throws OperationFailedException, PermissionDeniedException
HierarchyReceiver.changedHierarchy()
is invoked when the
specified hierarchy is changed.hierarchyId
- the Id
of the hierarchy
to monitorNullArgumentException
- hierarchyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedHierarchies() throws OperationFailedException, PermissionDeniedException
HierarchyReceiver.deletedHierarchy()
is invoked when a
hierarchy is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedHierarchy(Id hierarchyId) throws OperationFailedException, PermissionDeniedException
HierarchyReceiver.deletedHierarchy()
is invoked when the
specified hierarchy is deleted.hierarchyId
- the Id
of the Hierarchy
to monitorNullArgumentException
- hierarchyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.