Use lombok annotations for tosca, rest, sdnc 25/122025/1
authorJim Hahn <jrh3@att.com>
Thu, 17 Jun 2021 20:05:25 +0000 (16:05 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 17 Jun 2021 20:20:48 +0000 (16:20 -0400)
Issue-ID: POLICY-3396
Change-Id: I3c9e5ee7ea6da2bab4fe37504d39f7ce63868887
Signed-off-by: Jim Hahn <jrh3@att.com>
19 files changed:
models-interactions/model-impl/rest/pom.xml
models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/HttpDeleteWithBody.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleInfo.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java
models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java
models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaServiceTemplateUtils.java
models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java

index a751908..f773c0f 100644 (file)
       <artifactId>httpclient</artifactId>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-        <groupId>javax.xml.bind</groupId>
-        <artifactId>jaxb-api</artifactId>
-        <version>${version.javax.bind}</version>
-    </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
index b99f728..992209d 100644 (file)
@@ -3,7 +3,7 @@
  * rest
  * ================================================================================
  * Copyright (C) 2018 Amdocs. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 package org.onap.policy.rest;
 
 import java.net.URI;
+import lombok.NoArgsConstructor;
 import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
 
 /**
  * Allows for HTTP DELETE requests to contain a body, which the HttpDelete
  * class does not support.
  */
+@NoArgsConstructor
 public class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
     public static final String METHOD_NAME = "DELETE";
 
     public HttpDeleteWithBody(final String uri) {
-        super();
         setURI(URI.create(uri));
     }
 
     public HttpDeleteWithBody(final URI uri) {
-        super();
         setURI(uri);
     }
 
-    public HttpDeleteWithBody() {
-        super();
-    }
-
     @Override
     public String getMethod() {
         return METHOD_NAME;
     }
-
 }
index fa3b99a..4474e78 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -32,8 +33,4 @@ public class SdncHealNetworkInfo implements Serializable {
 
     @SerializedName("network-id")
     private String networkId;
-
-    public SdncHealNetworkInfo() {
-        // Default constructor for SdncHealActionVmInfo
-    }
 }
index 03f4d0b..197e79e 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018-2019 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -50,16 +51,4 @@ public class SdncHealRequest implements Serializable {
 
     @SerializedName("vf-module-request-input")
     private SdncHealVfModuleRequestInput vfModuleRequestInput;
-
-    public SdncHealRequest() {
-        // Default constructor for SdncHealRequest
-    }
-
-    public SdncHealRequestHeaderInfo getRequestHeaderInfo() {
-        return requestHeaderInfo;
-    }
-
-    public void setRequestHeaderInfo(SdncHealRequestHeaderInfo requestHeaderInfo) {
-        this.requestHeaderInfo = requestHeaderInfo;
-    }
 }
index 1033048..e71c0a1 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -35,8 +36,4 @@ public class SdncHealRequestHeaderInfo implements Serializable {
 
     @SerializedName("svc-action")
     private String svcAction;
-
-    public SdncHealRequestHeaderInfo() {
-        // Default constructor for SdncHealActionVmInfo
-    }
 }
index 33e1b12..3356d3b 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -32,8 +33,4 @@ public class SdncHealRequestInfo implements Serializable {
 
     @SerializedName("request-action")
     private String requestAction;
-
-    public SdncHealRequestInfo() {
-        // Default constructor for SdncHealActionVmInfo
-    }
 }
index d19d346..bc2c8b9 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -32,8 +33,4 @@ public class SdncHealServiceInfo implements Serializable {
 
     @SerializedName("service-instance-id")
     private String serviceInstanceId;
-
-    public SdncHealServiceInfo() {
-        // Default constructor for SdncHealActionVmInfo
-    }
 }
index 9b2ab64..961021f 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019, 2021 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.
@@ -32,8 +32,4 @@ public class SdncHealVfModuleInfo implements Serializable {
 
     @SerializedName("vf-module-id")
     private String vfModuleId;
-
-    public SdncHealVfModuleInfo() {
-        // Default constructor for SdncHealVfModuleInfo
-    }
 }
index 7c75f83..4445f0d 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019, 2021 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.
@@ -35,8 +35,4 @@ public class SdncHealVfModuleParameter implements Serializable {
 
     @SerializedName("value")
     private String value;
-
-    public SdncHealVfModuleParameter() {
-        // Default constructor for SdncHealVfModuleParameter
-    }
 }
index b71495f..01deb2a 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019, 2021 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.
@@ -32,8 +32,4 @@ public class SdncHealVfModuleRequestInput implements Serializable {
 
     @SerializedName("vf-module-input-parameters")
     private SdncHealVfModuleParametersInfo vfModuleParametersInfo;
-
-    public SdncHealVfModuleRequestInput() {
-        // Default constructor for SdncHealVfModuleRequestInput
-    }
 }
index e8223de..25a4cd9 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019, 2021 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.
@@ -32,8 +32,4 @@ public class SdncHealVnfInfo implements Serializable {
 
     @SerializedName("vnf-id")
     private String vnfId;
-
-    public SdncHealVnfInfo() {
-        // Default constructor for SdncHealVnfInfo
-    }
 }
index 56e69d6..2fee356 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019, 2021 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.
@@ -38,8 +38,4 @@ public class SdncRequest implements Serializable {
 
     @SerializedName("input")
     private SdncHealRequest healRequest;
-
-    public SdncRequest() {
-            // Default constructor for SdncRequest
-    }
 }
index 718a469..da39b8b 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -34,8 +35,4 @@ public class SdncResponse implements Serializable {
     private SdncResponseOutput responseOutput;
 
     private transient String requestId;
-
-    public SdncResponse() {
-        // Default constructor for SdncResponse
-    }
 }
index 19b4ca5..b4a1c73 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -35,8 +36,4 @@ public class SdncResponseNetworkInfo implements Serializable {
 
     @SerializedName("object-path")
     private String objectPath;
-
-    public SdncResponseNetworkInfo() {
-        // Default constructor for SdncResponseNetworkInfo
-    }
 }
index 270c241..aef947d 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -38,8 +39,4 @@ public class SdncResponseOutput implements Serializable {
 
     @SerializedName("ack-final-indicator")
     private String ackFinalIndicator;
-
-    public SdncResponseOutput() {
-        // Default constructor for SdncResponseDescriptor
-    }
 }
index 750b9c3..a77f0da 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -32,8 +33,4 @@ public class SdncResponseServiceInfo implements Serializable {
 
     @SerializedName("instance-id")
     private String instanceId;
-
-    public SdncResponseServiceInfo() {
-        // Default constructor for SdncResponseServiceInfo
-    }
 }
index 090b4f9..45ed031 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019, 2021 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.
@@ -22,14 +22,13 @@ package org.onap.policy.sdnc.util;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
 
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class Serialization {
 
     public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping()
             .setPrettyPrinting()
             .create();
-
-    private Serialization() {
-
-    }
 }
index 3626536..7f6fbb2 100644 (file)
@@ -23,6 +23,8 @@ package org.onap.policy.models.tosca.utils;
 
 import java.util.Map.Entry;
 import javax.ws.rs.core.Response;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
 import lombok.NonNull;
 import org.onap.policy.common.parameters.BeanValidationResult;
 import org.onap.policy.models.base.PfConceptContainer;
@@ -37,13 +39,8 @@ import org.onap.policy.models.tosca.simple.concepts.JpaToscaTopologyTemplate;
 /**
  * This utility class provides methods to manage service templates.
  */
-public class ToscaServiceTemplateUtils {
-    /**
-     * Private constructor to prevent subclassing.
-     */
-    private ToscaServiceTemplateUtils() {
-        // Private constructor to prevent subclassing
-    }
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class ToscaServiceTemplateUtils {
 
     /**
      * Add a service template fragment to a service template. All entities in the service template fragment must either
index 450b589..5ec8247 100644 (file)
@@ -26,6 +26,8 @@ import java.util.HashSet;
 import java.util.Set;
 import java.util.function.Function;
 import javax.ws.rs.core.Response;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
 import lombok.NonNull;
 import org.apache.commons.collections4.CollectionUtils;
 import org.onap.policy.common.parameters.BeanValidationResult;
@@ -46,6 +48,7 @@ import org.onap.policy.models.tosca.simple.concepts.JpaToscaServiceTemplate;
  *
  * @author Liam Fallon (liam.fallon@est.tech)
  */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class ToscaUtils {
     private static final String ROOT_KEY_NAME_SUFFIX = ".Root";
 
@@ -67,13 +70,6 @@ public final class ToscaUtils {
         );
     // @formatter:on
 
-    /**
-     * Private constructor to prevent subclassing.
-     */
-    private ToscaUtils() {
-        // Private constructor to prevent subclassing
-    }
-
     /**
      * Get the predefined policy types.
      *