Class DocumentUtils

java.lang.Object
org.hippoecm.repository.util.DocumentUtils

public class DocumentUtils extends Object
DocumentUtils provides utility methods for dealing with JCR nodes that represent documents.
  • Constructor Details

    • DocumentUtils

      public DocumentUtils()
  • Method Details

    • getHandle

      public static Optional<Node> getHandle(String uuid, Session session)
      Retrieve a document handle node.
      Parameters:
      uuid - UUID of the node
      session - JCR session to access the node
      Returns:
      Handle node or nothing, wrapped in an Optional
    • getDisplayName

      public static Optional<String> getDisplayName(Node handle)
      Retrieve the display name of a document
      Parameters:
      handle - JCR node representing a document handle
      Returns:
      Display string or nothing, wrapped in an Optional
    • getVariantNodeType

      public static Optional<String> getVariantNodeType(Node handle)
      Retrieve the node type of a variant node of a document identified by its handle node, e.g. "project:blogpost".
      Parameters:
      handle - JCR node representing a document handle
      Returns:
      Node type or nothing, wrapped in an Optional
    • findHandle

      public static Optional<Node> findHandle(Node node)