X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fscheduleraux%2FSchedulerAuxUtil.java;h=4d81c6d0f1c8d111b042ca098a307b04e197d4f6;hb=114070f4684fc453dd5a44c635278293c1f674f7;hp=f0f0af5a0a5ab0e3b41c12b763df644b434b3e04;hpb=ffd9af970318c1f5a0bad46d7aad5d4611414aae;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduleraux/SchedulerAuxUtil.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduleraux/SchedulerAuxUtil.java index f0f0af5a..4d81c6d0 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduleraux/SchedulerAuxUtil.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/scheduleraux/SchedulerAuxUtil.java @@ -43,38 +43,36 @@ import org.glassfish.jersey.client.ClientResponse; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class SchedulerAuxUtil { - - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerAuxUtil.class); - public static SchedulerAuxResponseWrapper wrapResponse ( String body, int statusCode ) { - - SchedulerAuxResponseWrapper w = new SchedulerAuxResponseWrapper(); - w.setStatus (statusCode); - w.setEntity(body); - - return w; - } - - public static SchedulerAuxResponseWrapper wrapResponse (ClientResponse cres) { - String resp_str = ""; - if ( cres != null ) { - resp_str = cres.readEntity(String.class); - } - int statuscode = cres.getStatus(); - SchedulerAuxResponseWrapper w = SchedulerAuxUtil.wrapResponse ( resp_str, statuscode ); - return (w); - } - - public static SchedulerAuxResponseWrapper wrapResponse (RestObject rs) { - String resp_str = ""; - int status = 0; - if ( rs != null ) { - resp_str = rs.get(); - status = rs.getStatusCode(); - } - SchedulerAuxResponseWrapper w = SchedulerAuxUtil.wrapResponse ( resp_str, status ); - return (w); - } - - + public static SchedulerAuxResponseWrapper wrapResponse(String body, int statusCode) { + + SchedulerAuxResponseWrapper w = new SchedulerAuxResponseWrapper(); + w.setStatus(statusCode); + w.setEntity(body); + + return w; + } + + public static SchedulerAuxResponseWrapper wrapResponse(ClientResponse cres) { + String respStr = ""; + int statuscode = 0; + if (cres != null) { + respStr = cres.readEntity(String.class); + statuscode = cres.getStatus(); + } + SchedulerAuxResponseWrapper w = SchedulerAuxUtil.wrapResponse(respStr, statuscode); + return (w); + } + + public static SchedulerAuxResponseWrapper wrapResponse(RestObject rs) { + String respStr = ""; + int status = 0; + if (rs != null) { + respStr = rs.get(); + status = rs.getStatusCode(); + } + SchedulerAuxResponseWrapper w = SchedulerAuxUtil.wrapResponse(respStr, status); + return (w); + } + }