Package javax.jcr

Examples of javax.jcr.Node.update()


            // no automatic sync.
            assertFalse(u2.hasProperty(propertyName1));

            // update nodes
            Node n2 = s.getNode(userPath);
            n2.update(superuser.getWorkspace().getName());

            // now the value must be visible
            assertTrue(u2.hasProperty(propertyName1));
            assertEquals(value.getString(), u2.getProperty(propertyName1)[0].getString());
           
View Full Code Here


                    }
                    getRepositorySession().getWorkspace().restore(vs, 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

                }
                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

            // no automatic sync.
            assertFalse(u2.hasProperty(propertyName1));

            // update nodes
            Node n2 = s.getNode(userPath);
            n2.update(superuser.getWorkspace().getName());

            // now the value must be visible
            assertTrue(u2.hasProperty(propertyName1));
            assertEquals(value.getString(), u2.getProperty(propertyName1)[0].getString());
           
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

                    }
                    getRepositorySession().getWorkspace().restore(vs, 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

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

            } else if (updateInfo.getWorkspaceHref() != null) {
                String href = obtainAbsolutePathFromUri(updateInfo.getWorkspaceHref());
                String workspaceName = getLocatorFromHref(href).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

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.