Package javax.jcr

Examples of javax.jcr.Session.removeItem()


        final String testText = "Hello." + Math.random();

        Session s = getHelper().getSuperuserSession();
        if (s.itemExists(pathA)) {
            s.removeItem(pathA);
            s.save();
        }

        assertFalse(s.itemExists(pathA));
View Full Code Here


        assertTrue(s.itemExists(pathA));

        // Move to pathB
        if (s.itemExists(pathB)) {
            s.removeItem(pathB);
            s.save();
        }

        assertFalse(s.itemExists(pathB));
View Full Code Here

        Session testSession = null;
        try {
            testSession = getHelper().getReadWriteSession();
            // removal of the locked node is a alteration of the parent, which
            // isn't locked -> must succeed.
            testSession.removeItem(nPath);
            testSession.save();
        } finally {
            if (testSession != null) {
                testSession.logout();
            }
View Full Code Here

        Session testSession = null;

        try {
            testSession = getHelper().getReadWriteSession();
            try {
                testSession.removeItem(childN.getPath());
                testSession.save();
                fail("Locked child node cannot be removed by another session.");
            } catch (LockException e) {
                // success
            }
View Full Code Here

                fail("Locked child node cannot be removed by another session.");
            } catch (LockException e) {
                // success
            }
            try {
                testSession.removeItem(childP.getPath());
                testSession.save();
                fail("Locked child node cannot be removed by another session.");
            } catch (LockException e) {
                // success
            }
View Full Code Here

        Session testSession = null;
        try {
            testSession = getHelper().getReadWriteSession();
            // removal of the locked node is a alteration of the parent, which
            // isn't locked -> must succeed.
            testSession.removeItem(nPath);
            testSession.save();
        } finally {
            if (testSession != null) {
                testSession.logout();
            }
View Full Code Here

        Session testSession = null;

        try {
            testSession = getHelper().getReadWriteSession();
            try {
                testSession.removeItem(childN.getPath());
                testSession.save();
                fail("Locked child node cannot be removed by another session.");
            } catch (LockException e) {
                // success
            }
View Full Code Here

                fail("Locked child node cannot be removed by another session.");
            } catch (LockException e) {
                // success
            }
            try {
                testSession.removeItem(childP.getPath());
                testSession.save();
                fail("Locked child node cannot be removed by another session.");
            } catch (LockException e) {
                // success
            }
View Full Code Here

            assertEquals("Invalid mime-type", "text/plain", file2Binary.getMimeType());

            // expect 3 binaries
            assertEquals("Incorrect number of binaries in store", 3, binariesCount());

            session.removeItem("/file1.txt");
            session.removeItem("/file2.txt");
            session.save();

            Thread.sleep(2);
            binaryStore().removeValuesUnusedLongerThan(1, TimeUnit.MILLISECONDS);
View Full Code Here

            // expect 3 binaries
            assertEquals("Incorrect number of binaries in store", 3, binariesCount());

            session.removeItem("/file1.txt");
            session.removeItem("/file2.txt");
            session.save();

            Thread.sleep(2);
            binaryStore().removeValuesUnusedLongerThan(1, TimeUnit.MILLISECONDS);
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.