Class NodeTypeHelper
- java.lang.Object
-
- org.ametys.plugins.repository.jcr.NodeTypeHelper
-
public final class NodeTypeHelper extends Object
Provides helper methods on node types.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NodeTypeHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getNodeTypeName(Node node)
Get the real nodetype name of a given node (even if it's a frozen node).static boolean
isNodeType(Node node, String nodeTypeName)
Test the real nodetype name of a given node (even if it's a frozen node).
-
-
-
Constructor Detail
-
NodeTypeHelper
private NodeTypeHelper()
-
-
Method Detail
-
getNodeTypeName
public static String getNodeTypeName(Node node) throws RepositoryException
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:
RepositoryException
- if an error occurs.
-
isNodeType
public static boolean isNodeType(Node node, String nodeTypeName) throws 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:
RepositoryException
- if an error occurs.
-
-