Package org.apache.jackrabbit.oak.jcr.delegate

Examples of org.apache.jackrabbit.oak.jcr.delegate.VersionDelegate


    @Override
    public Version getLinearPredecessor() throws RepositoryException {
        return perform(new SessionOperation<Version>("getLinearPredecessor") {
            @Override
            public Version perform() throws RepositoryException {
                VersionDelegate predecessor = dlg.getLinearPredecessor();
                if (predecessor == null) {
                    return null;
                } else {
                    return new VersionImpl(predecessor, sessionContext);
                }
View Full Code Here


                VersionHistoryDelegate vHistory = getVersionManagerDelegate()
                        .createVersionHistory(dlg.getParent());
                Iterator<VersionDelegate> it = vHistory.getAllLinearVersions();
                // search for this version ...
                while (it.hasNext()) {
                    VersionDelegate vDlg = it.next();
                    if (vDlg.getIdentifier().equals(dlg.getIdentifier())
                            && it.hasNext()) {
                        // ... and return next
                        return new VersionImpl(it.next(), sessionContext);
                    }
                }
View Full Code Here

        perform(new SessionOperation<Void>("addVersionLabel", true) {
            @Override
            public Void perform() throws RepositoryException {
                String oakLabel = sessionContext.getOakName(label);
                // will throw VersionException if version does not exist
                VersionDelegate version = dlg.getVersion(versionName);
                dlg.addVersionLabel(version, oakLabel, moveLabel);
                return null;
            }
        });
    }
View Full Code Here

        perform(new SessionOperation<Void>(true) {
            @Override
            public Void perform() throws RepositoryException {
                String oakLabel = sessionContext.getOakName(label);
                // will throw VersionException if version does not exist
                VersionDelegate version = dlg.getVersion(versionName);
                dlg.addVersionLabel(version, oakLabel, moveLabel);
                return null;
            }
        });
    }
View Full Code Here

    @Override
    public Version getLinearPredecessor() throws RepositoryException {
        return perform(new SessionOperation<Version>() {
            @Override
            public Version perform() throws RepositoryException {
                VersionDelegate predecessor = dlg.getLinearPredecessor();
                if (predecessor == null) {
                    return null;
                } else {
                    return new VersionImpl(predecessor, sessionContext);
                }
View Full Code Here

                VersionHistoryDelegate vHistory = getVersionManagerDelegate()
                        .createVersionHistory(dlg.getParent());
                Iterator<VersionDelegate> it = vHistory.getAllLinearVersions();
                // search for this version ...
                while (it.hasNext()) {
                    VersionDelegate vDlg = it.next();
                    if (vDlg.getIdentifier().equals(dlg.getIdentifier())
                            && it.hasNext()) {
                        // ... and return next
                        return new VersionImpl(it.next(), sessionContext);
                    }
                }
View Full Code Here

                                    "removeExisting=false. Existing nodes in " +
                                    "workspace: " + paths);
                        }
                    }
                    // ready for restore
                    VersionDelegate vd = versionManagerDelegate.getVersionByIdentifier(
                            version.getIdentifier());
                    versionManagerDelegate.restore(
                            parent, PathUtils.getName(oakPath), vd);
                    sessionDelegate.commit();
                    success = true;
View Full Code Here

                                    "removeExisting=false. Existing nodes in " +
                                    "workspace: " + paths);
                        }
                    }
                    // ready for restore
                    VersionDelegate vd = versionManagerDelegate.getVersionByIdentifier(
                            version.getIdentifier());
                    versionManagerDelegate.restore(
                            n.getParent(), n.getName(), vd);
                    sessionDelegate.commit();
                    success = true;
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.jcr.delegate.VersionDelegate

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.