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<javax.jcr.Node>
findHandle(javax.jcr.Node node)
static Optional<String>
getDisplayName(javax.jcr.Node handle)
Retrieve the display name of a documentstatic Optional<javax.jcr.Node>
getHandle(String uuid, javax.jcr.Session session)
Retrieve a document handle node.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.
-
-
-
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 nodesession
- 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)
-
-