diff options
author | 2016-07-13 11:52:51 +0200 | |
---|---|---|
committer | 2016-07-21 14:18:59 +0200 | |
commit | 4e6b846c342b2c9e9443e3d3472685e5acb32fa3 (patch) | |
tree | df8990c71077f8561b94c6055dfe3e2b59fa32e3 /v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceAclCustomizer.java | |
parent | 758f3cc154d28df97b3995344e0c67190c50a035 (diff) |
HONEYCOMB-122 Update reader registry to share similar APIs as writer
+ Extract common registry builder base code
(Reader registry is not flat, so there is not full control over ordering as with writers
but it is sufficient)
+ Split CompositeReader into CompositeReader, SubtreeReader and GenericReader
+ No need to build composite structure in ReaderFactories (registry does that internally)
+ Keep only ReaderCustomizer + ListReaderCustomizer, no root reader (same for writers)
Change-Id: Ic4e5bc96ad47a6cbcada4efcc2209db5c16d2a6c
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceAclCustomizer.java')
-rw-r--r-- | v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceAclCustomizer.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceAclCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceAclCustomizer.java index 9cba9c724..eb433dc37 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceAclCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceAclCustomizer.java @@ -19,7 +19,7 @@ package io.fd.honeycomb.v3po.translate.v3po.interfaces; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.base.Optional; -import io.fd.honeycomb.v3po.translate.spi.write.ChildWriterCustomizer; +import io.fd.honeycomb.v3po.translate.spi.write.WriterCustomizer; import io.fd.honeycomb.v3po.translate.v3po.util.FutureJVppCustomizer; import io.fd.honeycomb.v3po.translate.v3po.util.NamingContext; import io.fd.honeycomb.v3po.translate.v3po.util.SubInterfaceUtils; @@ -40,10 +40,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Customizer for enabling/disabling ACLs on given sub-interface + * Customizer for enabling/disabling ACLs on given sub-interface. */ public class SubInterfaceAclCustomizer extends FutureJVppCustomizer - implements ChildWriterCustomizer<Acl>, AclWriter { + implements WriterCustomizer<Acl>, AclWriter { private static final Logger LOG = LoggerFactory.getLogger(SubInterfaceAclCustomizer.class); private final NamingContext interfaceContext; @@ -56,13 +56,6 @@ public class SubInterfaceAclCustomizer extends FutureJVppCustomizer this.classifyTableContext = checkNotNull(classifyTableContext, "classifyTableContext should not be null"); } - @Nonnull - @Override - public Optional<Acl> extract(@Nonnull final InstanceIdentifier<Acl> currentId, - @Nonnull final DataObject parentData) { - return Optional.fromNullable(((SubInterface) parentData).getAcl()); - } - @Override public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataAfter, @Nonnull final WriteContext writeContext) throws WriteFailedException { |