diff options
author | Jim Hahn <jrh3@att.com> | 2021-06-18 13:33:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-06-18 13:33:50 +0000 |
commit | 093c30c616a161f247189ccd9add62324f18139b (patch) | |
tree | 931f06c1a02e66bcf329f7bdbd3a7991693363a6 | |
parent | bd9ca66610d6ffabd689eba4dbba8f4f89ef9c61 (diff) | |
parent | 175aa75c1a4b1f0cee27d534831ff9382c83047a (diff) |
Merge "Use lombok annotations for tosca, rest, sdnc"
19 files changed, 28 insertions, 101 deletions
diff --git a/models-interactions/model-impl/rest/pom.xml b/models-interactions/model-impl/rest/pom.xml index a7519080a..f773c0f45 100644 --- a/models-interactions/model-impl/rest/pom.xml +++ b/models-interactions/model-impl/rest/pom.xml @@ -43,11 +43,6 @@ <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> <scope>test</scope> diff --git a/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/HttpDeleteWithBody.java b/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/HttpDeleteWithBody.java index b99f7283f..992209de4 100644 --- a/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/HttpDeleteWithBody.java +++ b/models-interactions/model-impl/rest/src/main/java/org/onap/policy/rest/HttpDeleteWithBody.java @@ -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"); @@ -23,32 +23,27 @@ 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; } - } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java index fa3b99a17..4474e7839 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java index 03f4d0bb0..197e79e0a 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java @@ -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; - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java index 1033048f2..e71c0a129 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java index 33e1b122c..3356d3b5d 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java index d19d3461d..bc2c8b9a0 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleInfo.java index 9b2ab646b..961021f10 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleInfo.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleInfo.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java index 7c75f837d..4445f0d3c 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java index b71495fcb..01deb2af9 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java index e8223de68..25a4cd964 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java index 56e69d641..2fee356cb 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java index 718a469a6..da39b8b80 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java index 19b4ca537..b4a1c7355 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java index 270c24142..aef947def 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java index 750b9c383..a77f0da42 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java @@ -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 - } } diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java index 090b4f9b6..45ed031f7 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java @@ -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() { - - } } diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaServiceTemplateUtils.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaServiceTemplateUtils.java index 362653650..7f6fbb2f3 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaServiceTemplateUtils.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaServiceTemplateUtils.java @@ -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 diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java index 450b589c5..5ec8247ac 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java @@ -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"; @@ -68,13 +71,6 @@ public final class ToscaUtils { // @formatter:on /** - * Private constructor to prevent subclassing. - */ - private ToscaUtils() { - // Private constructor to prevent subclassing - } - - /** * Get the predefined policy types. * * @return the predefined policy types |