Package javax.jcr

Examples of javax.jcr.Node.checkout()


            VersioningConfiguration versioningConfiguration) throws RepositoryException {
        if (versioningConfiguration.isAutoCheckout()) {
            Node versionableNode = findVersionableAncestor(node);
            if (versionableNode != null) {
                if (!versionableNode.isCheckedOut()) {
                    versionableNode.checkout();
                    changes.add(Modification.onCheckout(versionableNode.getPath()));
                }
            }
        }
    }
View Full Code Here


    protected void checkoutIfNecessary(Node node) throws RepositoryException {
        if (this.configuration.isAutoCheckout()) {
            Node versionableNode = findVersionableAncestor(node);
            if (versionableNode != null) {
                if (!versionableNode.isCheckedOut()) {
                    versionableNode.checkout();
                    if (this.importListener != null) {
                        this.importListener.onCheckout(versionableNode.getPath());
                    }
                }
            }
View Full Code Here

                response.setStatus(HttpServletResponse.SC_NOT_FOUND,
                    "Missing source " + resource + " for checkout");
                return;
            }

            node.checkout();
            changes.add(Modification.onCheckout(resource.getPath()));

        } else {

            while (res.hasNext()) {
View Full Code Here

            while (res.hasNext()) {
                Resource resource = res.next();
                Node node = resource.adaptTo(Node.class);
                if (node != null) {
                    node.checkout();
                    changes.add(Modification.onCheckout(resource.getPath()));
                }
            }

        }
View Full Code Here

        Node n = createVersionableNode(superuser.getNode(path));
        allow(n.getPath(), versionPrivileges);

        Node testNode = testSession.getNode(n.getPath());
        testNode.checkin();
        testNode.checkout();

        // accessing the version history must be allowed if the versionable node
        // is readable to the editing test session.
        VersionHistory vh = testNode.getVersionHistory();
        String vhPath = vh.getPath();
View Full Code Here

        Node n = createVersionableNode(superuser.getNode(path));
        allow(n.getPath(), versionPrivileges);

        Node testNode = testSession.getNode(n.getPath());
        testNode.checkin();
        testNode.checkout();

        VersionHistory vh = testNode.getVersionHistory();
        String vhPath = vh.getPath();
        String vhUUID = vh.getIdentifier();
View Full Code Here

    public void testAccessVersionHistoryVersionableNodeRemoved() throws Exception {
        Node n = createVersionableNode(superuser.getNode(path));
        allow(n.getPath(), versionPrivileges);

        n.checkin();
        n.checkout();

        String versionablePath = n.getPath();
        VersionHistory vh = n.getVersionHistory();
        String vhPath = vh.getPath();
        String vhUUID = vh.getIdentifier();
View Full Code Here

        Node n = createVersionableNode(superuser.getNode(path));
        allow(n.getPath(), versionPrivileges);

        Node testNode = testSession.getNode(n.getPath());
        Version v = testNode.checkin();
        testNode.checkout();
        Version v2 = testNode.checkin();
        testNode.checkout();

        // -> VersionHistory.addVersionLabel must be allowed
        VersionHistory history = testNode.getVersionHistory();
View Full Code Here

        Node testNode = testSession.getNode(n.getPath());
        Version v = testNode.checkin();
        testNode.checkout();
        Version v2 = testNode.checkin();
        testNode.checkout();

        // -> VersionHistory.addVersionLabel must be allowed
        VersionHistory history = testNode.getVersionHistory();
        history.addVersionLabel(v.getName(), "testLabel", false);
        history.addVersionLabel(v2.getName(), "testLabel", true);
View Full Code Here

        modify(path, Privilege.JCR_NODE_TYPE_MANAGEMENT, true);
        modify(path, Privilege.JCR_VERSION_MANAGEMENT, true);

        Node n = createVersionableNode(testSession.getNode(path));
        n.checkin();
        n.checkout();
    }

    @Test
    public void testCheckInCheckout() throws Exception {
        modify(path, REP_WRITE, true);
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.