summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/main/java/org
diff options
context:
space:
mode:
authorPlummer, Brittany <brittany.plummer@att.com>2019-09-10 11:29:42 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-09-10 11:29:42 -0400
commit2ede5f09c9601d543f20d466a21e9e85c29eacc7 (patch)
treeb9b0e7f777b87a390ce4fb9ba870c49aab382bcc /mso-catalog-db/src/main/java/org
parent464d3ffa9c373f36747b10a03554d20dfa4a571b (diff)
Integrate Logging Library
Updated SO to use ONAP provided filters and constants to meet logging standards. Removed redundant classes Updated constant references Issue-ID: SO-2301 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: Ia4e3c2b1a4dcb3881aa34d39885c8b2782880d64
Diffstat (limited to 'mso-catalog-db/src/main/java/org')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
index 23539b074d..fcafe90405 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
@@ -30,6 +30,7 @@ import javax.persistence.EntityNotFoundException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
import org.apache.http.HttpStatus;
+import org.onap.logging.filter.base.Constants;
import org.onap.so.db.catalog.beans.BuildingBlockDetail;
import org.onap.so.db.catalog.beans.CloudSite;
import org.onap.so.db.catalog.beans.CloudifyManager;
@@ -64,7 +65,7 @@ import org.onap.so.db.catalog.beans.macro.NorthBoundRequest;
import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import org.onap.so.db.catalog.beans.macro.RainyDayHandlerStatus;
import org.onap.so.logger.LogConstants;
-import org.onap.so.logging.jaxrs.filter.SpringClientFilter;
+import org.onap.so.logging.jaxrs.filter.SOSpringClientFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -366,12 +367,12 @@ public class CatalogDbClient {
ClientFactory clientFactory =
Configuration.builder().setClientHttpRequestFactory(factory).setRestTemplateConfigurer(restTemplate -> {
- restTemplate.getInterceptors().add((new SpringClientFilter()));
+ restTemplate.getInterceptors().add((new SOSpringClientFilter()));
restTemplate.getInterceptors().add((request, body, execution) -> {
request.getHeaders().add(HttpHeaders.AUTHORIZATION, msoAdaptersAuth);
- request.getHeaders().add(LogConstants.TARGET_ENTITY_HEADER, TARGET_ENTITY);
+ request.getHeaders().add(Constants.HttpHeaders.TARGET_ENTITY_HEADER, TARGET_ENTITY);
return execution.execute(request, body);
});
}).build().buildClientFactory();
@@ -415,12 +416,12 @@ public class CatalogDbClient {
ClientFactory clientFactory = Configuration.builder().setBaseUri(baseUri).setClientHttpRequestFactory(factory)
.setRestTemplateConfigurer(restTemplate -> {
- restTemplate.getInterceptors().add((new SpringClientFilter()));
+ restTemplate.getInterceptors().add((new SOSpringClientFilter()));
restTemplate.getInterceptors().add((request, body, execution) -> {
request.getHeaders().add(HttpHeaders.AUTHORIZATION, auth);
- request.getHeaders().add(LogConstants.TARGET_ENTITY_HEADER, TARGET_ENTITY);
+ request.getHeaders().add(Constants.HttpHeaders.TARGET_ENTITY_HEADER, TARGET_ENTITY);
return execution.execute(request, body);
});
}).build().buildClientFactory();
@@ -1007,7 +1008,7 @@ public class CatalogDbClient {
headers.set(HttpHeaders.AUTHORIZATION, msoAdaptersAuth);
headers.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
headers.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
- headers.set(LogConstants.TARGET_ENTITY_HEADER, TARGET_ENTITY);
+ headers.set(Constants.HttpHeaders.TARGET_ENTITY_HEADER, TARGET_ENTITY);
return headers;
}