Create ParameterGroupImpl 55/81855/1
authorJim Hahn <jrh3@att.com>
Fri, 8 Mar 2019 00:51:59 +0000 (19:51 -0500)
committerJim Hahn <jrh3@att.com>
Fri, 8 Mar 2019 13:40:51 +0000 (08:40 -0500)
Classes that implement ParameterGroup all have to add their own
name and validate() fields and methods.  Added an "impl" class that
provides the standard functionality and modified subclasses to use
it.

Change-Id: Ic6ee1607fb4fe7164a4e1eeebc480ea7d1e7e4d7
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
20 files changed:
common-parameters/pom.xml
common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterGroupImpl.java [new file with mode: 0644]
common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterValidationResult.java
common-parameters/src/test/java/org/onap/policy/common/parameters/TestValidation.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/EmptyParameterGroup.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupMissingGetter.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupPrivateGetter.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithArray.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithCollection.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapKey.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapValue.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullCollection.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullMapValue.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullSubGroup.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithParameterGroupCollection.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL00.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL10.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersLGeneric.java
common-parameters/src/test/resources/expectedValidationResults/TestJsonYamlValidationResult.txt
common-parameters/src/test/resources/expectedValidationResults/TestParametersL0_0_OK.txt

index e8859c8..9eefb55 100644 (file)
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
diff --git a/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterGroupImpl.java b/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterGroupImpl.java
new file mode 100644 (file)
index 0000000..f0f34ac
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.common.parameters;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.onap.policy.common.parameters.annotations.NotBlank;
+import org.onap.policy.common.parameters.annotations.NotNull;
+
+/**
+ * Implementation of a parameter group.
+ */
+@NotNull
+@NotBlank
+@Getter
+@Setter
+public class ParameterGroupImpl implements ParameterGroup {
+    /**
+     * Group name. Note: this MUST not be "private" or it will not be validated.
+     */
+    protected String name;
+
+    /**
+     * Constructs the object, with a {@code null} name.
+     */
+    public ParameterGroupImpl() {
+        this.name = null;
+    }
+
+    /**
+     * Constructs the object.
+     *
+     * @param name the group's name
+     */
+    public ParameterGroupImpl(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public GroupValidationResult validate() {
+        return new GroupValidationResult(this);
+    }
+}
index e43c2d1..57232e1 100644 (file)
@@ -49,12 +49,15 @@ public class ParameterValidationResult implements ValidationResult {
         this.field = field;
         this.parameterValue = parameterValue;
 
-        if (parameterValue == null && getAnyAnnotation(field, NotNull.class) != null) {
-            setResult(ValidationStatus.INVALID, "is null");
+        if (parameterValue == null) {
+            if (getAnyAnnotation(field, NotNull.class) != null) {
+                setResult(ValidationStatus.INVALID, "is null");
+            }
 
-        } else if (parameterValue instanceof String && getAnyAnnotation(field, NotBlank.class) != null
-                        && parameterValue.toString().trim().isEmpty()) {
-            setResult(ValidationStatus.INVALID, "must be a non-blank string");
+        } else if (parameterValue instanceof String) {
+            if (getAnyAnnotation(field, NotBlank.class) != null && parameterValue.toString().trim().isEmpty()) {
+                setResult(ValidationStatus.INVALID, "must be a non-blank string");
+            }
 
         } else if (parameterValue instanceof Number) {
             Min minAnnot = field.getAnnotation(Min.class);
@@ -66,7 +69,8 @@ public class ParameterValidationResult implements ValidationResult {
 
     /**
      * Gets an annotation for a field, first checking the field, itself, and then checking
-     * at the class level for the current and superclasses.
+     * at the class level. Does not check super classes as class-level annotations should
+     * only apply to the fields within the class.
      *
      * @param field field of interest
      * @param annotClass class of annotation that is desired
@@ -78,17 +82,7 @@ public class ParameterValidationResult implements ValidationResult {
             return annot;
         }
 
-        // check class level
-        Class<?> clazz = field.getDeclaringClass();
-        while (clazz != Object.class) {
-            if ((annot = clazz.getAnnotation(annotClass)) != null) {
-                return annot;
-            }
-
-            clazz = clazz.getSuperclass();
-        }
-
-        return null;
+        return field.getDeclaringClass().getAnnotation(annotClass);
     }
 
     /**
index 57d69f8..8adf116 100644 (file)
@@ -293,6 +293,12 @@ public class TestValidation {
         // non-null should be OK
         result = new ParameterValidationResult(NotNullSub.class.getDeclaredField(NOT_NULL_STRING_NAME), "");
         assertEquals(ValidationStatus.CLEAN, result.getStatus());
+
+        /*
+         * Super class annotation - null should be OK
+         */
+        result = new ParameterValidationResult(NotNullSub2.class.getDeclaredField("anotherString"), null);
+        assertEquals(ValidationStatus.CLEAN, result.getStatus());
     }
 
     @Test
@@ -358,47 +364,34 @@ public class TestValidation {
 
     // these classes are used to test class-level annotations
 
-    @NotNull
-    private static class NotNullBase {
+
+    private static class EmptyBase {
 
     }
 
-    private static class NotNullSub extends NotNullBase {
+    @NotNull
+    private static class NotNullSub extends EmptyBase {
         @SuppressWarnings("unused")
         private String notNullString;
     }
 
-    private static class NotBlankBase {
-
+    private static class NotNullSub2 extends NotNullSub {
+        @SuppressWarnings("unused")
+        private String anotherString;
     }
 
     @NotBlank
-    private static class NotBlankSub extends NotBlankBase {
+    private static class NotBlankSub extends EmptyBase {
         @SuppressWarnings("unused")
         private String notBlankString;
     }
 
-    private abstract static class SimpleGroup implements ParameterGroup {
-        private String name;
-
-        @Override
-        public String getName() {
-            return name;
-        }
-
-        @Override
-        public void setName(String name) {
-            this.name = name;
-        }
-    }
-
-    private static class Contained extends SimpleGroup {
+    private static class Contained extends ParameterGroupImpl {
         @Min(value = 1)
         private int minInt;
 
-        @Override
-        public GroupValidationResult validate() {
-            return new GroupValidationResult(this);
+        public Contained() {
+            super("Contained");
         }
 
         @SuppressWarnings("unused")
@@ -407,13 +400,12 @@ public class TestValidation {
         }
     }
 
-    private static class Container extends SimpleGroup {
+    private static class Container extends ParameterGroupImpl {
         @NotNull
         private Contained item;
 
-        @Override
-        public GroupValidationResult validate() {
-            return new GroupValidationResult(this);
+        public Container() {
+            super("Container");
         }
 
         @SuppressWarnings("unused")
index 505b2ce..d178748 100644 (file)
@@ -1,47 +1,31 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
 
 package org.onap.policy.common.parameters.testclasses;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-public class EmptyParameterGroup implements ParameterGroup {
-    private String name;
+public class EmptyParameterGroup extends ParameterGroupImpl {
 
-    public EmptyParameterGroup(final String name) {
-        this.name = name;
-    }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-    
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-    
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
+    public EmptyParameterGroup(String name) {
+        super(name);
     }
 }
index e05eea3..e6c8592 100644 (file)
@@ -1,36 +1,35 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
 
 package org.onap.policy.common.parameters.testclasses;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-public class ParameterGroupMissingGetter implements ParameterGroup {
-    private String name;
+public class ParameterGroupMissingGetter extends ParameterGroupImpl {
     private String value;
 
     public ParameterGroupMissingGetter(final String name) {
-        this.name = name;
+        super(name);
     }
-    
+
     public String getTheValue() {
         return value;
     }
@@ -38,19 +37,4 @@ public class ParameterGroupMissingGetter implements ParameterGroup {
     public void setValue(String value) {
         this.value = value;
     }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index 78a7c15..1d90ca1 100644 (file)
@@ -1,36 +1,35 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
 
 package org.onap.policy.common.parameters.testclasses;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-public class ParameterGroupPrivateGetter implements ParameterGroup {
-    private String name;
+public class ParameterGroupPrivateGetter extends ParameterGroupImpl {
     private String value;
 
     public ParameterGroupPrivateGetter(final String name) {
-        this.name = name;
+        super(name);
     }
-    
+
     public String getTheValue() {
         return getValue();
     }
@@ -42,19 +41,4 @@ public class ParameterGroupPrivateGetter implements ParameterGroup {
     public void setValue(String value) {
         this.value = value;
     }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index c448cea..e37b47a 100644 (file)
@@ -1,52 +1,36 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
 
 package org.onap.policy.common.parameters.testclasses;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-public class ParameterGroupWithArray implements ParameterGroup {
-    private String name;
+public class ParameterGroupWithArray extends ParameterGroupImpl {
     private int[] intArray = {1, 2, 3};
 
     public ParameterGroupWithArray(final String name) {
-        this.name = name;
+        super(name);
     }
 
     public int[] getIntArray() {
         return intArray;
     }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index 7f2c0ab..ee7c171 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
@@ -22,21 +23,18 @@ package org.onap.policy.common.parameters.testclasses;
 
 import java.util.ArrayList;
 import java.util.List;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
-
-public class ParameterGroupWithCollection implements ParameterGroup {
-    private String name;
+public class ParameterGroupWithCollection extends ParameterGroupImpl {
     private List<Integer> intArrayList = new ArrayList<>();
 
     /**
      * Create a test parameter group.
-     * 
+     *
      * @param name the parameter group name
      */
     public ParameterGroupWithCollection(final String name) {
-        this.name = name;
+        super(name);
 
         intArrayList.add(1);
         intArrayList.add(2);
@@ -46,19 +44,4 @@ public class ParameterGroupWithCollection implements ParameterGroup {
     public List<Integer> getIntArrayList() {
         return intArrayList;
     }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-    
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index 57a5a11..b3c7d1b 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
@@ -22,12 +23,10 @@ package org.onap.policy.common.parameters.testclasses;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
-
-import org.onap.policy.common.parameters.GroupValidationResult;
 import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-public class ParameterGroupWithIllegalMapKey implements ParameterGroup {
-    private String name;
+public class ParameterGroupWithIllegalMapKey extends ParameterGroupImpl {
     private Map<Integer, ParameterGroup> badMap = new LinkedHashMap<>();
 
     /**
@@ -35,8 +34,8 @@ public class ParameterGroupWithIllegalMapKey implements ParameterGroup {
      * @param name the parameter group name
      */
     public ParameterGroupWithIllegalMapKey(final String name) {
-        this.name = name;
-        
+        super(name);
+
         badMap.put(1, new TestParametersLGeneric("One"));
         badMap.put(2, new TestParametersLGeneric("Two"));
         badMap.put(3, new TestParametersLGeneric("Three"));
@@ -45,20 +44,4 @@ public class ParameterGroupWithIllegalMapKey implements ParameterGroup {
     public Map<Integer, ParameterGroup> getBadMap() {
         return badMap;
     }
-    
-    @Override
-    public String getName() {
-        return name;
-    }
-    
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-    
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
-
 }
index 39e35d9..4df708a 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
@@ -22,12 +23,9 @@ package org.onap.policy.common.parameters.testclasses;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
-
-public class ParameterGroupWithIllegalMapValue implements ParameterGroup {
-    private String name;
+public class ParameterGroupWithIllegalMapValue extends ParameterGroupImpl {
     private Map<String, Integer> intMap = new LinkedHashMap<>();
 
     /**
@@ -35,8 +33,8 @@ public class ParameterGroupWithIllegalMapValue implements ParameterGroup {
      * @param name the parameter group name
      */
     public ParameterGroupWithIllegalMapValue(final String name) {
-        this.name = name;
-        
+        super(name);
+
         intMap.put("One", 1);
         intMap.put("Two", 2);
         intMap.put("Three", 3);
@@ -45,19 +43,4 @@ public class ParameterGroupWithIllegalMapValue implements ParameterGroup {
     public Map<String, Integer> getIntMap() {
         return intMap;
     }
-    
-    @Override
-    public String getName() {
-        return name;
-    }
-    
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-    
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index 9b661bd..35752c7 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
 package org.onap.policy.common.parameters.testclasses;
 
 import java.util.List;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
-
-public class ParameterGroupWithNullCollection implements ParameterGroup {
-    private String name;
+public class ParameterGroupWithNullCollection extends ParameterGroupImpl {
     private List<Integer> nullList = null;
 
     /**
@@ -34,25 +32,10 @@ public class ParameterGroupWithNullCollection implements ParameterGroup {
      * @param name the parameter group name
      */
     public ParameterGroupWithNullCollection(final String name) {
-        this.name = name;
+        super(name);
     }
 
     public List<Integer> getNullList() {
         return nullList;
     }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index ac863a4..1a64002 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
 package org.onap.policy.common.parameters.testclasses;
 
 import java.util.Map;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
-
-public class ParameterGroupWithNullMapValue implements ParameterGroup {
-    private String name;
+public class ParameterGroupWithNullMapValue extends ParameterGroupImpl {
     private Map<String, Integer> nullMap = null;
 
     /**
@@ -34,25 +32,10 @@ public class ParameterGroupWithNullMapValue implements ParameterGroup {
      * @param name the parameter group name
      */
     public ParameterGroupWithNullMapValue(final String name) {
-        this.name = name;
+        super(name);
     }
 
     public Map<String, Integer> getNullMap() {
         return nullMap;
     }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index 830c811..7fe1402 100644 (file)
@@ -1,30 +1,30 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
 
 package org.onap.policy.common.parameters.testclasses;
 
-import org.onap.policy.common.parameters.GroupValidationResult;
 import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-public class ParameterGroupWithNullSubGroup implements ParameterGroup {
-    private String name;
+public class ParameterGroupWithNullSubGroup extends ParameterGroupImpl {
     private ParameterGroup subGroup = null;
 
     /**
@@ -32,25 +32,10 @@ public class ParameterGroupWithNullSubGroup implements ParameterGroup {
      * @param name the parameter group name
      */
     public ParameterGroupWithNullSubGroup(final String name) {
-        this.name = name;
+        super(name);
     }
 
     public ParameterGroup getSubGroup() {
         return subGroup;
     }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index 3966e49..08c799f 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
@@ -22,12 +23,10 @@ package org.onap.policy.common.parameters.testclasses;
 
 import java.util.ArrayList;
 import java.util.List;
-
-import org.onap.policy.common.parameters.GroupValidationResult;
 import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 
-public class ParameterGroupWithParameterGroupCollection implements ParameterGroup {
-    private String name;
+public class ParameterGroupWithParameterGroupCollection extends ParameterGroupImpl {
     private List<ParameterGroup> parameterGroupArrayList = new ArrayList<>();
 
     /**
@@ -35,8 +34,8 @@ public class ParameterGroupWithParameterGroupCollection implements ParameterGrou
      * @param name the parameter group name
      */
     public ParameterGroupWithParameterGroupCollection(final String name) {
-        this.name = name;
-        
+        super(name);
+
         parameterGroupArrayList.add(new TestParametersLGeneric("Generic0"));
         parameterGroupArrayList.add(new TestParametersLGeneric("Generic1"));
         parameterGroupArrayList.add(new TestParametersLGeneric("Generic2"));
@@ -45,19 +44,4 @@ public class ParameterGroupWithParameterGroupCollection implements ParameterGrou
     public List<ParameterGroup> getParameterGroupArrayList() {
         return parameterGroupArrayList;
     }
-    
-    @Override
-    public String getName() {
-        return name;
-    }
-    
-    @Override
-    public void setName(final String name) {
-        this.name = name;
-    }
-    
-    @Override
-    public GroupValidationResult validate() {
-        return new GroupValidationResult(this);
-    }
 }
index b4a7e9c..748eb90 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
@@ -23,16 +24,14 @@ package org.onap.policy.common.parameters.testclasses;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map.Entry;
-
 import org.onap.policy.common.parameters.GroupValidationResult;
 import org.onap.policy.common.parameters.ParameterConstants;
-import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 import org.onap.policy.common.parameters.ValidationStatus;
 
-public class TestParametersL00 implements ParameterGroup {
+public class TestParametersL00 extends ParameterGroupImpl {
     private static final String A_CONSTANT = "A Constant";
-    
-    private String name = A_CONSTANT;
+
     private int l00IntField = 0;
     private String l00StringField = "Legal " + this.getClass().getCanonicalName();
     private TestParametersL10 l00L10Nested = new TestParametersL10("l00L10Nested");
@@ -45,16 +44,16 @@ public class TestParametersL00 implements ParameterGroup {
      * Default constructor.
      */
     public TestParametersL00() {
-        // Default Cnstructor
+        super(A_CONSTANT);
     }
 
     /**
      * Create a test parameter group.
-     * 
+     *
      * @param name the parameter group name
      */
     public TestParametersL00(final String name) {
-        this.name = name;
+        super(name);
 
         TestParametersLGeneric l00LGenericNestedMapVal0 = new TestParametersLGeneric("l00LGenericNestedMapVal0");
         l00LGenericNestedMap.put(l00LGenericNestedMapVal0.getName(), l00LGenericNestedMapVal0);
@@ -94,10 +93,6 @@ public class TestParametersL00 implements ParameterGroup {
         this.isSomeFlag = isSomeFlag;
     }
 
-    public void setName(String name) {
-        this.name = name;
-    }
-
     public void setL00IntField(int l00IntField) {
         this.l00IntField = l00IntField;
     }
@@ -120,7 +115,7 @@ public class TestParametersL00 implements ParameterGroup {
 
     /**
      * Trigger a validation message.
-     * 
+     *
      * @param triggerStatus Validation status to trigger
      * @param level Number of levels to recurse before stopping
      */
@@ -161,16 +156,11 @@ public class TestParametersL00 implements ParameterGroup {
 
     }
 
-    @Override
-    public String getName() {
-        return name;
-    }
-
     @Override
     public GroupValidationResult validate() {
-        GroupValidationResult validationResult = new GroupValidationResult(this);
+        GroupValidationResult validationResult = super.validate();
 
-        if (name == null || name.trim().length() == 0) {
+        if (getName() == null || getName().trim().length() == 0) {
             validationResult.setResult("name", ValidationStatus.INVALID, "name must be a non-blank string");
         }
 
index f63ec3f..8ad682f 100644 (file)
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2019 AT&T Intellectual Property.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
@@ -23,14 +24,12 @@ package org.onap.policy.common.parameters.testclasses;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map.Entry;
-
 import org.onap.policy.common.parameters.GroupValidationResult;
 import org.onap.policy.common.parameters.ParameterConstants;
-import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 import org.onap.policy.common.parameters.ValidationStatus;
 
-public class TestParametersL10 implements ParameterGroup {
-    private String name;
+public class TestParametersL10 extends ParameterGroupImpl {
     private int l10IntField = 0;
     private String l10StringField = "Legal " + this.getClass().getCanonicalName();
     private TestParametersLGeneric l10LGenericNested0 = new TestParametersLGeneric("l10LGenericNested0");
@@ -43,14 +42,14 @@ public class TestParametersL10 implements ParameterGroup {
     public TestParametersL10() {
         // Default Constructor
     }
-    
+
     /**
      * Create a test parameter group.
-     * 
+     *
      * @param name the parameter group name
      */
     public TestParametersL10(final String name) {
-        this.name = name;
+        super(name);
 
         TestParametersLGeneric l10LGenericNestedMapVal0 = new TestParametersLGeneric("l10LGenericNestedMapVal0");
         l10LGenericNestedMap.put(l10LGenericNestedMapVal0.getName(), l10LGenericNestedMapVal0);
@@ -78,10 +77,6 @@ public class TestParametersL10 implements ParameterGroup {
         return l10LGenericNestedMap;
     }
 
-    public void setName(String name) {
-        this.name = name;
-    }
-
     public void setL10IntField(int l10IntField) {
         this.l10IntField = l10IntField;
     }
@@ -104,7 +99,7 @@ public class TestParametersL10 implements ParameterGroup {
 
     /**
      * Trigger a validation message.
-     * 
+     *
      * @param level Number of levels to recurse before stopping
      */
     public void triggerValidationStatus(final ValidationStatus triggerStatus, int level) {
@@ -144,14 +139,9 @@ public class TestParametersL10 implements ParameterGroup {
         }
     }
 
-    @Override
-    public String getName() {
-        return this.name;
-    }
-
     @Override
     public GroupValidationResult validate() {
-        GroupValidationResult validationResult = new GroupValidationResult(this);
+        GroupValidationResult validationResult = super.validate();
 
         if (l10StringField == null || l10StringField.trim().length() == 0) {
             validationResult.setResult("l10StringField", ValidationStatus.INVALID,
index 1e5764c..2fc0418 100644 (file)
 package org.onap.policy.common.parameters.testclasses;
 
 import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
 import org.onap.policy.common.parameters.ValidationStatus;
 import org.onap.policy.common.parameters.annotations.NotBlank;
 import org.onap.policy.common.parameters.annotations.NotNull;
 
-public class TestParametersLGeneric implements ParameterGroup {
-    private String name;
+public class TestParametersLGeneric extends ParameterGroupImpl {
     private int lgenericIntField = 0;
 
     @NotNull @NotBlank
@@ -47,7 +46,7 @@ public class TestParametersLGeneric implements ParameterGroup {
      * @param name the parameter group name
      */
     public TestParametersLGeneric(final String name) {
-        this.name = name;
+        super(name);
     }
 
     public int getLgenericIntField() {
@@ -58,10 +57,6 @@ public class TestParametersLGeneric implements ParameterGroup {
         return lgenericStringField;
     }
 
-    public void setName(String name) {
-        this.name = name;
-    }
-
     public void setLgenericIntField(int lgenericIntField) {
         this.lgenericIntField = lgenericIntField;
     }
@@ -106,14 +101,9 @@ public class TestParametersLGeneric implements ParameterGroup {
 
     }
 
-    @Override
-    public String getName() {
-        return this.name;
-    }
-
     @Override
     public GroupValidationResult validate() {
-        GroupValidationResult validationResult = new GroupValidationResult(this);
+        GroupValidationResult validationResult = super.validate();
 
         if ("lgenericStringField".equals(lgenericStringField)) {
             validationResult.setResult("lgenericStringField", ValidationStatus.WARNING,
index 8439e0b..64af724 100644 (file)
@@ -1,41 +1,41 @@
 parameter group "l00NameFromFile" type "org.onap.policy.common.parameters.testclasses.TestParametersL00" CLEAN, parameter group has status CLEAN
-  field "name" type "java.lang.String" value "l00NameFromFile" CLEAN, parameter has status CLEAN
   field "l00IntField" type "int" value "1" CLEAN, parameter has status CLEAN
   field "l00StringField" type "java.lang.String" value "l00 string field value from file" CLEAN, parameter has status CLEAN
   parameter group "l00L10NestedNameFromFile" type "org.onap.policy.common.parameters.testclasses.TestParametersL10" CLEAN, parameter group has status CLEAN
-    field "name" type "java.lang.String" value "l00L10NestedNameFromFile" CLEAN, parameter has status CLEAN
     field "l10IntField" type "int" value "1" CLEAN, parameter has status CLEAN
     field "l10StringField" type "java.lang.String" value "l00 L10 nested string field value from file" CLEAN, parameter has status CLEAN
     parameter group "l10LGenericNested0NameFromFile" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-      field "name" type "java.lang.String" value "l10LGenericNested0NameFromFile" CLEAN, parameter has status CLEAN
       field "lgenericIntField" type "int" value "1" CLEAN, parameter has status CLEAN
       field "lgenericStringField" type "java.lang.String" value "l10 generic nested 0 string field value from file" CLEAN, parameter has status CLEAN
+      field "name" type "java.lang.String" value "l10LGenericNested0NameFromFile" CLEAN, parameter has status CLEAN
     parameter group "l10LGenericNested1NameFromFile" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-      field "name" type "java.lang.String" value "l10LGenericNested1NameFromFile" CLEAN, parameter has status CLEAN
       field "lgenericIntField" type "int" value "1" CLEAN, parameter has status CLEAN
       field "lgenericStringField" type "java.lang.String" value "l10 generic nested 1 string field value from file" CLEAN, parameter has status CLEAN
+      field "name" type "java.lang.String" value "l10LGenericNested1NameFromFile" CLEAN, parameter has status CLEAN
     parameter group map "l10LGenericNestedMap" CLEAN, parameter group map has status CLEAN
       parameter group "L10Entry0Name" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-        field "name" type "java.lang.String" value "L10Entry0Name" CLEAN, parameter has status CLEAN
         field "lgenericIntField" type "int" value "1" CLEAN, parameter has status CLEAN
         field "lgenericStringField" type "java.lang.String" value "L10Entry0 value from file" CLEAN, parameter has status CLEAN
+        field "name" type "java.lang.String" value "L10Entry0Name" CLEAN, parameter has status CLEAN
       parameter group "L10Entry1Name" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-        field "name" type "java.lang.String" value "L10Entry1Name" CLEAN, parameter has status CLEAN
         field "lgenericIntField" type "int" value "1" CLEAN, parameter has status CLEAN
         field "lgenericStringField" type "java.lang.String" value "L10Entry1 value from file" CLEAN, parameter has status CLEAN
+        field "name" type "java.lang.String" value "L10Entry1Name" CLEAN, parameter has status CLEAN
+    field "name" type "java.lang.String" value "l00L10NestedNameFromFile" CLEAN, parameter has status CLEAN
   parameter group "l00GenericNestedNameFromFile" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-    field "name" type "java.lang.String" value "l00GenericNestedNameFromFile" CLEAN, parameter has status CLEAN
     field "lgenericIntField" type "int" value "1" CLEAN, parameter has status CLEAN
     field "lgenericStringField" type "java.lang.String" value "l00 generic nested string field value from file" CLEAN, parameter has status CLEAN
+    field "name" type "java.lang.String" value "l00GenericNestedNameFromFile" CLEAN, parameter has status CLEAN
   parameter group map "l00LGenericNestedMap" CLEAN, parameter group map has status CLEAN
     parameter group "L00Entry0Name" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-      field "name" type "java.lang.String" value "L00Entry0Name" CLEAN, parameter has status CLEAN
       field "lgenericIntField" type "int" value "1" CLEAN, parameter has status CLEAN
       field "lgenericStringField" type "java.lang.String" value "L00Entry0 value from file" CLEAN, parameter has status CLEAN
+      field "name" type "java.lang.String" value "L00Entry0Name" CLEAN, parameter has status CLEAN
     parameter group "L00Entry1Name" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-      field "name" type "java.lang.String" value "L00Entry1Name" CLEAN, parameter has status CLEAN
       field "lgenericIntField" type "int" value "1" CLEAN, parameter has status CLEAN
       field "lgenericStringField" type "java.lang.String" value "L00Entry1 value from file" CLEAN, parameter has status CLEAN
+      field "name" type "java.lang.String" value "L00Entry1Name" CLEAN, parameter has status CLEAN
   field "isSomeFlag" type "boolean" value "false" CLEAN, parameter has status CLEAN
   field "someNonIsFlag" type "boolean" value "false" CLEAN, parameter has status CLEAN
+  field "name" type "java.lang.String" value "l00NameFromFile" CLEAN, parameter has status CLEAN
   
\ No newline at end of file
index 2774f35..d6b4331 100644 (file)
@@ -1,41 +1,41 @@
 parameter group "l0Parameters" type "org.onap.policy.common.parameters.testclasses.TestParametersL00" CLEAN, parameter group has status CLEAN
-  field "name" type "java.lang.String" value "l0Parameters" CLEAN, parameter has status CLEAN
   field "l00IntField" type "int" value "0" CLEAN, parameter has status CLEAN
   field "l00StringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersL00" CLEAN, parameter has status CLEAN
   parameter group "l00L10Nested" type "org.onap.policy.common.parameters.testclasses.TestParametersL10" CLEAN, parameter group has status CLEAN
-    field "name" type "java.lang.String" value "l00L10Nested" CLEAN, parameter has status CLEAN
     field "l10IntField" type "int" value "0" CLEAN, parameter has status CLEAN
     field "l10StringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersL10" CLEAN, parameter has status CLEAN
     parameter group "l10LGenericNested0" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-      field "name" type "java.lang.String" value "l10LGenericNested0" CLEAN, parameter has status CLEAN
       field "lgenericIntField" type "int" value "0" CLEAN, parameter has status CLEAN
       field "lgenericStringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter has status CLEAN
+      field "name" type "java.lang.String" value "l10LGenericNested0" CLEAN, parameter has status CLEAN
     parameter group "l10LGenericNested1" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-      field "name" type "java.lang.String" value "l10LGenericNested1" CLEAN, parameter has status CLEAN
       field "lgenericIntField" type "int" value "0" CLEAN, parameter has status CLEAN
       field "lgenericStringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter has status CLEAN
+      field "name" type "java.lang.String" value "l10LGenericNested1" CLEAN, parameter has status CLEAN
     parameter group map "l10LGenericNestedMap" CLEAN, parameter group map has status CLEAN
       parameter group "l10LGenericNestedMapVal0" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-        field "name" type "java.lang.String" value "l10LGenericNestedMapVal0" CLEAN, parameter has status CLEAN
         field "lgenericIntField" type "int" value "0" CLEAN, parameter has status CLEAN
         field "lgenericStringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter has status CLEAN
+        field "name" type "java.lang.String" value "l10LGenericNestedMapVal0" CLEAN, parameter has status CLEAN
       parameter group "l10LGenericNestedMapVal1" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-        field "name" type "java.lang.String" value "l10LGenericNestedMapVal1" CLEAN, parameter has status CLEAN
         field "lgenericIntField" type "int" value "0" CLEAN, parameter has status CLEAN
         field "lgenericStringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter has status CLEAN
+        field "name" type "java.lang.String" value "l10LGenericNestedMapVal1" CLEAN, parameter has status CLEAN
+    field "name" type "java.lang.String" value "l00L10Nested" CLEAN, parameter has status CLEAN
   parameter group "l00LGenericNested" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-    field "name" type "java.lang.String" value "l00LGenericNested" CLEAN, parameter has status CLEAN
     field "lgenericIntField" type "int" value "0" CLEAN, parameter has status CLEAN
     field "lgenericStringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter has status CLEAN
+    field "name" type "java.lang.String" value "l00LGenericNested" CLEAN, parameter has status CLEAN
   parameter group map "l00LGenericNestedMap" CLEAN, parameter group map has status CLEAN
     parameter group "l00LGenericNestedMapVal0" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-      field "name" type "java.lang.String" value "l00LGenericNestedMapVal0" CLEAN, parameter has status CLEAN
       field "lgenericIntField" type "int" value "0" CLEAN, parameter has status CLEAN
       field "lgenericStringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter has status CLEAN
+      field "name" type "java.lang.String" value "l00LGenericNestedMapVal0" CLEAN, parameter has status CLEAN
     parameter group "l00LGenericNestedMapVal1" type "org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter group has status CLEAN
-      field "name" type "java.lang.String" value "l00LGenericNestedMapVal1" CLEAN, parameter has status CLEAN
       field "lgenericIntField" type "int" value "0" CLEAN, parameter has status CLEAN
       field "lgenericStringField" type "java.lang.String" value "Legal org.onap.policy.common.parameters.testclasses.TestParametersLGeneric" CLEAN, parameter has status CLEAN
+      field "name" type "java.lang.String" value "l00LGenericNestedMapVal1" CLEAN, parameter has status CLEAN
   field "isSomeFlag" type "boolean" value "false" CLEAN, parameter has status CLEAN
   field "someNonIsFlag" type "boolean" value "false" CLEAN, parameter has status CLEAN
+  field "name" type "java.lang.String" value "l0Parameters" CLEAN, parameter has status CLEAN
   
\ No newline at end of file