Class NodeTypeHelper
java.lang.Object
org.ametys.plugins.repository.jcr.NodeTypeHelper
Provides helper methods on node types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getNodeTypeName
(javax.jcr.Node node) Get the real nodetype name of a given node (even if it's a frozen node).static boolean
isNodeType
(javax.jcr.Node node, String nodeTypeName) Test the real nodetype name of a given node (even if it's a frozen node).
-
Method Details
-
getNodeTypeName
Get the real nodetype name of a given node (even if it's a frozen node).- Parameters:
node
- the node.- Returns:
- the real node's nodetype name.
- Throws:
javax.jcr.RepositoryException
- if an error occurs.
-
isNodeType
public static boolean isNodeType(javax.jcr.Node node, String nodeTypeName) throws javax.jcr.RepositoryException Test the real nodetype name of a given node (even if it's a frozen node).- Parameters:
node
- the node to test.nodeTypeName
- the node type to test.- Returns:
- true if the node is of the given nodetype, false otherwise.
- Throws:
javax.jcr.RepositoryException
- if an error occurs.
-