public interface HierarchyStructureNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes to a hierarchical structure. 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 structure of a
hierarchy. For notifications of changes to the Hierarchy
object use HierarchyNotificationSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForHierarchyStructureNotifications()
Tests if this user can register for
Hierarchy node
notifications. |
Hierarchy |
getHierarchy()
Gets the
Hierarchy associated with this session. |
Id |
getHierarchyId()
Gets the hierarchy
Id associated with this session. |
void |
registerForChangedAncestor(Id nodeId)
Registers for notification of an updated hierarchy structure that
impacts the ancestors of the specified node.
|
void |
registerForChangedDescendant(Id nodeId)
Registers for notification of an updated hierarchy structure that
impacts the descendants of the specified node.
|
void |
registerForDeletedHierarchyNode(Id nodeId)
Registers for notification of a deleted hierarchy node.
|
void |
registerForDeletedHierarchyNodes()
Registers for notification of deleted hierarchy nodes.
|
void |
registerForNewHierarchyNodes()
Register for notifications of new hierarchy nodes.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getHierarchy() throws OperationFailedException, PermissionDeniedException
Hierarchy
associated with this session. Hierarchy
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForHierarchyStructureNotifications()
Hierarchy
node
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 registerForNewHierarchyNodes() throws OperationFailedException, PermissionDeniedException
HierarchyStructureReceiver.newNode()
is invoked when a new
Hierarchy
node is added.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAncestor(Id nodeId) throws OperationFailedException, PermissionDeniedException
HierarchyStructureReceiver.newAncestor()
or
HierarchyStructureReceiver.deletedAncestor()
is invoked when
the specified hierarchy node experiences a change in ancestry.nodeId
- the Id
of the hierarchy
node to monitorNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDescendant(Id nodeId) throws OperationFailedException, PermissionDeniedException
HierarchyStructureReceiver.newDescendant()
or
HierarchyStructureReceiver.deletedDescendant()
is invoked when
the specified hierarchy node experiences a change in offspring.nodeId
- the Id
of the hierarchy
node to monitorNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedHierarchyNodes() throws OperationFailedException, PermissionDeniedException
HierarchyStructureReceiver.deletedNode()
is invoked when a
hierarchy ndoe is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedHierarchyNode(Id nodeId) throws OperationFailedException, PermissionDeniedException
HierarchyStructureReceiver.deletedNode()
is invoked when the
specified hierarchy node is deleted.nodeId
- the Id
of the Hierarchy
node to monitorNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.