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:
null
is returned.
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
Constructor and Description |
---|
HandleIdentifierStrategy() |
Modifier and Type | Method and Description |
---|---|
String |
getIdentifier(javax.jcr.Node node)
Traverses up the tree until a node of the type
HippoNodeType.NT_HANDLE is found
and returns the identifier of that node. |
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.
getIdentifier
in interface IdentifierStrategy
node
- Node that is related to a handlenull
javax.jcr.RepositoryException
- if an identifier of the handle cannot be obtainedCopyright © 2007–2021 Hippo B.V. (http://www.onehippo.com). All rights reserved.