Class HandleIdentifierStrategy
- java.lang.Object
-
- org.hippoecm.frontend.usagestatistics.events.HandleIdentifierStrategy
-
- All Implemented Interfaces:
IdentifierStrategy
public class HandleIdentifierStrategy extends Object implements 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
Fields Modifier and Type Field Description static org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description HandleIdentifierStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getIdentifier(javax.jcr.Node node)
Traverses up the tree until a node of the typeHippoNodeType.NT_HANDLE
is found and returns the identifier of that node.
-
-
-
Method Detail
-
getIdentifier
public String getIdentifier(javax.jcr.Node node) throws javax.jcr.RepositoryException
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:
javax.jcr.RepositoryException
- if an identifier of the handle cannot be obtained
-
-