I'm trying to change the name of a JCR node, but I have no idea how? Has someone of you some hints?
Many thanks.
I'm trying to change the name of a JCR node, but I have no idea how? Has someone of you some hints?
Many thanks.
The Jackrabbit Wiki provides an example:
void rename(Node node, String newName) throws RepositoryException
{
node.getSession().move(node.getPath(), node.getParent().getPath() + "/" + newName);
// Don't forget - not necessarily here at this place:
// node.getSession().save();
}
© 2022 - 2024 — McMap. All rights reserved.