Package javax.jcr

Examples of javax.jcr.Session.itemExists()


                }
               
                // Remove existing Lenya repository.
                String lenyaPublicationPath = JCR_LENYA_PUBLICATON_ROOT +
                    (JCR_LENYA_PUBLICATON_ROOT.endsWith("/") ? firstNodeName : "/" + firstNodeName);
                if (session.itemExists(lenyaPublicationPath)) {
                    Item jcrPublicationBase = session.getItem(lenyaPublicationPath);
                    jcrPublicationBase.remove();
                    session.save();
                }
   
View Full Code Here


        // add node and save
        Node n1 = testRootNode.addNode(nodeName1, testNodeType);
        n1.addMixin(mixVersionable);
        testRootNode.save();

        if (!s2.itemExists(testRootNode.getPath())) {
            s2.getRootNode().addNode(testRootNode.getName());
            s2.save();
        }
        s2.getWorkspace().clone(s1.getWorkspace().getName(), n1.getPath(), n1.getPath(), true);
        Node n2 = (Node) s2.getItem(n1.getPath());
View Full Code Here

            Item property1 = session1.getProperty("/node1/node3/property1");
            assertFalse(property1.isNode());
            assertEquals("value1", ((Property) property1).getString());

            // Make sure these items are not accessible through another session
            assertFalse(session2.itemExists("/node1"));
            assertFalse(session2.itemExists("/node1/node2"));
            assertFalse(session2.itemExists("/node1/node3"));
            assertFalse(session2.itemExists("/node1/node3/property1"));

            session1.save();
View Full Code Here

            assertFalse(property1.isNode());
            assertEquals("value1", ((Property) property1).getString());

            // Make sure these items are not accessible through another session
            assertFalse(session2.itemExists("/node1"));
            assertFalse(session2.itemExists("/node1/node2"));
            assertFalse(session2.itemExists("/node1/node3"));
            assertFalse(session2.itemExists("/node1/node3/property1"));

            session1.save();
View Full Code Here

            assertEquals("value1", ((Property) property1).getString());

            // Make sure these items are not accessible through another session
            assertFalse(session2.itemExists("/node1"));
            assertFalse(session2.itemExists("/node1/node2"));
            assertFalse(session2.itemExists("/node1/node3"));
            assertFalse(session2.itemExists("/node1/node3/property1"));

            session1.save();

            // Make sure these items are still accessible through another session
View Full Code Here

            // Make sure these items are not accessible through another session
            assertFalse(session2.itemExists("/node1"));
            assertFalse(session2.itemExists("/node1/node2"));
            assertFalse(session2.itemExists("/node1/node3"));
            assertFalse(session2.itemExists("/node1/node3/property1"));

            session1.save();

            // Make sure these items are still accessible through another session
            assertTrue(session2.itemExists("/node1"));
View Full Code Here

            assertFalse(session2.itemExists("/node1/node3/property1"));

            session1.save();

            // Make sure these items are still accessible through another session
            assertTrue(session2.itemExists("/node1"));
            assertTrue(session2.itemExists("/node1/node2"));
            assertTrue(session2.itemExists("/node1/node3"));
            assertTrue(session2.itemExists("/node1/node3/property1"));
        } finally {
            session1.logout();
View Full Code Here

            session1.save();

            // Make sure these items are still accessible through another session
            assertTrue(session2.itemExists("/node1"));
            assertTrue(session2.itemExists("/node1/node2"));
            assertTrue(session2.itemExists("/node1/node3"));
            assertTrue(session2.itemExists("/node1/node3/property1"));
        } finally {
            session1.logout();
            session2.logout();
View Full Code Here

            session1.save();

            // Make sure these items are still accessible through another session
            assertTrue(session2.itemExists("/node1"));
            assertTrue(session2.itemExists("/node1/node2"));
            assertTrue(session2.itemExists("/node1/node3"));
            assertTrue(session2.itemExists("/node1/node3/property1"));
        } finally {
            session1.logout();
            session2.logout();
        }
View Full Code Here

            // Make sure these items are still accessible through another session
            assertTrue(session2.itemExists("/node1"));
            assertTrue(session2.itemExists("/node1/node2"));
            assertTrue(session2.itemExists("/node1/node3"));
            assertTrue(session2.itemExists("/node1/node3/property1"));
        } finally {
            session1.logout();
            session2.logout();
        }
    }
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.