Disconnect mdsal-bind-dom-codec yangtools/mdsal APIs 10/62610/12
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 4 Sep 2017 09:44:52 +0000 (11:44 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 21 Sep 2017 09:21:22 +0000 (11:21 +0200)
Remove compatibility bridging between the two APIs, so that users
do not pull in yangtools APIs in their imports.

Change-Id: If763721458354ba92422ac7465735714646f61d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/api/BindingCodecTree.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/api/BindingCodecTreeFactory.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/api/BindingCodecTreeNode.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/api/BindingNormalizedNodeCachingCodec.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/api/BindingNormalizedNodeCodec.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/api/BindingNormalizedNodeSerializer.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/api/BindingNormalizedNodeWriterFactory.java

index 7fbd0f390ca6dfad40c3e250dd44cede4e4be4ba..b0b75e549fa906752bac1f53a536213348686856 100644 (file)
@@ -14,7 +14,6 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 
 /**
- *
  * Navigable tree representing hierarchy of Binding to Normalized Node codecs
  *
  * This navigable tree is associated to conrete set of YANG models, represented by SchemaContext and
@@ -22,17 +21,14 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
  *
  * TODO: Add more detailed documentation
  **/
-public interface BindingCodecTree extends org.opendaylight.yangtools.binding.data.codec.api.BindingCodecTree {
+public interface BindingCodecTree {
 
-    @Override
     @Nullable
     <T extends DataObject> BindingCodecTreeNode<T> getSubtreeCodec(InstanceIdentifier<T> path);
 
-    @Override
     @Nullable
     BindingCodecTreeNode<?> getSubtreeCodec(YangInstanceIdentifier path);
 
-    @Override
     @Nullable
     BindingCodecTreeNode<?> getSubtreeCodec(SchemaPath path);
 
index e295f14b189cb36aa272df7aaf4b3d134a4ad8d2..14505d085f9ec9cb3fa5c4b3141dc17bdad2f726 100644 (file)
@@ -11,11 +11,9 @@ import com.google.common.annotations.Beta;
 import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
-public interface BindingCodecTreeFactory extends
-        org.opendaylight.yangtools.binding.data.codec.api.BindingCodecTreeFactory {
+public interface BindingCodecTreeFactory {
 
     /**
-     *
      * Creates Binding Codec Tree for specified Binding runtime context.
      *
      * @param context
@@ -23,11 +21,9 @@ public interface BindingCodecTreeFactory extends
      *            instantiated.
      * @return Binding Codec Tree for specified Binding runtime context.
      */
-    @Override
     BindingCodecTree create(BindingRuntimeContext context);
 
     /**
-     *
      * Creates Binding Codec Tree for specified Binding runtime context.
      *
      * @param context
@@ -39,7 +35,6 @@ public interface BindingCodecTreeFactory extends
      *            deserialization in multi-classloader environment.
      * @return Binding Codec Tree for specified Binding runtime context.
      */
-    @Override
     @Beta
    BindingCodecTree create(SchemaContext context, Class<?>... bindingClasses);
 
index 9345c2ab9bf3c3074f1ffa334165a974c1d9535b..6943433667a04a005c7de6e52e7ab530a628d400 100644 (file)
@@ -22,14 +22,11 @@ import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStre
 /**
  * Subtree codec specific to model subtree between Java Binding and
  * NormalizedNode.
- *
  */
 @Beta
-public interface BindingCodecTreeNode<T extends DataObject> extends BindingNormalizedNodeCodec<T>,
-        org.opendaylight.yangtools.binding.data.codec.api.BindingCodecTreeNode<T> {
+public interface BindingCodecTreeNode<T extends DataObject> extends BindingNormalizedNodeCodec<T> {
 
     /**
-     *
      * Returns binding class of interface which represents API of current
      * schema node.
      *
@@ -38,12 +35,10 @@ public interface BindingCodecTreeNode<T extends DataObject> extends BindingNorma
      *
      * @return interface which defines API of binding representation of data.
      */
-    @Override
     @Nonnull
     Class<T> getBindingClass();
 
     /**
-     *
      * Returns child context as if it was walked by
      * {@link BindingStreamEventWriter}. This means that to enter case, one must
      * issue getChild(ChoiceClass).getChild(CaseClass).
@@ -53,12 +48,10 @@ public interface BindingCodecTreeNode<T extends DataObject> extends BindingNorma
      * @throws IllegalArgumentException
      *             If supplied child class is not valid in specified context.
      */
-    @Override
     @Nonnull
     <E extends DataObject> BindingCodecTreeNode<E> streamChild(@Nonnull Class<E> childClass);
 
     /**
-     *
      * Returns child context as if it was walked by
      * {@link BindingStreamEventWriter}. This means that to enter case, one must
      * issue getChild(ChoiceClass).getChild(CaseClass).
@@ -73,7 +66,6 @@ public interface BindingCodecTreeNode<T extends DataObject> extends BindingNorma
      * @return Context of child or Optional absent is supplied class is not
      *         applicable in context.
      */
-    @Override
     <E extends DataObject> Optional<? extends BindingCodecTreeNode<E>> possibleStreamChild(@Nonnull Class<E> childClass);
 
     /**
@@ -85,7 +77,6 @@ public interface BindingCodecTreeNode<T extends DataObject> extends BindingNorma
      * @throws IllegalArgumentException
      *             If supplied argument does not represent valid child.
      */
-    @Override
     @Nonnull
     BindingCodecTreeNode<?> yangPathArgumentChild(@Nonnull YangInstanceIdentifier.PathArgument child);
 
@@ -102,13 +93,11 @@ public interface BindingCodecTreeNode<T extends DataObject> extends BindingNorma
      * @throws IllegalArgumentException
      *             If supplied argument does not represent valid child.
      */
-    @Override
     @Nonnull
     BindingCodecTreeNode<?> bindingPathArgumentChild(@Nonnull InstanceIdentifier.PathArgument arg,
             @Nullable List<YangInstanceIdentifier.PathArgument> builder);
 
     /**
-     *
      * Returns codec which uses caches serialization / deserialization results
      *
      * Caching may introduce performance penalty to serialization / deserialization
@@ -118,12 +107,10 @@ public interface BindingCodecTreeNode<T extends DataObject> extends BindingNorma
      * @param cacheSpecifier Set of objects, for which cache may be in place
      * @return Codec whihc uses cache for serialization / deserialization.
      */
-    @Override
     @Nonnull
     BindingNormalizedNodeCachingCodec<T> createCachingCodec(@Nonnull
             ImmutableCollection<Class<? extends DataObject>> cacheSpecifier);
 
-    @Override
     @Beta
     void writeAsNormalizedNode(T data, NormalizedNodeStreamWriter writer);
 
@@ -136,7 +123,6 @@ public interface BindingCodecTreeNode<T extends DataObject> extends BindingNorma
      *         representation for current node (e.g. case).
      * @throws IllegalArgumentException If supplied {@code arg} is not valid.
      */
-    @Override
     @Beta
     @Nullable YangInstanceIdentifier.PathArgument serializePathArgument(@Nullable InstanceIdentifier.PathArgument arg);
 
@@ -149,10 +135,8 @@ public interface BindingCodecTreeNode<T extends DataObject> extends BindingNorma
      *        representation for current node (e.g. choice or case).
      * @throws IllegalArgumentException If supplied {@code arg} is not valid.
      */
-    @Override
     @Beta
     @Nullable InstanceIdentifier.PathArgument deserializePathArgument(@Nullable YangInstanceIdentifier.PathArgument arg);
 
-    @Override
     Object getSchema();
 }
index be388ab9ae0085c7e9447c61b2ea30d30995ed54..08a52655adb63a36e81820b146d251ab84a74d4f 100644 (file)
@@ -19,9 +19,8 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
  * @param <T> Binding representtion of data
  */
 @Beta
-public interface BindingNormalizedNodeCachingCodec<T extends DataObject> extends
-        org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeCachingCodec<T>,
-        BindingNormalizedNodeCodec<T>, AutoCloseable {
+public interface BindingNormalizedNodeCachingCodec<T extends DataObject> extends BindingNormalizedNodeCodec<T>,
+        AutoCloseable {
     /**
      * Invoking close will invalidate this codec and any of its child
      * codecs and will invalidate cache.
index b5297f808c32895cc55b3194ab2332eaaab6205b..b950182deccec5899ba4ccde938620f5e70fbe35 100644 (file)
@@ -13,16 +13,13 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 /**
- *
  * Codec providing serialization and deserializiation between Binding
  * and NormalizedNode representation of data.
  *
- *
  * @param <T> Binding representation of data
  */
 @Beta
-public interface BindingNormalizedNodeCodec<T extends DataObject> extends
-        org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeCodec<T> {
+public interface BindingNormalizedNodeCodec<T extends DataObject> {
 
     /**
      * Converts from Normalized Node to Binding representation of data.
@@ -30,7 +27,6 @@ public interface BindingNormalizedNodeCodec<T extends DataObject> extends
      * @param data Normalized Node representation of data
      * @return Binding representation of data
      */
-    @Override
     @Nonnull T deserialize(@Nonnull NormalizedNode<?,?> data);
 
     /**
@@ -39,7 +35,6 @@ public interface BindingNormalizedNodeCodec<T extends DataObject> extends
      * @param data Binding representation of data
      * @return Normalized Node representation of data
      */
-    @Override
     @Nonnull NormalizedNode<?,?> serialize(@Nonnull T data);
 
 }
index 599c58730a9898afae17942d63d78b9c536b29c8..d710933c088eebf6b7ca9a06b118c0531c8e9a48 100644 (file)
@@ -23,8 +23,7 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
  * Serialization service, which provides two-way serialization between Java
  * Binding Data representation and NormalizedNode representation.
  */
-public interface BindingNormalizedNodeSerializer extends
-        org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer {
+public interface BindingNormalizedNodeSerializer {
 
     /**
      * Translates supplied Binding Instance Identifier into NormalizedNode
@@ -36,7 +35,6 @@ public interface BindingNormalizedNodeSerializer extends
      * @throws IllegalArgumentException
      *             If supplied Instance Identifier is not valid.
      */
-    @Override
     YangInstanceIdentifier toYangInstanceIdentifier(@Nonnull InstanceIdentifier<?> binding);
 
     /**
@@ -48,7 +46,6 @@ public interface BindingNormalizedNodeSerializer extends
      * @return Binding Instance Identifier, or null if the instance identifier
      *         is not representable.
      */
-    @Override
     @Nullable
     InstanceIdentifier<?> fromYangInstanceIdentifier(@Nonnull YangInstanceIdentifier dom);
 
@@ -64,7 +61,6 @@ public interface BindingNormalizedNodeSerializer extends
      * @throws IllegalArgumentException
      *             If supplied Instance Identifier is not valid.
      */
-    @Override
     <T extends DataObject> Entry<YangInstanceIdentifier, NormalizedNode<?, ?>> toNormalizedNode(
             InstanceIdentifier<T> path, T data);
 
@@ -76,7 +72,6 @@ public interface BindingNormalizedNodeSerializer extends
      * @param data NormalizedNode representing data
      * @return DOM Instance Identifier
      */
-    @Override
     @Nullable
     Entry<InstanceIdentifier<?>, DataObject> fromNormalizedNode(@Nonnull YangInstanceIdentifier path,
             NormalizedNode<?, ?> data);
@@ -88,7 +83,6 @@ public interface BindingNormalizedNodeSerializer extends
      * @param data NormalizedNode representing data
      * @return Binding representation of Notification
      */
-    @Override
     @Nullable Notification fromNormalizedNodeNotification(@Nonnull SchemaPath path,@Nonnull ContainerNode data);
 
     /**
@@ -98,7 +92,6 @@ public interface BindingNormalizedNodeSerializer extends
      * @param data NormalizedNode representing data
      * @return Binding representation of RPC data
      */
-    @Override
     @Nullable DataObject fromNormalizedNodeRpcData(@Nonnull SchemaPath path,@Nonnull ContainerNode data);
 
     /**
@@ -107,7 +100,6 @@ public interface BindingNormalizedNodeSerializer extends
      * @param data NormalizedNode representing notification data
      * @return NormalizedNode representation of notification
      */
-    @Override
     @Nonnull ContainerNode toNormalizedNodeNotification(@Nonnull Notification data);
 
     /**
@@ -116,6 +108,5 @@ public interface BindingNormalizedNodeSerializer extends
      * @param data NormalizedNode representing rpc data
      * @return NormalizedNode representation of rpc data
      */
-    @Override
     @Nonnull ContainerNode toNormalizedNodeRpcData(@Nonnull DataContainer data);
 }
index 6614bb08e0b8d045bcff5d22abc8ad2ddc2b6428..8a41021a04f72f4574061864f4d0cee33ae17a93 100644 (file)
@@ -17,17 +17,11 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
 
 /**
- *
  * Factory for {@link BindingStreamEventWriter}, which provides stream writers
- * which translates data and delegates calls to
- * {@link NormalizedNodeStreamWriter}.
- *
+ * which translates data and delegates calls to {@link NormalizedNodeStreamWriter}.
  */
-public interface BindingNormalizedNodeWriterFactory extends
-        org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeWriterFactory {
-
+public interface BindingNormalizedNodeWriterFactory {
     /**
-     *
      * Creates a {@link BindingStreamEventWriter} for data tree path which will
      * translate to NormalizedNode model and invoke proper events on supplied
      * {@link NormalizedNodeStreamWriter}.
@@ -49,12 +43,10 @@ public interface BindingNormalizedNodeWriterFactory extends
      *         which will write to supplied {@link NormalizedNodeStreamWriter}.
      * @throws IllegalArgumentException If supplied Instance Identifier is not valid.
      */
-    @Override
-    @Nonnull Entry<YangInstanceIdentifier, BindingStreamEventWriter> newWriterAndIdentifier(@Nonnull InstanceIdentifier<?> path,
-            @Nonnull NormalizedNodeStreamWriter domWriter);
+    @Nonnull Entry<YangInstanceIdentifier, BindingStreamEventWriter> newWriterAndIdentifier(
+            @Nonnull InstanceIdentifier<?> path, @Nonnull NormalizedNodeStreamWriter domWriter);
 
     /**
-     *
      * Creates a {@link BindingStreamEventWriter} for data tree path which will
      * translate to NormalizedNode model and invoke proper events on supplied
      * {@link NormalizedNodeStreamWriter}.
@@ -71,14 +63,12 @@ public interface BindingNormalizedNodeWriterFactory extends
      *         which will write to supplied {@link NormalizedNodeStreamWriter}.
      * @throws IllegalArgumentException If supplied Instance Identifier is not valid.
      */
-    @Override
     @Nonnull
     BindingStreamEventWriter newWriter(@Nonnull InstanceIdentifier<?> path,
             @Nonnull NormalizedNodeStreamWriter domWriter);
 
     /**
-     *
-     * Creates a {@link BindingStreamEventWriter} for rpc data which will
+     * Creates a {@link BindingStreamEventWriter} for RPC data which will
      * translate to NormalizedNode model and invoke proper events on supplied
      * {@link NormalizedNodeStreamWriter}.
      *
@@ -89,13 +79,11 @@ public interface BindingNormalizedNodeWriterFactory extends
      * @return {@link BindingStreamEventWriter} which will write to supplied
      *         {@link NormalizedNodeStreamWriter}.
      */
-    @Override
     @Nonnull
     BindingStreamEventWriter newRpcWriter(@Nonnull Class<? extends DataContainer> rpcInputOrOutput,
             @Nonnull NormalizedNodeStreamWriter domWriter);
 
     /**
-     *
      * Creates a {@link BindingStreamEventWriter} for notification which will
      * translate to NormalizedNode model and invoke proper events on supplied
      * {@link NormalizedNodeStreamWriter}.
@@ -107,7 +95,6 @@ public interface BindingNormalizedNodeWriterFactory extends
      * @return {@link BindingStreamEventWriter} which will write to supplied
      *         {@link NormalizedNodeStreamWriter}.
      */
-    @Override
     @Nonnull
     BindingStreamEventWriter newNotificationWriter(@Nonnull Class<? extends Notification> notification,
             @Nonnull NormalizedNodeStreamWriter domWriter);