Examples of JcrVersion


Examples of org.apache.chemistry.opencmis.jcr.JcrVersion

    }

    public JcrDocument getJcrNode(Node node) throws RepositoryException {
        VersionManager versionManager = node.getSession().getWorkspace().getVersionManager();
        Version version = versionManager.getBaseVersion(node.getPath());
        return new JcrVersion(node, version, typeManager, pathManager, typeHandlerManager);
    }
View Full Code Here

Examples of org.brixcms.jcr.api.JcrVersion

    public static JcrVersion[] wrap(Version delegate[], JcrSession session) {
        if (delegate == null) {
            return null;
        } else {
            JcrVersion res[] = new JcrVersion[delegate.length];
            for (int i = 0; i < delegate.length; ++i) {
                res[i] = wrap(delegate[i], session);
            }
            return res;
        }
View Full Code Here

Examples of org.jahia.services.content.decorator.JCRVersion

        List<String> targetHistoryList = new ArrayList<String>();
        while (targetHistory.hasNext()) {
            targetHistoryList.add(targetHistory.nextVersion().getName());
        }

        JCRVersion sourceVersion = vh.getVersion(sourceNode.getBaseVersion().getName());
        JCRVersion baseSourceVersion = null;
        JCRVersion baseTargetVersion = null;
        while (baseSourceVersion == null) {
            JCRVersion[] successors = sourceVersion.getSuccessors();
            for (JCRVersion successor : successors) {
                if (targetHistoryList.contains(successor.getName())) {
                    baseSourceVersion = sourceVersion;
                    baseTargetVersion = successor;
                    break;
                }
            }
            try {
                sourceVersion = sourceVersion.getLinearPredecessor();
            } catch (NullPointerException e) {
                sourceVersion = null;
            }               
        }
        logger.debug("compare "+sourceNode.getPath()+" version : "+baseSourceVersion.getName()+" with (source) "+sourceNode.getBaseVersion().getName());
        List<Diff> sourceDiff = compare(baseSourceVersion.getFrozenNode(), sourceNode, "");
        logger.debug("compare "+targetNode.getPath()+" version : "+baseTargetVersion.getName()+" with (target) "+targetNode.getBaseVersion().getName());
        List<Diff> targetDiff = compare(baseTargetVersion.getFrozenNode(), targetNode, "");

        sourceDiff.removeAll(targetDiff);

        // Check for conflicts in changed properties
        Map<String, PropertyChangedDiff> changedProperties = new HashMap<String, PropertyChangedDiff>();
View Full Code Here

Examples of org.jahia.services.content.decorator.JCRVersion

            logger.debug("Checkin "+absPath  +" in "+getName()+", was "+getBaseVersion(absPath).getName());
            return JCRObservationManager.doWorkspaceWriteCall(getSession(), JCRObservationManager.NODE_CHECKIN, new JCRCallback<JCRVersion>() {
                public JCRVersion doInJCR(JCRSessionWrapper session) throws RepositoryException {
                    try {
                        JCRNodeWrapper node = session.getNode(absPath);
                        JCRVersion result = (JCRVersion) node.getProvider().getNodeWrapper(versionManager.checkin(node.getRealNode().getPath()), session);

                        if (session.getLocale() != null) {
                            try {
                                versionManager.checkin(node.getI18N(session.getLocale()).getPath());
                            } catch (ItemNotFoundException e) {
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.