From dac4eef8d002a29dccd6cbd74206bea7f7f5cbc9 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 17 Jun 2021 18:04:53 -0400 Subject: Use lombok annotations for actors This is the last one for policy-models! Issue-ID: POLICY-3396 Change-Id: I05b114a57a720a6ae8ae073b80c8bded36d0d06d Signed-off-by: Jim Hahn --- .../controlloop/actor/so/RestManagerResponse.java | 17 +++-------------- .../onap/policy/controlloop/actor/so/SoConstants.java | 12 ++++++------ 2 files changed, 9 insertions(+), 20 deletions(-) (limited to 'models-interactions/model-actors/actor.so/src') diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java index 1b49ab579..12f526fbe 100644 --- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java +++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2020-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,6 +34,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.NewCookie; import javax.ws.rs.core.Response; +import lombok.AllArgsConstructor; import lombok.Getter; import org.onap.policy.common.utils.coder.Coder; import org.onap.policy.common.utils.coder.CoderException; @@ -42,6 +43,7 @@ import org.onap.policy.common.utils.coder.CoderException; * RestManager Response suitable for use with subclasses of HttpOperation. Only a couple * of methods are implemented; the rest throw {@link UnsupportedOperationException}. */ +@AllArgsConstructor public class RestManagerResponse extends Response { // TODO move to actorServices @@ -51,19 +53,6 @@ public class RestManagerResponse extends Response { private final String body; private final Coder coder; - /** - * Constructs the object. - * - * @param status HTTP response status code - * @param body response body - * @param coder coder to decode the entity body - */ - public RestManagerResponse(int status, String body, Coder coder) { - this.status = status; - this.body = body; - this.coder = coder; - } - @Override public void close() { // do nothing diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoConstants.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoConstants.java index b238671b4..a59ea3d03 100644 --- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoConstants.java +++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoConstants.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2020-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. @@ -20,10 +20,10 @@ package org.onap.policy.controlloop.actor.so; -public class SoConstants { - public static final String VF_COUNT_PREFIX = "SO.VFCount"; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; - private SoConstants() { - // do nothing - } +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public final class SoConstants { + public static final String VF_COUNT_PREFIX = "SO.VFCount"; } -- cgit 1.2.3-korg