Package javax.jcr.version

Examples of javax.jcr.version.VersionManager.checkin()


        // default workspace
        Node originalNode = testRootNode.getNode(nodeName1);
        VersionManager vmWsp1 = originalNode.getSession().getWorkspace().getVersionManager();
        String originalPath = originalNode.getPath();
        vmWsp1.checkout(originalPath);
        vmWsp1.checkin(originalPath);

        // second workspace
        VersionManager vmWsp2 = nodeToMerge.getSession().getWorkspace().getVersionManager();
        String path = nodeToMerge.getPath();
        vmWsp2.checkin(path);
View Full Code Here


        vmWsp1.checkin(originalPath);

        // second workspace
        VersionManager vmWsp2 = nodeToMerge.getSession().getWorkspace().getVersionManager();
        String path = nodeToMerge.getPath();
        vmWsp2.checkin(path);

        // "merge" the clonedNode with the newNode from the default workspace
        vmWsp2.checkout(path);

        // merge, besteffort set to false
View Full Code Here

        topVNode.setProperty(propertyName1, topVNode.getName());
        String path = topVNode.getPath();

        // save default workspace
        testRootNode.getSession().save();
        versionManager.checkin(path);
        versionManager.checkout(path);

        log.println("test nodes created successfully on " + workspace.getName());

        // clone the newly created node from src workspace into second workspace
View Full Code Here

        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
        try {
            VersionManager versionManager = versionableNode.getSession().getWorkspace().getVersionManager();
            String path = versionableNode.getPath();
            versionManager.checkout(path);
            Version v = versionManager.checkin(path);
            vHistory.addVersionLabel(v.getName(), versionLabel, false);

            fail("Adding a version label that already exist in the version history must throw a VersionException.");
        } catch (VersionException e) {
            //success
View Full Code Here

        vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
        try {
            VersionManager versionManager = versionableNode.getSession().getWorkspace().getVersionManager();
            String path = versionableNode.getPath();
            versionManager.checkout(path);
            Version v = versionManager.checkin(path);
            vHistory.addVersionLabel(v.getName(), versionLabel, true);

            if (!vHistory.hasVersionLabel(v, versionLabel)) {
                fail("If 'moveLabel' is true, an existing version label must be moved to the indicated version.");
            }
View Full Code Here

        HashSet testLabels = new HashSet(Arrays.asList(vHistory.getVersionLabels()));

        VersionManager versionManager = versionableNode.getSession().getWorkspace().getVersionManager();
        String path = versionableNode.getPath();
        versionManager.checkout(path);
        Version v = versionManager.checkin(path);

        vHistory.addVersionLabel(v.getName(), versionLabel, false);
        testLabels.add(versionLabel);
        vHistory.addVersionLabel(rootVersion.getName(), versionLabel2, false);
        testLabels.add(versionLabel2);
View Full Code Here

        // add a version label to another version (not added to the testLabel set)
        VersionManager versionManager = versionableNode.getSession().getWorkspace().getVersionManager();
        String path = versionableNode.getPath();
        versionManager.checkout(path);
        Version v = versionManager.checkin(path);
        vHistory.addVersionLabel(v.getName(), versionLabel2, false);

        String[] labels = vHistory.getVersionLabels(rootVersion);
        for (int i = 0; i < labels.length; i++) {
            String l = labels[i];
View Full Code Here

        Node nodeWS1_2Sub1 = nodeWS1_2.addNode(nodeName1, versionableNodeType);
        Node nodeWS1_3 = mergeRootNode.addNode(nodeName3, versionableNodeType);

        testRootNode.getSession().save();

        versionManager.checkin(nodeWS1_1.getPath()); // create version 1.0
        versionManager.checkout(nodeWS1_1.getPath());

        versionManager.checkin(nodeWS1_1Sub1.getPath()); // create version 1.0
        versionManager.checkout(nodeWS1_1Sub1.getPath());
View Full Code Here

        testRootNode.getSession().save();

        versionManager.checkin(nodeWS1_1.getPath()); // create version 1.0
        versionManager.checkout(nodeWS1_1.getPath());

        versionManager.checkin(nodeWS1_1Sub1.getPath()); // create version 1.0
        versionManager.checkout(nodeWS1_1Sub1.getPath());

        versionManager.checkin(nodeWS1_2.getPath()); // create version 1.0
        versionManager.checkout(nodeWS1_2.getPath());
View Full Code Here

        versionManager.checkout(nodeWS1_1.getPath());

        versionManager.checkin(nodeWS1_1Sub1.getPath()); // create version 1.0
        versionManager.checkout(nodeWS1_1Sub1.getPath());

        versionManager.checkin(nodeWS1_2.getPath()); // create version 1.0
        versionManager.checkout(nodeWS1_2.getPath());

        versionManager.checkin(nodeWS1_2Sub1.getPath()); // create version 1.0
        versionManager.checkout(nodeWS1_2Sub1.getPath());
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.