Package javax.jcr

Examples of javax.jcr.Node.update()


                }
                node.restoreByLabel(labels[0], removeExisting);

            } else if (updateInfo.getWorkspaceHref() != null) {
                String workspaceName = getLocatorFromHref(updateInfo.getWorkspaceHref()).getWorkspaceName();
                node.update(workspaceName);
            } else {
                throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Invalid update request body.");
            }

            // unregister the event listener again
View Full Code Here


        // save changes
        superuser.save();

        try {
            testNode.update(getNonExistingWorkspaceName(superuser));
            fail("Calling Node.update() on a non existing workspace should throw NoSuchWorkspaceException");
        } catch (NoSuchWorkspaceException e) {
            // ok, works as expected
        }
    }
View Full Code Here

        testNode.setProperty(propertyName1, "test");

        superuser.save();

        // call the update method on test node in default workspace
        testNode.update(workspaceName);

        // check if property is still there
        assertTrue("Node got property removed after Node.update() eventhough node has no clone", testNode.hasProperty(propertyName1));
        // check if node did not get childs suddenly
        assertFalse("Node has children assigned after Node.update() eventhough node has no clone", testNode.hasNodes());
View Full Code Here

        // save changes
        superuser.save();

        try {
            testNode.update(getNonExistingWorkspaceName(superuser));
            fail("Calling Node.update() on a non existing workspace should throw NoSuchWorkspaceException");
        } catch (NoSuchWorkspaceException e) {
            // ok, works as expected
        }
    }
View Full Code Here

        testNode.setProperty(propertyName1, "test");

        superuser.save();

        // call the update method on test node in default workspace
        testNode.update(workspaceName);

        // check if property is still there
        assertTrue("Node got property removed after Node.update() eventhough node has no clone", testNode.hasProperty(propertyName1));
        // check if node did not get childs suddenly
        assertFalse("Node has children assigned after Node.update() eventhough node has no clone", testNode.hasNodes());
View Full Code Here

      Node node1 = (Node)session.getItem("/testNodeUpdate1/childNode2/jcr:content");
      // log.debug(">>> DATA "+node1.getProperty("jcr:data"));

      assertEquals("this is the content", node1.getProperty("jcr:data").getString());

      node1.update("ws2");

      // because of bug
      node1 = (Node)session.getItem("/testNodeUpdate1/childNode2/jcr:content");

      assertEquals("this is the NEW content", node1.getProperty("jcr:data").getString());
View Full Code Here

   {
      Node n1 = testRoot.getNode("node1");

      assertFalse("There are not property in ws should be", n1.hasProperty("prop1"));

      n1.update("ws1");

      assertTrue("The property 'prop1' should be in ws", n1.hasProperty("prop1"));
   }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.