diff options
Diffstat (limited to 'vid-app-common/src/main/java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java | 4 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/client/SyncRestClient.java | 2 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/logging/JaxRsMetricLogClientFilter.java (renamed from vid-app-common/src/main/java/org/onap/vid/logging/VidMetricLogClientFilter.java) | 2 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java | 4 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java | 10 |
5 files changed, 6 insertions, 16 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java index aadfd58cc..daa124770 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java @@ -41,7 +41,7 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.aai.ExceptionWithRequestInfo; import org.onap.vid.aai.ResponseWithRequestInfo; import org.onap.vid.aai.exceptions.InvalidPropertyException; -import org.onap.vid.logging.VidMetricLogClientFilter; +import org.onap.vid.logging.JaxRsMetricLogClientFilter; import org.onap.vid.utils.Logging; import org.onap.vid.utils.Unchecked; import org.springframework.beans.factory.annotation.Autowired; @@ -125,7 +125,7 @@ public class AAIRestInterface { if (client == null) { try { client = httpsAuthClientFactory.getClient(HttpClientMode.WITH_KEYSTORE); - VidMetricLogClientFilter metricLogClientFilter = new VidMetricLogClientFilter(); + JaxRsMetricLogClientFilter metricLogClientFilter = new JaxRsMetricLogClientFilter(); client.register(metricLogClientFilter); } catch (Exception e) { logger.info(EELFLoggerDelegate.errorLogger, "Exception in REST call to DB in initRestClient" + e.toString()); diff --git a/vid-app-common/src/main/java/org/onap/vid/client/SyncRestClient.java b/vid-app-common/src/main/java/org/onap/vid/client/SyncRestClient.java index 0883b3084..24a78af47 100644 --- a/vid-app-common/src/main/java/org/onap/vid/client/SyncRestClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/client/SyncRestClient.java @@ -79,7 +79,7 @@ public class SyncRestClient implements SyncRestClientInterface { } public SyncRestClient(ObjectMapper objectMapper, Logging loggingService) { - this(null, objectMapper, loggingService, false); + this(null, objectMapper, loggingService, true); } public SyncRestClient(CloseableHttpClient httpClient, Logging loggingService) { diff --git a/vid-app-common/src/main/java/org/onap/vid/logging/VidMetricLogClientFilter.java b/vid-app-common/src/main/java/org/onap/vid/logging/JaxRsMetricLogClientFilter.java index 6b9222ef3..fbea381fd 100644 --- a/vid-app-common/src/main/java/org/onap/vid/logging/VidMetricLogClientFilter.java +++ b/vid-app-common/src/main/java/org/onap/vid/logging/JaxRsMetricLogClientFilter.java @@ -27,7 +27,7 @@ import javax.ws.rs.core.MultivaluedMap; import org.onap.logging.filter.base.MetricLogClientFilter; import org.onap.logging.ref.slf4j.ONAPLogConstants; -public class VidMetricLogClientFilter extends MetricLogClientFilter { +public class JaxRsMetricLogClientFilter extends MetricLogClientFilter { @Override protected void additionalPre(ClientRequestContext clientRequestContext, MultivaluedMap<String, Object> stringObjectMultivaluedMap) { diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java b/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java index a2d71d900..2f5458d54 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java @@ -40,7 +40,7 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.aai.util.HttpClientMode; import org.onap.vid.aai.util.HttpsAuthClient; import org.onap.vid.client.HttpBasicClient; -import org.onap.vid.logging.VidMetricLogClientFilter; +import org.onap.vid.logging.JaxRsMetricLogClientFilter; import org.onap.vid.utils.Logging; import org.onap.vid.utils.SystemPropertiesWrapper; import org.springframework.beans.factory.annotation.Autowired; @@ -131,7 +131,7 @@ public class RestMsoImplementation { } private void registerClientToMetricLogClientFilter(Client client) { - VidMetricLogClientFilter metricLogClientFilter = new VidMetricLogClientFilter(); + JaxRsMetricLogClientFilter metricLogClientFilter = new JaxRsMetricLogClientFilter(); client.register(metricLogClientFilter); } diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java index 5e19dad46..7b1dd6a05 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java @@ -20,9 +20,6 @@ */ package org.onap.vid.mso.rest; -import static org.onap.vid.logging.Headers.PARTNER_NAME; -import static org.onap.vid.utils.Logging.ONAP_REQUEST_ID_HEADER_KEY; - import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import io.joshworks.restclient.http.HttpResponse; @@ -43,7 +40,6 @@ import org.onap.vid.changeManagement.MsoRequestDetails; import org.onap.vid.changeManagement.RequestDetailsWrapper; import org.onap.vid.changeManagement.WorkflowRequestDetail; import org.onap.vid.client.SyncRestClient; -import org.onap.vid.logging.Headers; import org.onap.vid.model.RequestReferencesContainer; import org.onap.vid.model.SOWorkflowList; import org.onap.vid.mso.MsoInterface; @@ -52,7 +48,6 @@ import org.onap.vid.mso.MsoResponseWrapper; import org.onap.vid.mso.MsoResponseWrapperInterface; import org.onap.vid.mso.MsoUtil; import org.onap.vid.mso.RestObject; -import org.onap.vid.utils.Logging; import org.onap.vid.utils.SystemPropertiesWrapper; import org.springframework.http.HttpMethod; @@ -535,10 +530,6 @@ public class MsoRestClientNew implements MsoInterface { private Map<String, String> getHeaders() { Map<String, String> map = new HashMap<>(); map.putAll(commonHeaders); - String requestIdValue = Logging.extractOrGenerateRequestId(); - map.put(SystemProperties.ECOMP_REQUEST_ID, requestIdValue); - map.put(ONAP_REQUEST_ID_HEADER_KEY, requestIdValue); - map.put(Headers.INVOCATION_ID.getHeaderName(), Headers.INVOCATION_ID.getHeaderValue()); return map; } @@ -557,7 +548,6 @@ public class MsoRestClientNew implements MsoInterface { map.put(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); map.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); map.put(X_FROM_APP_ID, systemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME)); - map.put(PARTNER_NAME.getHeaderName(), PARTNER_NAME.getHeaderValue()); return ImmutableMap.copyOf(map); } |