summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/appclcm
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-17 17:35:26 -0400
committerJim Hahn <jrh3@att.com>2021-06-17 17:52:40 -0400
commitcad8b87bffb3b10c67f8b68ce8fcee5e5a3dcc35 (patch)
tree22748439c4a9c81bfb10e82577448e397f6c3996 /models-interactions/model-impl/appclcm
parent27ac6bce15318a074d4fb53606571eb30e46bf07 (diff)
Use lombok annotations for aai, appc, appclcm, cds
Issue-ID: POLICY-3396 Change-Id: I81b6b0c7929809ffaeadadd6144e9b9f394bfdc8 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-impl/appclcm')
-rw-r--r--models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/AppcLcmResponseCode.java15
-rw-r--r--models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/Serialization.java7
2 files changed, 9 insertions, 13 deletions
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/AppcLcmResponseCode.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/AppcLcmResponseCode.java
index 43697e9e8..30b15950f 100644
--- a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/AppcLcmResponseCode.java
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/AppcLcmResponseCode.java
@@ -23,8 +23,12 @@
package org.onap.policy.appclcm;
import java.io.Serializable;
+import lombok.AccessLevel;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.onap.policy.appclcm.util.StatusCodeEnum;
+@AllArgsConstructor(access = AccessLevel.PROTECTED)
public class AppcLcmResponseCode implements Serializable {
/* These fields define the key to the response code value. */
@@ -37,15 +41,8 @@ public class AppcLcmResponseCode implements Serializable {
public static final String PARTIAL_FAILURE = "PARTIAL FAILURE";
private static final long serialVersionUID = 8189456447227022582L;
- private final Integer code;
-
- protected AppcLcmResponseCode(final int code) {
- this.code = code;
- }
-
- public int getCode() {
- return this.code;
- }
+ @Getter
+ private final int code;
@Override
public String toString() {
diff --git a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/Serialization.java b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/Serialization.java
index 7dd6e46de..ce7a868d6 100644
--- a/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/Serialization.java
+++ b/models-interactions/model-impl/appclcm/src/main/java/org/onap/policy/appclcm/util/Serialization.java
@@ -24,9 +24,12 @@ package org.onap.policy.appclcm.util;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.time.Instant;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
import org.onap.policy.common.gson.InstantAsMillisTypeAdapter;
import org.onap.policy.common.gson.InstantTypeAdapter;
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class Serialization {
public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
.registerTypeAdapter(Instant.class, new InstantTypeAdapter()).create();
@@ -36,8 +39,4 @@ public final class Serialization {
public static final Gson gsonJunit = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
.registerTypeAdapter(Instant.class, new InstantAsMillisTypeAdapter()).create();
-
- private Serialization() {
- // Private constructor to prevent subclassing
- }
}