Class DocumentUtils


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

      • DocumentUtils

        public DocumentUtils()
    • Method Detail

      • getHandle

        public static Optional<javax.jcr.Node> getHandle​(String uuid,
                                                         javax.jcr.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​(javax.jcr.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​(javax.jcr.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<javax.jcr.Node> findHandle​(javax.jcr.Node node)