Class NodeGroupHelper
- java.lang.Object
-
- org.ametys.workspaces.repository.jcr.NodeGroupHelper
-
public final class NodeGroupHelper extends Object
Node group helper.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_CHILDREN_PER_NODE
The maximum children to display per node.
-
Constructor Summary
Constructors Modifier Constructor Description private
NodeGroupHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static String
getGroupPaths(Node node, int maxNodesPerGroup)
Get the virtual a node's path relative to its parent.static String
getPathWithGroups(Node node)
Get the node's full path, including virtual path segments.
-
-
-
Field Detail
-
MAX_CHILDREN_PER_NODE
public static final int MAX_CHILDREN_PER_NODE
The maximum children to display per node.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NodeGroupHelper
private NodeGroupHelper()
-
-
Method Detail
-
getPathWithGroups
public static String getPathWithGroups(Node node) throws RepositoryException
Get the node's full path, including virtual path segments.- Parameters:
node
- the node of which to get the path.- Returns:
- the computed path.
- Throws:
RepositoryException
- if a repository error occurs.
-
getGroupPaths
private static String getGroupPaths(Node node, int maxNodesPerGroup) throws RepositoryException
Get the virtual a node's path relative to its parent. If the parent node has more than a specified node count, "virtual" paths are added between the parent and the node. The empty string is returned if the parent doesn't have more nodes than the maximum.- Parameters:
node
- the node to get the virtual path of.maxNodesPerGroup
- the maximum node per group.- Returns:
- the virtual path part of the node in its parent.
- Throws:
RepositoryException
- if a repository error occurs.
-
-