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

  • Field Details

    • log

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

    • HandleIdentifierStrategy

      public HandleIdentifierStrategy()
  • Method Details

    • getIdentifier

      public String getIdentifier(Node node) throws 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:
      RepositoryException - if an identifier of the handle cannot be obtained