Change node name without move method
Found a similar thread here: Need java code to convert the page names to lower case which a staff member posted this bit of code:
void rename(Node node, String newName) throws RepositoryException
{
node.getSession().move(node.getPath(), node.getParent().getPath() + "/" + newName.toLowerCase()); //
node.getSession().save();
}
which is close to what I need except that when its executed the node structure is changed and the newly named node is pushed to the bottom and I need it to maintain position in the structure.