Package org.apache.jackrabbit.core.version

Examples of org.apache.jackrabbit.core.version.InconsistentVersioningState


            }

            if (vh == null) {
                if (isVersioned) {
                    message = intro + "getVersionHistoryOfNode returned null";
                    throw new InconsistentVersioningState(message);   
                }
            } else {
                vhid = vh.getId();
               
                // additional checks, see JCR-3101

                message = intro + " (getting the version names failed)";
                Name[] versionNames = vh.getVersionNames();
                boolean seenRoot = false;

                for (Name versionName : versionNames) {
                    seenRoot |= JCR_ROOTVERSION.equals(versionName);

                    log.debug("Checking version history of node {}, version {}", nid, versionName);

                    message = intro + " (getting version " + versionName + "  failed)";
                    InternalVersion v = vh.getVersion(versionName);

                    message = intro + "(frozen node of root version " + v.getId() + " missing)";
                    if (null == v.getFrozenNode()) {
                        throw new InconsistentVersioningState(message);
                    }
                }

                if (!seenRoot) {
                    message = intro + " (root version is missing)";
                    throw new InconsistentVersioningState(message);
                }
            }
        } catch (InconsistentVersioningState e) {
            log.info(message, e);
            NodeId nvhid = e.getVersionHistoryNodeId();
View Full Code Here


            }

            if (vh == null) {
                if (isVersioned) {
                    message = intro + "getVersionHistoryOfNode returned null";
                    throw new InconsistentVersioningState(message);   
                }
            } else {
                vhid = vh.getId();

                // additional checks, see JCR-3101

                message = intro + " (getting the version names failed)";
                Name[] versionNames = vh.getVersionNames();
                boolean seenRoot = false;

                for (Name versionName : versionNames) {
                    seenRoot |= JCR_ROOTVERSION.equals(versionName);

                    log.debug("Checking version history of node {}, version {}", nid, versionName);

                    message = intro + " (getting version " + versionName + "  failed)";
                    InternalVersion v = vh.getVersion(versionName);

                    message = intro + "(frozen node of root version " + v.getId() + " missing)";
                    if (null == v.getFrozenNode()) {
                        throw new InconsistentVersioningState(message);
                    }
                }

                if (!seenRoot) {
                    message = intro + " (root version is missing)";
                    throw new InconsistentVersioningState(message);
                }
            }
        } catch (InconsistentVersioningState e) {
            log.info(message, e);
            NodeId nvhid = e.getVersionHistoryNodeId();
View Full Code Here

            public VersionHistory perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(absPath);
                InternalVersionHistory vh = getVersionHistory(state);
                if (vh == null) {
                    throw new InconsistentVersioningState("Couldn't get version history for node " + state.getNodeId());
                }
                return (VersionHistory) session.getNodeById(vh.getId());
            }
            public String toString() {
                return "versionManager.getVersionHistory(" + absPath + ")";
View Full Code Here

            }

            if (vh == null) {
                if (isVersioned) {
                    message = intro + "getVersionHistoryOfNode returned null";
                    throw new InconsistentVersioningState(message);   
                }
            } else {
                vhid = vh.getId();
               
                // additional checks, see JCR-3101

                message = intro + " (getting the version names failed)";
                Name[] versionNames = vh.getVersionNames();
                boolean seenRoot = false;

                for (Name versionName : versionNames) {
                    seenRoot |= JCR_ROOTVERSION.equals(versionName);

                    log.debug("Checking version history of node {}, version {}", nid, versionName);

                    message = intro + " (getting version " + versionName + "  failed)";
                    InternalVersion v = vh.getVersion(versionName);

                    message = intro + "(frozen node of root version " + v.getId() + " missing)";
                    if (null == v.getFrozenNode()) {
                        throw new InconsistentVersioningState(message);
                    }
                }

                if (!seenRoot) {
                    message = intro + " (root version is missing)";
                    throw new InconsistentVersioningState(message);
                }
            }
        } catch (InconsistentVersioningState e) {
            log.info(message, e);
            NodeId nvhid = e.getVersionHistoryNodeId();
View Full Code Here

            public VersionHistory perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(absPath);
                InternalVersionHistory vh = getVersionHistory(state);
                if (vh == null) {
                    throw new InconsistentVersioningState("Couldn't get version history for node " + state.getNodeId());
                }
                return (VersionHistory) session.getNodeById(vh.getId());
            }
            public String toString() {
                return "versionManager.getVersionHistory(" + absPath + ")";
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.version.InconsistentVersioningState

Copyright © 2018 www.massapicom. 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.