Package org.apache.jackrabbit.jcr2spi.state

Examples of org.apache.jackrabbit.jcr2spi.state.NodeState


     */
    private void notifyUUIDorMIXINRemoved(Name propName) {
        if (NameConstants.JCR_UUID.equals(propName)) {
            setUniqueID(null);
        } else if (NameConstants.JCR_MIXINTYPES.equals(propName)) {
            NodeState state = (NodeState) internalGetItemState();
            if (state != null) {
                state.setMixinTypeNames(Name.EMPTY_ARRAY);
            }
        }
    }
View Full Code Here


        session.checkSupportedOption(Repository.LEVEL_2_SUPPORTED);
        session.checkIsAlive();

        Path parentPath = session.getQPath(parentAbsPath);
        NodeState parentState = getHierarchyManager().getNodeState(parentPath);

        // make sure the given import target is accessible, not locked and checked out.
        int options = ItemStateValidator.CHECK_ACCESS | ItemStateValidator.CHECK_LOCK | ItemStateValidator.CHECK_VERSIONING;
        getValidator().checkIsWritable(parentState, options);
View Full Code Here

        session.checkSupportedOption(Repository.LEVEL_2_SUPPORTED);
        session.checkIsAlive();

        Path parentPath = session.getQPath(parentAbsPath);
        NodeState parentState = getHierarchyManager().getNodeState(parentPath);
        // make sure the given import target is accessible, not locked and checked out.
        int options = ItemStateValidator.CHECK_ACCESS | ItemStateValidator.CHECK_LOCK | ItemStateValidator.CHECK_VERSIONING;
        getValidator().checkIsWritable(parentState, options);

        // run the import
View Full Code Here

         * @inheritDoc
         * @see OperationVisitor#visit(RemoveVersion)
         */
        public void visit(RemoveVersion operation) throws VersionException, AccessDeniedException, ReferentialIntegrityException, RepositoryException {
            NodeId versionId = (NodeId) operation.getRemoveId();
            NodeState vhState = operation.getParentState();
            service.removeVersion(sessionInfo, (NodeId) vhState.getWorkspaceId(), versionId);
        }
View Full Code Here

     */
    public void removeActivity(Node activityNode) throws UnsupportedRepositoryOperationException, RepositoryException {
        session.checkIsAlive();
        NodeImpl activity = getValidActivity(activityNode, "remove");

        NodeState nState = (NodeState) activity.getItemState();
        ItemId removeId = nState.getId();
        vMgr.removeActivity(nState);

        // if the removal succeeded, make sure there is no current activity
        // setting on this session, that points to the removed activity.
        if (activityId != null && activityId.equals(removeId)) {
View Full Code Here

     * @see NodeEntry#addNewNodeEntry(Name, String, Name, QNodeDefinition)
     */
    public NodeEntry addNewNodeEntry(Name nodeName, String uniqueID,
                                     Name primaryNodeType, QNodeDefinition definition) throws RepositoryException {
        NodeEntry entry = internalAddNodeEntry(nodeName, uniqueID, Path.INDEX_UNDEFINED);
        NodeState state = getItemStateFactory().createNewNodeState(entry, primaryNodeType, definition);
        entry.setItemState(state);
        return entry;
    }
View Full Code Here

        }

        if (wspIndex && revertInfo != null) {
            return revertInfo.oldIndex;
        } else {
            NodeState state = (NodeState) internalGetItemState();
            if (state == null || !state.hasDefinition() || state.getDefinition().allowsSameNameSiblings()) {
                return parent.getChildIndex(this, wspIndex);
            } else {
                return Path.INDEX_DEFAULT;
            }
        }
View Full Code Here

     * @return the entry or <code>null</code> if building the corresponding
     * <code>NodeState</code> failed with <code>ItemNotFoundException</code>.
     */
    private NodeEntry loadNodeEntry(NodeId childId) throws RepositoryException {
        try {
            NodeState state = getItemStateFactory().createDeepNodeState(childId, this);
            return state.getNodeEntry();
        } catch (ItemNotFoundException e) {
            return null;
        }
    }
View Full Code Here

        try {
            if (NameConstants.JCR_UUID.equals(child.getName())) {
                PropertyState ps = child.getPropertyState();
                setUniqueID(ps.getValue().getString());
            } else if (NameConstants.JCR_MIXINTYPES.equals(child.getName())) {
                NodeState state = (NodeState) internalGetItemState();
                if (state != null) {
                    PropertyState ps = child.getPropertyState();
                    state.setMixinTypeNames(StateUtility.getMixinNames(ps));
                } // nodestate not yet loaded -> ignore change
            }
        } catch (ItemNotFoundException e) {
            log.debug("Property with name " + child.getName() + " does not exist (anymore)");
        } catch (RepositoryException e) {
View Full Code Here

     */
    private void notifyUUIDorMIXINRemoved(Name propName) {
        if (NameConstants.JCR_UUID.equals(propName)) {
            setUniqueID(null);
        } else if (NameConstants.JCR_MIXINTYPES.equals(propName)) {
            NodeState state = (NodeState) internalGetItemState();
            if (state != null) {
                state.setMixinTypeNames(Name.EMPTY_ARRAY);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.jcr2spi.state.NodeState

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.