Examples of nodeExists()


Examples of javax.jcr.Session.nodeExists()

        node.addNode(nodeName);
        session.save();

        Session session2 = createAnonymousSession();
        try {
            assertTrue(session2.nodeExists(newNode));
        } finally {
            session2.logout();
        }
    }
View Full Code Here

Examples of javax.jcr.Session.nodeExists()

    @Test
    public void testNodeIsCheckedOut() throws RepositoryException {
        Session s = repository.login(new GuestCredentials());
        sessions.add(s);

        assertFalse(s.nodeExists("/"));
        assertTrue(s.nodeExists("/testNode"));

        assertTrue(s.getWorkspace().getVersionManager().isCheckedOut("/testNode"));
    }
View Full Code Here

Examples of javax.jcr.Session.nodeExists()

    public void testNodeIsCheckedOut() throws RepositoryException {
        Session s = repository.login(new GuestCredentials());
        sessions.add(s);

        assertFalse(s.nodeExists("/"));
        assertTrue(s.nodeExists("/testNode"));

        assertTrue(s.getWorkspace().getVersionManager().isCheckedOut("/testNode"));
    }

}
View Full Code Here

Examples of javax.jcr.Session.nodeExists()

            }

            // ... must not be present in the alternate-workspace
            UserManager umgr = ((JackrabbitSession) s).getUserManager();
            assertNull(umgr.getAuthorizable("testUser"));
            assertFalse(s.nodeExists(userPath));

            String clonePath = userPath;
            String parentPath = Text.getRelativeParent(clonePath, 1);
            while (!s.nodeExists(parentPath)) {
                clonePath = parentPath;
View Full Code Here

Examples of javax.jcr.Session.nodeExists()

            assertNull(umgr.getAuthorizable("testUser"));
            assertFalse(s.nodeExists(userPath));

            String clonePath = userPath;
            String parentPath = Text.getRelativeParent(clonePath, 1);
            while (!s.nodeExists(parentPath)) {
                clonePath = parentPath;
                parentPath = Text.getRelativeParent(parentPath, 1);
            }

            // clone the user into the second workspace
View Full Code Here

Examples of javax.jcr.Session.nodeExists()

            s.getWorkspace().clone(superuser.getWorkspace().getName(), clonePath, clonePath, true);

            // ... now the user must be visible
            assertNotNull(umgr.getAuthorizable("testUser"));
            if (userPath != null) {
                assertTrue(s.nodeExists(userPath));               
            }
            // ... and able to login to that workspace
            Session us = getHelper().getRepository().login(new SimpleCredentials("testUser", "testUser".toCharArray()), altWsp);
            us.logout();
View Full Code Here

Examples of javax.jcr.Session.nodeExists()

            }

            // ... must not be present in the alternate-workspace
            UserManager umgr = ((JackrabbitSession) s).getUserManager();
            assertNull(umgr.getAuthorizable("testUser"));
            assertFalse(s.nodeExists(userPath));

            User u2 = umgr.createUser("testUser", "testUser");
            s.save();
            assertTrue(s.nodeExists(userPath));
View Full Code Here

Examples of javax.jcr.Session.nodeExists()

            assertNull(umgr.getAuthorizable("testUser"));
            assertFalse(s.nodeExists(userPath));

            User u2 = umgr.createUser("testUser", "testUser");
            s.save();
            assertTrue(s.nodeExists(userPath));

            Value value = superuser.getValueFactory().createValue("anyValue");
            u.setProperty(propertyName1, value);
            superuser.save();
View Full Code Here

Examples of javax.jcr.Session.nodeExists()

        // process sub packages
        Session s = node.getSession();
        List<JcrPackageImpl> subPacks = new LinkedList<JcrPackageImpl>();
        for (String path: subPackages) {
            if (s.nodeExists(path)) {
                JcrPackageImpl p = new JcrPackageImpl(s.getNode(path));
                if (!p.isValid()) {
                    // check if package was included as pure .zip or .jar
                    try {
                        p.tryUnwrap();
View Full Code Here

Examples of org.apache.felix.prefs.PreferencesImpl.nodeExists()

     */
    public void update(PreferencesImpl prefs) throws BackingStoreException {
        final PreferencesImpl root = this.load(prefs.getBackingStoreManager(), prefs.getDescription());
        if ( root != null ) {
            // and now update
            if ( root.nodeExists(prefs.absolutePath()) ) {
                final PreferencesImpl updated = (PreferencesImpl)root.node(prefs.absolutePath());
                prefs.update(updated);
            }
        }
    }
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.