summaryrefslogtreecommitdiffstats
path: root/v3po/translate-spi/src/main
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-06-05 15:59:38 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-06-06 15:32:43 +0000
commitc1fc552a2df2b3bca2ba31e38e2fdc03af5c085c (patch)
tree245efa06b95566e1a245af91453ca8fdc551bda2 /v3po/translate-spi/src/main
parentd1cbf498fb969103199fa53a6e7ddc6bbbb1af43 (diff)
Fix CUD support for non-mandatory child nodes of list type
Change-Id: Ic75221fe61a0bb35753dd6f3b4deec1b8c020974 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/translate-spi/src/main')
-rw-r--r--v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/ListWriterCustomizer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/ListWriterCustomizer.java b/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/ListWriterCustomizer.java
index 1eb18a238..ecc591191 100644
--- a/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/ListWriterCustomizer.java
+++ b/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/ListWriterCustomizer.java
@@ -17,6 +17,7 @@
package io.fd.honeycomb.v3po.translate.spi.write;
import com.google.common.annotations.Beta;
+import com.google.common.base.Optional;
import java.util.List;
import javax.annotation.Nonnull;
import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -41,6 +42,7 @@ public interface ListWriterCustomizer<C extends DataObject & Identifiable<K>, K
* @param parentData Parent data object from which managed data object must be extracted
*/
@Nonnull
- List<C> extract(@Nonnull final InstanceIdentifier<C> currentId, @Nonnull final DataObject parentData);
+ Optional<List<C>> extract(@Nonnull final InstanceIdentifier<C> currentId, @Nonnull final DataObject parentData);
+ // TODO consider removing Optional and make extract return @Nullable (applies also to ChildWriterCustomizer)
} \ No newline at end of file