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 frozenIds = new HashSet();
        for (VersionIterator it = vm.getVersionHistory(path).getAllVersions(); it.hasNext(); ) {
            Version v = it.nextVersion();
View Full Code Here


    public NodeId checkpoint(SessionInfo sessionInfo, final NodeId nodeId) throws UnsupportedRepositoryOperationException, RepositoryException {
        final SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
        Version newVersion = (Version) executeWithLocalEvents(new Callable() {
            public Object run() throws RepositoryException {
                VersionManager vMgr = sInfo.getSession().getWorkspace().getVersionManager();
                return vMgr.checkpoint(getNodePath(nodeId, sInfo));
            }
        }, sInfo);
        return idFactory.createNodeId(newVersion, sInfo.getNamePathResolver());
    }
View Full Code Here

        Node n2 = n1.getNode(nodeName2);
        n2.setProperty(propertyName1, newValue);
        testRootNode.getSession().save();

        VersionManager vm1 = testRootNode.getSession().getWorkspace().getVersionManager();
        vm1.checkpoint(n2.getPath());
        vm1.checkpoint(n1.getPath());
    }
}
View Full Code Here

        n2.setProperty(propertyName1, newValue);
        testRootNode.getSession().save();

        VersionManager vm1 = testRootNode.getSession().getWorkspace().getVersionManager();
        vm1.checkpoint(n2.getPath());
        vm1.checkpoint(n1.getPath());
    }
}
View Full Code Here

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

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

        Node n2 = n1.getNode(nodeName2);
        n2.setProperty(propertyName1, newValue);
        testRootNode.getSession().save();

        VersionManager vm1 = testRootNode.getSession().getWorkspace().getVersionManager();
        vm1.checkpoint(n2.getPath());
        vm1.checkpoint(n1.getPath());
    }
}
View Full Code Here

        n2.setProperty(propertyName1, newValue);
        testRootNode.getSession().save();

        VersionManager vm1 = testRootNode.getSession().getWorkspace().getVersionManager();
        vm1.checkpoint(n2.getPath());
        vm1.checkpoint(n1.getPath());
    }
}
View Full Code Here

     * @since JCR 2.9
     */
    public void testGetVersionableIdentifier() throws RepositoryException {

        VersionManager vm = versionableNode.getSession().getWorkspace().getVersionManager();
        vm.checkpoint(versionableNode.getPath());
       
        assertEquals("Method getVersionableIdentifier() must return the identifier of the corresponding Node.",
                vm.getVersionHistory(versionableNode.getPath()).getVersionableIdentifier(),
                versionableNode.getIdentifier());
    }
View Full Code Here

       
        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

        superuser.save();
        String path = n.getPath();

        // create some versions
        VersionManager mgr = superuser.getWorkspace().getVersionManager();
        mgr.checkpoint(path); // v1.0
        mgr.checkpoint(path); // v1.1
        mgr.checkpoint(path); // v1.2

        // get version history
        VersionHistory vh = mgr.getVersionHistory(path);
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.