Package org.apache.jackrabbit.core.version

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


    public Version checkin(final String absPath, final Calendar created)
            throws RepositoryException {
        return perform(new SessionWriteOperation<Version> () {
            public Version perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(
                        absPath,
                        CHECK_LOCK | CHECK_HOLD | CHECK_PENDING_CHANGES_ON_NODE,
                        Permission.VERSION_MNGMT);
                NodeId baseId = checkoutCheckin(state, true, false, created);
                return (Version) session.getNodeById(baseId);
View Full Code Here


     */
    public void checkout(final String absPath) throws RepositoryException {
        perform(new SessionWriteOperation<NodeId> () {
            public NodeId perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(
                        absPath,
                        CHECK_LOCK | CHECK_HOLD,
                        Permission.VERSION_MNGMT);
                return checkoutCheckin(state, false, true, null);
            }
View Full Code Here

     */
    public Version checkpoint(final String absPath) throws RepositoryException {
        return perform(new SessionWriteOperation<Version> () {
            public Version perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(
                        absPath,
                        CHECK_LOCK | CHECK_HOLD | CHECK_PENDING_CHANGES_ON_NODE,
                        Permission.VERSION_MNGMT);
                NodeId baseId = checkoutCheckin(state, true, true, null);
                return (Version) session.getNodeById(baseId);
View Full Code Here

    public VersionHistory getVersionHistory(final String absPath)
            throws RepositoryException {
        return perform(new SessionOperation<VersionHistory> () {
            public VersionHistory perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(absPath);
                InternalVersionHistory vh = getVersionHistory(state);
                return (VersionHistory) session.getNodeById(vh.getId());
            }
            public String toString() {
                return "versionManager.getVersionHistory(" + absPath + ")";
View Full Code Here

    public Version getBaseVersion(final String absPath)
            throws RepositoryException {
        return perform(new SessionOperation<Version> () {
            public Version perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(absPath);
                InternalVersion v = getBaseVersion(state);
                return (Version) session.getNodeById(v.getId());
            }
            public String toString() {
                return "versionManager.getBaseVersion(" + absPath + ")";
View Full Code Here

            final String absPath, final String versionName,
            final boolean removeExisting) throws RepositoryException {
        perform(new SessionWriteOperation<Object> () {
            public Object perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(
                        absPath,
                        CHECK_PENDING_CHANGES | CHECK_LOCK | CHECK_HOLD,
                        Permission.NONE);
                restore(state, context.getQName(versionName), removeExisting);
                return this;
View Full Code Here

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

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

                    // check if given version is a baseline
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(),
                CHECK_PENDING_CHANGES | CHECK_LOCK | CHECK_HOLD,
                Permission.NONE);
        InternalVersion v = getVersion(version);
        restore(state, v, removeExisting);
View Full Code Here

            final String absPath, final String versionLabel,
            final boolean removeExisting) throws RepositoryException {
        perform(new SessionWriteOperation<Object> () {
            public Object perform(SessionContext context)
                    throws RepositoryException {
                NodeStateEx state = getNodeState(
                        absPath,
                        CHECK_PENDING_CHANGES | CHECK_LOCK | CHECK_HOLD,
                        Permission.NONE);
                restoreByLabel(
                        state, context.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

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.