X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fservice%2FApplicationsRestClientServiceImpl.java;h=1460a61c5ae3ce2a9b4b29a64159e2f4346a2130;hb=3aa28e9dd68cce134644223505f326378b5d91a8;hp=1871720496b982f5faa7be6080bbdaa527bf5f64;hpb=08f55be6a0a9708ceeb176d5e1a0a56f885fad59;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImpl.java index 18717204..1460a61c 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImpl.java @@ -53,7 +53,6 @@ import javax.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.apache.cxf.jaxrs.client.WebClient; import org.apache.cxf.transport.http.HTTPException; -import org.onap.portalapp.portal.service.AppsCacheService; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.logging.aop.EPAuditLog; import org.onap.portalapp.portal.logging.aop.EPMetricsLog; @@ -252,7 +251,7 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient * (non-Javadoc) * * @see - * org.openecomp.portalapp.portal.service.ApplicationsRestClientService#get( + * org.onap.portalapp.portal.service.ApplicationsRestClientService#get( * java.lang.Class, long, java.lang.String, boolean) */ @Override @@ -354,13 +353,15 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient WebClient client = null; Response response = null; T t = null; - + logger.debug(EELFLoggerDelegate.debugLogger, "Entering to createClientForApp method for payload: {} and restPath: {} and appId: {}", payload.toString(), restPath, appId); client = createClientForApp(appId, restPath); EcompPortalUtils.logAndSerializeObject(logger, restPath, "POST request =", payload); - + logger.debug(EELFLoggerDelegate.debugLogger, "Finished createClientForApp method for payload: {} and restPath: {} and appId: {}", payload.toString(), restPath, appId); try { if (client != null) { + logger.debug(EELFLoggerDelegate.debugLogger, "Entering to POST for payload: {} and restPath: {} and appId: {}", payload.toString(), restPath, appId); response = client.post(payload); + logger.debug(EELFLoggerDelegate.debugLogger, "Finished to POST for payload: {} and restPath: {} and appId: {}", payload.toString(), restPath, appId); } else { logger.error(EELFLoggerDelegate.errorLogger, "Unable to create the Webclient to make the '" + restPath + "' API call."); @@ -396,12 +397,21 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient Response response = null; T t = null; + logger.debug(EELFLoggerDelegate.debugLogger, "Entering to createClientForApp method for payload: {} and restPath: {} and appId: {}", payload.toString(), restPath, appId); + client = createClientForApp(appId, restPath); EcompPortalUtils.logAndSerializeObject(logger, restPath, "PUT request =", payload); + + logger.debug(EELFLoggerDelegate.debugLogger, "Finished createClientForApp method for payload: {} and restPath: {} and appId: {}", payload.toString(), restPath, appId); try { if (client != null) { + logger.debug(EELFLoggerDelegate.debugLogger, "Entering to PUT for payload: {} and restPath: {} and appId: {}", payload.toString(), restPath, appId); + response = client.put(payload); + + logger.debug(EELFLoggerDelegate.debugLogger, "Finished to PUT for payload: {} and restPath: {} and appId: {}", payload.toString(), restPath, appId); + } else { logger.error(EELFLoggerDelegate.errorLogger, "Unable to create the Webclient to make the '" + restPath + "' API call.");