Package org.apache.jackrabbit.jcr2spi.operation

Examples of org.apache.jackrabbit.jcr2spi.operation.Operation


            i++;
        }
        if (done) {
            predecessorIds[i] = vId;
        }
        Operation op = ResolveMergeConflict.create(nodeState, mergeFailedIds, predecessorIds, done);
        workspaceManager.execute(op);
    }
View Full Code Here


        workspaceManager.execute(op);
        return workspaceManager.getHierarchyManager().getNodeEntry(op.getNewActivityId());
    }

    public void removeActivity(NodeState activityState) throws UnsupportedRepositoryOperationException, RepositoryException {
        Operation op = RemoveActivity.create(activityState, workspaceManager.getHierarchyManager());
        workspaceManager.execute(op);
    }
View Full Code Here

    public void remove() throws VersionException, LockException, ConstraintViolationException, RepositoryException {
        checkSupportedOption(Repository.LEVEL_2_SUPPORTED);
        checkStatus();

        // validation checks are performed within remove operation
        Operation rm = Remove.create(getItemState());
        session.getSessionItemStateManager().execute(rm);
    }
View Full Code Here

        Path beforePath = null;
        if (destChildRelPath != null) {
            beforePath = getReorderPath(destChildRelPath);
        }

        Operation op = ReorderNodes.create(getNodeState(), srcPath, beforePath);
        session.getSessionItemStateManager().execute(op);
    }
View Full Code Here

        if (nt.isMixin() || nt.isAbstract()) {
            throw new ConstraintViolationException("Cannot change the primary type: '" + nodeTypeName + "' is a mixin type or abstract.");
        }

        // perform the operation
        Operation op = SetPrimaryType.create(getNodeState(), ntName);
        session.getSessionItemStateManager().execute(op);
    }
View Full Code Here

                throw new ConstraintViolationException("Cannot add '" + mixinName + "' mixin type.");
            }

            mixinValue.add(mixinQName);
            // perform the operation
            Operation op = SetMixin.create(getNodeState(), mixinValue.toArray(new Name[mixinValue.size()]));
            session.getSessionItemStateManager().execute(op);
        }
    }
View Full Code Here

            }
        }

        // delegate to operation
        Name[] mixins = mixinValue.toArray(new Name[mixinValue.size()]);
        Operation op = SetMixin.create(getNodeState(), mixins);
        session.getSessionItemStateManager().execute(op);
    }
View Full Code Here

        } catch (ItemNotFoundException e) {
            // no corresponding node exists -> method has not effect
            return;
        }

        Operation op = Update.create(getNodeState(), srcWorkspaceName);
        ((WorkspaceImpl)session.getWorkspace()).getUpdatableItemStateManager().execute(op);
    }
View Full Code Here

            // use default node type
            nodeTypeName = definition.getDefaultPrimaryType();
        }
        // validation check are performed by item state manager
        // NOTE: uuid is generated while creating new state.
        Operation an = AddNode.create(getNodeState(), nodeName, nodeTypeName, null);
        session.getSessionItemStateManager().execute(an);

        // finally retrieve the new node
        List<ItemState> addedStates = ((AddNode) an).getAddedStates();
        ItemState nState = addedStates.get(0);
View Full Code Here

     * @throws RepositoryException
     */
    private Property createProperty(Name qName, int type, QPropertyDefinition def,
                                    QValue[] qvs)
        throws ConstraintViolationException, RepositoryException {
        Operation op = AddProperty.create(getNodeState(), qName, type, def, qvs);
        session.getSessionItemStateManager().execute(op);
        return getProperty(qName);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.jcr2spi.operation.Operation

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.