Add support for identity-ref config attributes to config/netconf subsystem
[controller.git] / opendaylight / config / yang-jmx-generator-plugin / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / plugin / ftl / model / ModuleField.java
index 5624e169da81d0f69dc2bca15f7dce1de71fab6a..74e5bb0490c5de483a357476ecf3bde7b3aeb790 100644 (file)
@@ -17,13 +17,12 @@ import java.util.List;
 public class ModuleField extends Field {
 
     private final String nullableDefault, attributeName;
-    private final boolean dependent;
+    private final boolean dependent, isListOfDependencies;
     private final Dependency dependency;
 
-    public ModuleField(List<String> modifiers, String type, String name,
-            String attributeName, String nullableDefault, boolean isDependency,
-            Dependency dependency) {
-        super(modifiers, type, name);
+    private ModuleField(List<String> modifiers, String type, String name, String attributeName, String nullableDefault,
+            boolean isDependency, Dependency dependency, boolean isListOfDependencies, boolean needsDepResolver) {
+        super(modifiers, type, name, null, needsDepResolver);
         this.dependent = isDependency;
         this.dependency = dependency;
         this.attributeName = attributeName;
@@ -32,12 +31,17 @@ public class ModuleField extends Field {
             nullableDefault = "new " + ArrayList.class.getName() + generics + "()";
         }
         this.nullableDefault = nullableDefault;
+        this.isListOfDependencies = isListOfDependencies;
     }
 
-    public ModuleField(String type, String name, String attributeName,
-            String nullableDefault, boolean isDependency, Dependency dependency) {
-        this(Collections.<String> emptyList(), type, name, attributeName,
-                nullableDefault, isDependency, dependency);
+    public ModuleField(String type, String name, String attributeName, String nullableDefault, boolean isDependency,
+            Dependency dependency, boolean isListOfDependencies, boolean needsDepResolve) {
+        this(Collections.<String> emptyList(), type, name, attributeName, nullableDefault, isDependency, dependency,
+                isListOfDependencies, needsDepResolve);
+    }
+
+    public boolean isIdentityRef() {
+        return false;
     }
 
     public Dependency getDependency() {
@@ -52,6 +56,10 @@ public class ModuleField extends Field {
         return dependent;
     }
 
+    public boolean isListOfDependencies() {
+        return isListOfDependencies;
+    }
+
     public String getAttributeName() {
         return attributeName;
     }