Class NodeHelper

java.lang.Object
org.ametys.workspaces.repository.jcr.NodeHelper

public final class NodeHelper extends Object
Provides helper methods on nodes.
  • Method Details

    • rename

      public static void rename(javax.jcr.Node node, String newName) throws javax.jcr.RepositoryException
      Rename the given Node with the given new name
      Parameters:
      node - the node to rename
      newName - 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 node
      index - The position of the child node
      Returns:
      The child node
      Throws:
      NoSuchElementException - If no node exist
      javax.jcr.RepositoryException - If an error occurred