开发者

How can you change the name of a JCR node?

开发者 https://www.devze.com 2023-01-24 14:01 出处:网络
I\'m trying to change t开发者_如何转开发he name of a JCR node, but I have no idea how? Has someone of you some hints?

I'm trying to change t开发者_如何转开发he 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();
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消