Class 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
    In all other cases null is returned.

    • Field Detail

      • log

        public static final org.slf4j.Logger log
    • Constructor Detail

      • HandleIdentifierStrategy

        public HandleIdentifierStrategy()
    • 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 interface IdentifierStrategy
        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