Class NodeHelper
java.lang.Object
org.ametys.workspaces.repository.jcr.NodeHelper
Provides helper methods on nodes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic javax.jcr.Node
getChildAt
(javax.jcr.Node node, int index) Get the child node at the given indexstatic void
Rename the givenNode
with the given new name
-
Method Details
-
rename
Rename the givenNode
with the given new name- Parameters:
node
- the node to renamenewName
- the new name of the node- Throws:
javax.jcr.RepositoryException
- if an error occurs.
-
getChildAt
public static javax.jcr.Node getChildAt(javax.jcr.Node node, int index) throws NoSuchElementException, javax.jcr.RepositoryException Get the child node at the given index- Parameters:
node
- The parent nodeindex
- The position of the child node- Returns:
- The child node
- Throws:
NoSuchElementException
- If no node existjavax.jcr.RepositoryException
- If an error occurred
-