Class HandleIdentifierStrategy
java.lang.Object
org.hippoecm.frontend.usagestatistics.events.HandleIdentifierStrategy
- All Implemented Interfaces:
IdentifierStrategy
Strategy to find the id of the handle of a node.
The strategy returns the identifier of the handle if:
- The node is the handle
- The node is a descendant of a handle
- The node is revision
null
is returned.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetIdentifier
(Node node) Traverses up the tree until a node of the typeHippoNodeType.NT_HANDLE
is found and returns the identifier of that node.
-
Field Details
-
log
public static final org.slf4j.Logger log
-
-
Constructor Details
-
HandleIdentifierStrategy
public HandleIdentifierStrategy()
-
-
Method Details
-
getIdentifier
Traverses up the tree until a node of the type
HippoNodeType.NT_HANDLE
is found and returns the identifier of that node.If the node is a revision, the handle is found and the identifier of the handle is returned.
Otherwise
null
is returned.- Specified by:
getIdentifier
in interfaceIdentifierStrategy
- Parameters:
node
- Node that is related to a handle- Returns:
- the identifier of the handle or
null
- Throws:
RepositoryException
- if an identifier of the handle cannot be obtained
-