Package javax.jcr

Examples of javax.jcr.Node.refresh()


        // complete transaction
        utx.commit();

        // unlock must now be visible to other session
        n2.refresh(false);
        assertFalse(lock2.isLive());
        assertFalse(n2.isLocked());
        assertFalse(n2.hasProperty(jcrLockOwner));
        assertFalse(n2.hasProperty(jcrlockIsDeep));
    }
View Full Code Here


        // complete transaction
        utx.commit();

        // unlock must now be visible to other session
        n2.refresh(false);
        assertFalse(lock2.isLive());
        assertFalse(n2.isLocked());
        assertFalse(n2.hasProperty(jcrLockOwner));
        assertFalse(n2.hasProperty(jcrlockIsDeep));
    }
View Full Code Here

        superuser.move(refNode.getPath(), destParentNode.getPath() + "/" + nodeName2);
        superuser.save();

        try {
            refNode2.refresh(true);
            Node parent = refNode2.getParent();
            if (parent.isSame(testSession.getItem(destParentNode.getPath()))) {
                // node has been automatically moved to new place
                assertItemStatus(refNode2, Status.EXISTING);
            } else {
View Full Code Here

        superuser.move(refNode.getPath(), destParentNode.getPath() + "/" + nodeName2);
        superuser.save();

        try {
            refNode2.refresh(true);
            Node parent = refNode2.getParent();
            if (parent.isSame(testSession.getItem(destParentNode.getPath()))) {
                // node has been automatically moved to new place
                assertItemStatus(refNode2, Status.EXISTING_MODIFIED);
            } else if (!isItemStatus(refNode2, Status.EXISTING_MODIFIED)) {
View Full Code Here

        testSession.getItem(destParentNode.getPath() + "/" + nodeName2);

        assertItemStatus(refNode2, Status.STALE_DESTROYED);
        try {
            refNode2.refresh(false);
            fail();
        } catch (InvalidItemStateException e) {
            // correct behaviour
        }
    }
View Full Code Here

        String destPath = destParentNode.getPath() + "/" + nodeName2;
        superuser.move(srcPath, destPath);
        superuser.save();

        try {
            refNode2.refresh(true);
            Node parent = refNode2.getParent();
        } catch (InvalidItemStateException e) {
        }

        assertItemStatus(refNode2, Status.REMOVED);
View Full Code Here

        // complete transaction
        utx.commit();

        // unlock must now be visible to other session
        n2.refresh(false);
        assertFalse(lock2.isLive());
        assertFalse(n2.isLocked());
        assertFalse(n2.hasProperty(jcrLockOwner));
        assertFalse(n2.hasProperty(jcrlockIsDeep));
    }
View Full Code Here

                        try {
                            node.addNode(token, "nt:folder");
                            node.save();
                        } catch (RepositoryException re) {
                            // we ignore this as this folder might be created from a different task
                            node.refresh(false);
                        }
                    }
                    node = node.getNode(token);
                }
                path = path.substring(pos + 1);
View Full Code Here

        // remove the node
        defaultRootNode.remove();

        try {
            testNode.refresh(true);
            fail("Calling Node.refresh() on deleted node should throw InvalidItemStateException!");
        } catch (InvalidItemStateException e) {
            // ok, works as expected
        }
    }
View Full Code Here

                            }
                            if ( autoSave ) node.save();
                        } catch (RepositoryException re) {
                            re.printStackTrace();
                            // we ignore this as this folder might be created from a different task
                            node.refresh(false);
                        }
                    }
                    node = node.getNode(token);
                }
                relativePath = relativePath.substring(pos + 1);
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.