Package org.hippoecm.repository.util
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 Summary
Constructors Constructor Description DocumentUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<Node>
findHandle(Node node)
static Optional<String>
getDisplayName(Node handle)
Retrieve the display name of a documentstatic Optional<Node>
getHandle(String uuid, Session session)
Retrieve a document handle node.static Optional<String>
getVariantNodeType(Node handle)
Retrieve the node type of a variant node of a document identified by its handle node, e.g.
-
-
-
Method Detail
-
getHandle
public static Optional<Node> getHandle(String uuid, Session session)
Retrieve a document handle node.- Parameters:
uuid
- UUID of the nodesession
- 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
-
-