Package javax.jcr.version

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


        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);
        String id = vh.getIdentifier();
View Full Code Here


        // 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);
        String id = vh.getIdentifier();
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);
    }
View Full Code Here

        vMgr.setActivity(activity);
        try {
            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);
        } finally {
            vMgr.setActivity(null);
View Full Code Here

        jcrVersionLabels = superuser.getNamespacePrefix(NS_JCR_URI) + ":versionLabels";

        vHistory = versionableNode.getSession().getWorkspace().getVersionManager().getVersionHistory(versionableNode.getPath());
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        vMgr.checkpoint(versionableNode.getPath());
        version = vMgr.getBaseVersion(versionableNode.getPath());

        if (vHistory.hasVersionLabel(versionLabel)) {
            fail("Version label '" + versionLabel + "' is already present in this version history. Label test cannot be performed.");
        }
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

    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

    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

    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

       
        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

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.