Package org.apache.jackrabbit.oak.spi.state

Examples of org.apache.jackrabbit.oak.spi.state.NodeBuilder.removeProperty()


                builders.addFirst(builder);
            }

            // Drop the match value,  if present
            if (builder.exists()) {
                builder.removeProperty("match");
            }

            // Prune all index nodes that are no longer needed
            for (NodeBuilder node : builders) {
                if (node.getBoolean("match") || node.getChildNodeCount(1) > 0) {
View Full Code Here


        if (!labels.hasProperty(checkNotNull(label))) {
            throw new CommitFailedException(CommitFailedException.VERSION,
                    VersionExceptionCode.NO_SUCH_VERSION_LABEL.ordinal(),
                    "Version label " + label + " does not exist on this version history");
        }
        labels.removeProperty(label);
    }

    // TODO: more methods that modify versions

    //------------------------------< internal >--------------------------------
View Full Code Here

            case '^':
                tokenizer.read(':');
                NodeBuilder node = getNode(builder, getParentPath(path));
                switch (tokenizer.read()) {
                case JsopReader.NULL:
                    node.removeProperty(name);
                    break;
                case JsopReader.FALSE:
                    node.setProperty(name, Boolean.FALSE);
                    break;
                case JsopReader.TRUE:
View Full Code Here

            else {
                target.setProperty(ours);
            }

        }
        conflictMarker.removeProperty(name);
    }

    private void applyResolution(Resolution resolution, ConflictType conflictType, String name, NodeState ours) {
        NodeBuilder conflictMarker = getConflictMarker(conflictType);
        if (resolution == Resolution.OURS) {
View Full Code Here

                builders.addFirst(builder);
            }

            // Drop the match value,  if present
            if (builder.exists()) {
                builder.removeProperty("match");
            }

            // Prune all index nodes that are no longer needed
            for (NodeBuilder node : builders) {
                if (node.getBoolean("match") || node.getChildNodeCount(1) > 0) {
View Full Code Here

                    // lock acquired; rebase, apply commit hooks, and unlock
                    rebase();
                    builder.setChildNode(ROOT, hook.processCommit(
                            base.getChildNode(ROOT), head.getChildNode(ROOT)));
                    builder.removeProperty("token");
                    builder.removeProperty("timeout");

                    // complete the commit
                    SegmentNodeState newHead =
                            writer.writeNode(builder.getNodeState());
View Full Code Here

                    // lock acquired; rebase, apply commit hooks, and unlock
                    rebase();
                    builder.setChildNode(ROOT, hook.processCommit(
                            base.getChildNode(ROOT), head.getChildNode(ROOT)));
                    builder.removeProperty("token");
                    builder.removeProperty("timeout");

                    // complete the commit
                    SegmentNodeState newHead =
                            writer.writeNode(builder.getNodeState());
                    if (store.setHead(after, newHead)) {
View Full Code Here

    }

    @Test
    public void testRemoveProperty() {
        NodeBuilder builder = base.builder();
        builder.removeProperty("a");
        new AssertingNodeStateDiff(base, builder.getNodeState()).expect("-a");
    }

    @Test
    public void testAddProperty() {
View Full Code Here

            else {
                target.setProperty(ours);
            }

        }
        conflictMarker.removeProperty(name);
    }

    private void applyResolution(Resolution resolution, ConflictType conflictType, String name, NodeState ours) {
        NodeBuilder conflictMarker = getConflictMarker(conflictType);
        if (resolution == Resolution.OURS) {
View Full Code Here

        if (!labels.hasProperty(checkNotNull(label))) {
            throw new CommitFailedException(CommitFailedException.VERSION,
                    VersionExceptionCode.NO_SUCH_VERSION_LABEL.ordinal(),
                    "Version label " + label + " does not exist on this version history");
        }
        labels.removeProperty(label);
    }

    // TODO: more methods that modify versions

    //------------------------------< internal >--------------------------------
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.