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
commit8014d193008a60ef3857f14d57d931973daa7cc4 (patch)
treed88fbd0d0e5efbdbeab36297e56549ef1ea9cff1 /v3po/translate-spi/src/main
parent4f7fb7f2e12687d42a6ae287531bb788636a8bc6 (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