Package javax.jcr

Examples of javax.jcr.Workspace


        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Session session = b1.getSession();
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        // add child node c to b1
        Node c = b1.addNode("c");
        b1.save();
View Full Code Here


        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Session session = b1.getSession();
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        // add child node c to b1
        Node c = b1.addNode("c");
        b1.save();
View Full Code Here

        // add mixin
        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        // add child node c to b1
        Node c = b1.addNode("c");
        b1.save();
View Full Code Here

        // add mixin
        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        // add child node c to b1
        Node c = b1.addNode("c");
        b1.save();
View Full Code Here

        // add mixin
        ensureMixinType(b, mixShareable);
        b.save();

        Workspace workspace = b.getSession().getWorkspace();

        // clone to all other nodes
        for (int i = 1; i < parents.length; i++) {
            workspace.clone(workspace.getName(), b.getPath(),
                    parents[i].getPath() + "/b", false);
        }

        // remove all parents and save
        for (int i = 0; i < parents.length; i++) {
View Full Code Here

       testRootNode.save();

       //now we have a shareable node N with path a1/b1

       Session session = testRootNode.getSession();
       Workspace workspace = session.getWorkspace();
       String path = a2.getPath() + "/b2";
       workspace.clone(workspace.getName(), b1.getPath(), path, false);

       //now we have another shareable node N' in the same shared set as N with path a1/a2/b2

       //using the path a1/a2/b2, we should get the node N' here
       Item item = session.getItem(path);
View Full Code Here

        Listener(Session session)
                throws UnsupportedRepositoryOperationException,
                RepositoryException {
            this.session = session;
            Workspace ws = session.getWorkspace();
            manager = ws.getObservationManager();
            manager.addEventListener(this, Event.NODE_ADDED, "/", true, null,
                    null, false);
        }
View Full Code Here

            throw new LockException(msg);
        }
    }

    static SessionLockManager getSessionLockManager(SessionImpl session) throws RepositoryException {
        Workspace wsp = session.getWorkspace();
        return (SessionLockManager) wsp.getLockManager();
    }
View Full Code Here

        // add mixin
        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b", false);

        Node[] shared = getSharedSet(b1);
        assertEquals(2, shared.length);
        b1 = shared[0];
View Full Code Here

        // add mixin
        ensureMixinType(b1, mixShareable);
        b1.save();

        // clone
        Workspace workspace = b1.getSession().getWorkspace();
        workspace.clone(workspace.getName(), b1.getPath(),
                a2.getPath() + "/b2", false);

        Node[] shared = getSharedSet(b1);
        assertEquals(2, shared.length);
        b1 = shared[0];
View Full Code Here

TOP

Related Classes of javax.jcr.Workspace

Copyright © 2018 www.massapicom. 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.