Examples of VersionManagerDelegate


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

                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionHistoryImpl(vmd.createVersionHistory(delegate), context);
        } else {
            return new NodeImpl<NodeDelegate>(delegate, context);
        }
    }
View Full Code Here

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

                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionHistoryImpl(vmd.createVersionHistory(delegate), context);
        } else {
            return new NodeImpl<NodeDelegate>(delegate, context);
        }
    }
View Full Code Here

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

                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionHistoryImpl(vmd.createVersionHistory(delegate), context);
        } else {
            return new NodeImpl<NodeDelegate>(delegate, context);
        }
    }
View Full Code Here

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

    @Override
    public Version[] getPredecessors() throws RepositoryException {
        PropertyDelegate p = getPropertyOrThrow(VersionConstants.JCR_PREDECESSORS);
        List<Version> predecessors = new ArrayList<Version>();
        VersionManagerDelegate vMgr = getVersionManagerDelegate();
        for (Value v : getValues(p)) {
            String id = v.getString();
            predecessors.add(new VersionImpl(vMgr.getVersionByIdentifier(id), sessionContext));
        }
        return predecessors.toArray(new Version[predecessors.size()]);
    }
View Full Code Here

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

    @Override
    public Version[] getSuccessors() throws RepositoryException {
        PropertyDelegate p = getPropertyOrThrow(VersionConstants.JCR_SUCCESSORS);
        List<Version> successors = new ArrayList<Version>();
        VersionManagerDelegate vMgr = getVersionManagerDelegate();
        for (Value v : getValues(p)) {
            String id = v.getString();
            successors.add(new VersionImpl(vMgr.getVersionByIdentifier(id), sessionContext));
        }
        return successors.toArray(new Version[successors.size()]);
    }
View Full Code Here

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

            return null;
        }
        PropertyDelegate pd = nd.getPropertyOrNull(JcrConstants.JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate delegate = VersionManagerDelegate.create(getSessionDelegate());
            return new VersionImpl(delegate.createVersion(nd), this);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
            VersionManagerDelegate delegate = VersionManagerDelegate.create(getSessionDelegate());
            return new VersionHistoryImpl(delegate.createVersionHistory(nd), this);
        } else {
            return new NodeImpl<NodeDelegate>(nd, this);
        }
    }
View Full Code Here

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

                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionHistoryImpl(vmd.createVersionHistory(delegate), context);
        } else {
            return new NodeImpl<NodeDelegate>(delegate, context);
        }
    }
View Full Code Here

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

                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionHistoryImpl(vmd.createVersionHistory(delegate), context);
        } else {
            return new NodeImpl<NodeDelegate>(delegate, context);
        }
    }
View Full Code Here

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

                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionHistoryImpl(vmd.createVersionHistory(delegate), context);
        } else {
            return new NodeImpl<NodeDelegate>(delegate, context);
        }
    }
View Full Code Here

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

                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionHistoryImpl(vmd.createVersionHistory(delegate), context);
        } else {
            return new NodeImpl<NodeDelegate>(delegate, context);
        }
    }
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.