+ public FluentFuture<?> completionFuture() {
+ return getDelegate().completionFuture();
+ }
+
+ /**
+ * Subclasses of this class are required to implement creation of parent nodes based on behaviour of their
+ * underlying transaction.
+ *
+ * @param serializer Current serializer
+ * @param store an instance of LogicalDatastoreType
+ * @param normalized NormalizedResult of the operation
+ */
+ private void ensureParentsByMerge(final CurrentAdapterSerializer serializer, final LogicalDatastoreType store,
+ final NormalizedResult normalized) {
+ final var path = normalized.path();
+ // AugmentationResult already points to parent path
+ final var parentPath = normalized instanceof AugmentationResult ? path : path.getParent();
+ if (parentPath != null && !parentPath.isEmpty()) {
+ final var parentNode = ImmutableNodes.fromInstanceId(serializer.getRuntimeContext().modelContext(),
+ parentPath);
+ getDelegate().merge(store, YangInstanceIdentifier.of(parentNode.name()), parentNode);
+ }
+ }
+
+ private <U extends DataObject> @NonNull NormalizedResult toNormalized(final String operation,
+ final InstanceIdentifier<U> path, final U data) {
+ return toNormalized(adapterContext().currentSerializer(), operation, path, data);
+ }
+
+ private static <U extends DataObject> @NonNull NormalizedResult toNormalized(
+ final CurrentAdapterSerializer serializer, final String operation, final InstanceIdentifier<U> path,
+ final U data) {
+ checkArgument(!path.isWildcarded(), "Cannot %s data into wildcarded path %s", operation, path);
+ return serializer.toNormalizedNode(path, data);