- protected void checkMergeApplicable(final YangInstanceIdentifier path, final NodeModification modification,
- final Optional<TreeNode> current, final Version version) throws DataValidationFailedException {
- final Optional<TreeNode> original = modification.getOriginal();
+ @Override
+ final void quickVerifyStructure(final NormalizedNode<?, ?> writtenValue) {
+ verifyValue(writtenValue);
+ }
+
+ @Override
+ final void fullVerifyStructure(final NormalizedNode<?, ?> writtenValue) {
+ verifyValue(writtenValue);
+ verifyValueChildren(writtenValue);
+ }
+
+ /**
+ * Verify the a written value, without performing deeper tree validation.
+ *
+ * @param writtenValue Written value
+ */
+ abstract void verifyValue(NormalizedNode<?, ?> writtenValue);
+
+ /**
+ * Verify the children implied by a written value after the value itself has been verified by
+ * {@link #verifyValue(NormalizedNode)}. Default implementation does nothing.
+ *
+ * @param writtenValue Written value
+ */
+ void verifyValueChildren(final NormalizedNode<?, ?> writtenValue) {
+ // Defaults to no-op
+ }
+
+ protected void checkMergeApplicable(final ModificationPath path, final NodeModification modification,
+ final Optional<? extends TreeNode> current, final Version version) throws DataValidationFailedException {
+ final Optional<? extends TreeNode> original = modification.getOriginal();