Skip to content

Instantly share code, notes, and snippets.

@vstorm83
Created May 25, 2011 02:25
Show Gist options
  • Select an option

  • Save vstorm83/990200 to your computer and use it in GitHub Desktop.

Select an option

Save vstorm83/990200 to your computer and use it in GitHub Desktop.
TestNavigationServiceSave - TestRename
public void testRenameNode() throws Exception
{
MOPService mop = mgr.getPOMService();
Site portal = mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE, "rename_node2");
portal.getRootNavigation().addChild("default");
//
sync(true);
//
NavigationContext nav = service.loadNavigation(SiteKey.portal("rename_node2"));
Node root = service.loadNode(Node.MODEL, nav, Scope.ALL, null).getNode();
Node temp = root.addChild("temp");
temp.setName("bar");
service.saveNode(root.context, null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment