import com.google.common.base.Optional;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
import org.opendaylight.yangtools.yang.data.api.schema.tree.StoreTreeNode;
import org.opendaylight.yangtools.yang.data.api.schema.tree.spi.TreeNode;
/**
*
- * Performs structural verification of NodeModification, such as writen values / types
- * uses right structural elements.
+ * Performs structural verification of NodeModification, such as writen values / types uses
+ * right structural elements.
*
- * @param modification to be verified.
- * @throws IllegalArgumentException If provided NodeModification does not adhere to the structure.
+ * @param modification data to be verified.
+ * @param verifyChildren true if structure verification should be run against children.
+ * @throws IllegalArgumentException If provided NodeModification does not adhere to the
+ * structure.
*/
- abstract void verifyStructure(ModifiedNode modification) throws IllegalArgumentException;
+ abstract void verifyStructure(NormalizedNode<?, ?> modification, boolean verifyChildren)
+ throws IllegalArgumentException;
/**
* Return the tracking policy for this node's children.
*/
abstract ChildTrackingPolicy getChildPolicy();
+ /**
+ * Stage a merge operation into a {@link ModifiedNode} such that it will be processed correctly by
+ * {@link #apply(ModifiedNode, Optional, Version)}. This method is the context which is introducing this operation,
+ * and so any overheads are charged to whoever is in control of the access pattern.
+ *
+ * @param modification Original modification node
+ * @param value Value which should be merge into the modification
+ * @param version Data version as carried in the containing {@link InMemoryDataTreeModification}
+ */
+ abstract void mergeIntoModifiedNode(ModifiedNode modification, NormalizedNode<?, ?> value, Version version);
+
/**
* Returns a suboperation for specified tree node
*
*/
@Override
public abstract Optional<ModificationApplyOperation> getChild(PathArgument child);
+
+ abstract void recursivelyVerifyStructure(NormalizedNode<?, ?> value);
}