Package javax.jcr.version

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


       
        String path = versionableNode.getPath();
        int cnt = 2;
       
        for (int i = 0; i < cnt; i++) {
            vm.checkpoint(path);
        }

        Set<String> frozenIds = new HashSet<String>();
        for (VersionIterator it = vm.getVersionHistory(path).getAllVersions(); it.hasNext(); ) {
            Version v = it.nextVersion();
View Full Code Here


        n.addMixin(mixVersionable);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);

        // check if versionable node has references to v1.0
        assertEquals("v1.0", v1.getIdentifier(), n.getProperty(Property.JCR_BASE_VERSION).getString());
        assertEquals("v1.0", v1.getIdentifier(), n.getProperty(Property.JCR_PREDECESSORS).getValues()[0].getString());
View Full Code Here

        n.setProperty("myref", ref);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);
        Node frozen = v1.getFrozenNode();

        assertEquals("ref", ref.getPath(), frozen.getProperty("myref").getNode().getPath());

        checkReferences("ref in version store", ref.getReferences(), n.getPath() + "/myref");
View Full Code Here

        n.setProperty("myref", ref);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);

        String newPath = testRootNode.getPath() + "/" + nodeName3;
        superuser.move(ref.getPath(), newPath);
        superuser.save();
        ref = superuser.getNode(newPath);
View Full Code Here

        n.addMixin(mixVersionable);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);

        // check if versionable node has references to v1.0
        assertEquals("v1.0", v1.getIdentifier(), n.getProperty(Property.JCR_BASE_VERSION).getString());
        assertEquals("v1.0", v1.getIdentifier(), n.getProperty(Property.JCR_PREDECESSORS).getValues()[0].getString());
View Full Code Here

        n.setProperty("myref", ref);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);
        Node frozen = v1.getFrozenNode();

        assertEquals("ref", ref.getPath(), frozen.getProperty("myref").getNode().getPath());

        checkReferences("ref in version store", ref.getReferences(), n.getPath() + "/myref");
View Full Code Here

        n.setProperty("myref", ref);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);

        String newPath = testRootNode.getPath() + "/" + nodeName3;
        superuser.move(ref.getPath(), newPath);
        superuser.save();
        ref = superuser.getNode(newPath);
View Full Code Here

        n.addMixin(mixVersionable);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);

        // check if versionable node has references to v1.0
        assertEquals("v1.0", v1.getIdentifier(), n.getProperty(Property.JCR_BASE_VERSION).getString());
        assertEquals("v1.0", v1.getIdentifier(), n.getProperty(Property.JCR_PREDECESSORS).getValues()[0].getString());
View Full Code Here

        n.setProperty("myref", ref);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);
        Node frozen = v1.getFrozenNode();

        assertEquals("ref", ref.getPath(), frozen.getProperty("myref").getNode().getPath());

        checkReferences("ref in version store", ref.getReferences(), n.getPath() + "/myref");
View Full Code Here

        n.setProperty("myref", ref);
        superuser.save();

        String p = n.getPath();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        Version v1 = vMgr.checkpoint(p);

        String newPath = testRootNode.getPath() + "/" + nodeName3;
        superuser.move(ref.getPath(), newPath);
        superuser.save();
        ref = superuser.getNode(newPath);
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.