summaryrefslogtreecommitdiffstats
path: root/infra/translate-api
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2017-02-24 10:39:55 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-02-27 11:42:19 +0000
commitec78f178f542369fdfd696fdc6e4bb872780ac87 (patch)
tree129206bdf7bb3ad62257d5cfca776e264f70fad6 /infra/translate-api
parent309d5e1561ba42ee491fa33c3b8c24849dc003fa (diff)
HONEYCOMB-344 - structural reader for list
Change-Id: Ia02ed73daaeea547d49c9ec2d4d7d10f4db85b5e Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'infra/translate-api')
-rw-r--r--infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java
index 67029b17c..dc1866d78 100644
--- a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java
+++ b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/registry/ModifiableReaderRegistryBuilder.java
@@ -22,8 +22,12 @@ import io.fd.honeycomb.translate.read.Reader;
import javax.annotation.Nonnull;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.Identifiable;
+import org.opendaylight.yangtools.yang.binding.Identifier;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import java.util.List;
+
/**
* Mutable registry that allows adding new readers.
*/
@@ -38,4 +42,10 @@ public interface ModifiableReaderRegistryBuilder
*/
<D extends DataObject> void addStructuralReader(@Nonnull InstanceIdentifier<D> id,
@Nonnull Class<? extends Builder<D>> builderType);
+ /**
+ * Construct customizer that will always return static list of keys.
+ * */
+ <D extends DataObject & Identifiable<K>,K extends Identifier<D>> void addStructuralListReader(@Nonnull InstanceIdentifier<D> id,
+ @Nonnull Class<? extends Builder<D>> builderType,
+ @Nonnull List<K> staticKeys);
}