Package org.apache.jackrabbit.core.version

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


    /**
     * {@inheritDoc}
     */
    public Version getBaseVersion(String absPath)
            throws RepositoryException {
        NodeStateEx state = getNodeState(absPath);
        InternalVersion v = getBaseVersion(state);
        return (Version) session.getNodeById(v.getId());
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public void restore(String absPath, String versionName, boolean removeExisting)
            throws RepositoryException {
        NodeStateEx state = getNodeState(absPath,
                ItemValidator.CHECK_PENDING_CHANGES | ItemValidator.CHECK_LOCK | ItemValidator.CHECK_HOLD,
                Permission.NONE);
        restore(state, session.getQName(versionName), removeExisting);
    }
View Full Code Here

            Path path = session.getQPath(absPath);
            Path parentPath = path.getAncestor(1);
            Name name = path.getNameElement().getName();
            NodeImpl parent = session.getItemManager().getNode(parentPath);

            NodeStateEx state = getNodeState(parent,
                    ItemValidator.CHECK_PENDING_CHANGES | ItemValidator.CHECK_LOCK | ItemValidator.CHECK_HOLD,
                    Permission.NONE);

            // check if given version is a baseline
            InternalVersion v = getVersion(version);
View Full Code Here

     * @param removeExisting the remove existing flag
     * @throws RepositoryException if an error occurs
     */
    protected void restore(NodeImpl node, Version version, boolean removeExisting)
            throws RepositoryException {
        NodeStateEx state = getNodeState(node.getPath(),
                ItemValidator.CHECK_PENDING_CHANGES | ItemValidator.CHECK_LOCK | ItemValidator.CHECK_HOLD,
                Permission.NONE);
        InternalVersion v = getVersion(version);
        restore(state, v, removeExisting);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void restoreByLabel(String absPath, String versionLabel, boolean removeExisting)
            throws RepositoryException {
        NodeStateEx state = getNodeState(absPath,
                ItemValidator.CHECK_PENDING_CHANGES | ItemValidator.CHECK_LOCK | ItemValidator.CHECK_HOLD,
                Permission.NONE);
        restoreByLabel(state, session.getQName(versionLabel), removeExisting);
    }
View Full Code Here

     * @param srcWorkspaceName the source workspace name
     * @throws RepositoryException if an error occurs
     */
    public void update(NodeImpl node, String srcWorkspaceName)
            throws RepositoryException {
        NodeStateEx state = getNodeState(node,
                ItemValidator.CHECK_PENDING_CHANGES,
                Permission.VERSION_MNGMT);
        mergeOrUpdate(state, srcWorkspaceName, null, false, false);
    }
View Full Code Here

     * {@inheritDoc}
     */
    public NodeIterator merge(String absPath, String srcWorkspaceName,
                              boolean bestEffort, boolean isShallow)
            throws RepositoryException {
        NodeStateEx state = getNodeState(absPath,
                ItemValidator.CHECK_PENDING_CHANGES,
                Permission.VERSION_MNGMT);
        List<ItemId> failedIds = new LinkedList<ItemId>();
        mergeOrUpdate(state, srcWorkspaceName, failedIds, bestEffort, isShallow);
        return new LazyItemIterator(session.getItemManager(), failedIds);
View Full Code Here

                // (may throw NoSuchWorkspaceException and AccessDeniedException)
                srcSession = ((RepositoryImpl) session.getRepository())
                        .createSession(session.getSubject(), srcWorkspaceName);
                WorkspaceImpl srcWsp = (WorkspaceImpl) srcSession.getWorkspace();
                NodeId rootNodeId = ((NodeImpl) srcSession.getRootNode()).getNodeId();
                NodeStateEx srcRoot = new NodeStateEx(
                        srcWsp.getItemStateManager(),
                        ntReg,
                        rootNodeId);
                merge(state, srcRoot, failedIds, bestEffort, isShallow);
            } catch (ItemStateException e) {
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void doneMerge(String absPath, Version version)
            throws RepositoryException {
        NodeStateEx state = getNodeState(absPath,
                ItemValidator.CHECK_LOCK | ItemValidator.CHECK_PENDING_CHANGES_ON_NODE | ItemValidator.CHECK_HOLD,
                Permission.VERSION_MNGMT);
        finishMerge(state, version, false);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void cancelMerge(String absPath, Version version)
            throws RepositoryException {
        NodeStateEx state = getNodeState(absPath,
                ItemValidator.CHECK_LOCK | ItemValidator.CHECK_PENDING_CHANGES_ON_NODE | ItemValidator.CHECK_HOLD,
                Permission.VERSION_MNGMT);
        finishMerge(state, version, true);
    }
View Full Code Here

TOP

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

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.