Deprecate schema-aware builders
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / Builders.java
index 079ef8bf91f2f1f226bdd9f02fa800c724769cd4..ecf0b21be159055b79dc66ce5558adec7eb7ec94 100644 (file)
@@ -60,7 +60,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableYa
 import org.opendaylight.yangtools.yang.model.api.AnyxmlSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
-import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.ContainerLike;
 import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
@@ -74,6 +74,7 @@ public final class Builders {
         return ImmutableLeafNodeBuilder.create();
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static <T> NormalizedNodeBuilder<NodeIdentifier, T, LeafNode<T>> leafBuilder(
             final LeafSchemaNode schema) {
         return ImmutableLeafNodeSchemaAwareBuilder.create(schema);
@@ -83,6 +84,7 @@ public final class Builders {
         return ImmutableLeafSetEntryNodeBuilder.create();
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static <T> NormalizedNodeBuilder<NodeWithValue, T, LeafSetEntryNode<T>> leafSetEntryBuilder(
             final LeafListSchemaNode schema) {
         return ImmutableLeafSetEntryNodeSchemaAwareBuilder.create(schema);
@@ -92,11 +94,13 @@ public final class Builders {
         return ImmutableAnyXmlNodeBuilder.create();
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static NormalizedNodeBuilder<NodeIdentifier, DOMSource, DOMSourceAnyxmlNode> anyXmlBuilder(
             final AnyxmlSchemaNode schema) {
         return ImmutableAnyXmlNodeSchemaAwareBuilder.create(schema);
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static DataContainerNodeBuilder<NodeIdentifier, YangModeledAnyXmlNode> yangModeledAnyXmlBuilder(
             final YangModeledAnyxmlSchemaNode schema) {
         return ImmutableYangModeledAnyXmlNodeBuilder.create(schema);
@@ -111,6 +115,7 @@ public final class Builders {
         return ImmutableOrderedLeafSetNodeBuilder.create();
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> orderedLeafSetBuilder(final LeafListSchemaNode schema) {
         return ImmutableOrderedLeafSetNodeSchemaAwareBuilder.create(schema);
     }
@@ -123,10 +128,12 @@ public final class Builders {
         return ImmutableLeafSetNodeBuilder.create(node);
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> leafSetBuilder(final LeafListSchemaNode schema) {
         return ImmutableLeafSetNodeSchemaAwareBuilder.create(schema);
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> leafSetBuilder(final LeafListSchemaNode schema,
             final LeafSetNode<T> node) {
         return ImmutableLeafSetNodeSchemaAwareBuilder.create(schema, node);
@@ -141,13 +148,14 @@ public final class Builders {
         return ImmutableContainerNodeBuilder.create(node);
     }
 
-    public static DataContainerNodeBuilder<NodeIdentifier, ContainerNode> containerBuilder(
-            final ContainerSchemaNode schema) {
+    @Deprecated(since = "6.0.7", forRemoval = true)
+    public static DataContainerNodeBuilder<NodeIdentifier, ContainerNode> containerBuilder(final ContainerLike schema) {
         return ImmutableContainerNodeSchemaAwareBuilder.create(schema);
     }
 
-    public static DataContainerNodeBuilder<NodeIdentifier, ContainerNode> containerBuilder(
-            final ContainerSchemaNode schema, final ContainerNode node) {
+    @Deprecated(since = "6.0.7", forRemoval = true)
+    public static DataContainerNodeBuilder<NodeIdentifier, ContainerNode> containerBuilder(final ContainerLike schema,
+            final ContainerNode node) {
         return ImmutableContainerNodeSchemaAwareBuilder.create(schema, node);
     }
 
@@ -160,6 +168,7 @@ public final class Builders {
         return ImmutableMapEntryNodeBuilder.create(mapEntryNode);
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static DataContainerNodeBuilder<NodeIdentifierWithPredicates, MapEntryNode> mapEntryBuilder(
             final ListSchemaNode schema) {
         return ImmutableMapEntryNodeSchemaAwareBuilder.create(schema);
@@ -185,10 +194,12 @@ public final class Builders {
         return ImmutableMapNodeBuilder.create(node);
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static CollectionNodeBuilder<MapEntryNode, MapNode> mapBuilder(final ListSchemaNode schema) {
         return ImmutableMapNodeSchemaAwareBuilder.create(schema);
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static CollectionNodeBuilder<MapEntryNode, MapNode> mapBuilder(final ListSchemaNode schema,
             final MapNode node) {
         return ImmutableMapNodeSchemaAwareBuilder.create(schema, node);
@@ -198,6 +209,7 @@ public final class Builders {
         return ImmutableAugmentationNodeBuilder.create();
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> augmentationBuilder(
             final AugmentationSchemaNode schema) {
         return ImmutableAugmentationNodeSchemaAwareBuilder.create(schema);
@@ -207,6 +219,7 @@ public final class Builders {
         return ImmutableChoiceNodeBuilder.create();
     }
 
+    @Deprecated(since = "6.0.7", forRemoval = true)
     public static DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> choiceBuilder(final ChoiceSchemaNode schema) {
         return ImmutableChoiceNodeSchemaAwareBuilder.create(schema);
     }