@Test @FixFor("MODE-2096") public void shouldReorderTransientChildren() throws Exception { Node parent = session.getRootNode().addNode("parent", "nt:unstructured"); try { parent.addNode("child1"); parent.addNode("child2"); parent.addNode("child3"); parent.addNode("child4"); parent.orderBefore("child4", "child3"); parent.orderBefore("child3", "child2"); parent.orderBefore("child2", "child1"); session.save(); List<String> paths = new ArrayList<String>(); NodeIterator nodeIterator = parent.getNodes(); while (nodeIterator.hasNext()) { paths.add(nodeIterator.nextNode().getPath()); } assertEquals(Arrays.asList("/parent/child4", "/parent/child3", "/parent/child2", "/parent/child1"), paths); } finally { parent.remove(); session.save(); } }
@Override public String getPath() throws RepositoryException { return path().getString(namespaces()); }
JcrNode extends AbstractJcrNode { @Override public String getPath() throws RepositoryException { return path().getString(namespaces()); } }
JcrNode extends AbstractJcrNode { @Override public String getPath() throws RepositoryException { return path().getString(namespaces()); } JcrNode( JcrSession session,
             NodeKey nodeKey ); }
JcrNode extends AbstractJcrNode { @Override public String getPath() throws RepositoryException { return path().getString(namespaces()); } JcrNode( JcrSession session,
             NodeKey nodeKey ); @Override int getIndex(); @Override String getName(); @Override AbstractJcrNode getParent(); @Override String getPath(); }
JcrNode extends AbstractJcrNode { @Override public String getPath() throws RepositoryException { return path().getString(namespaces()); } JcrNode( JcrSession session,
             NodeKey nodeKey ); @Override int getIndex(); @Override String getName(); @Override AbstractJcrNode getParent(); @Override String getPath();  }