summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPlummer, Brittany <brittany.plummer@att.com>2019-05-05 11:21:20 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-05-05 11:23:40 -0400
commit459276d781151b126e4e36035ef1a04922fc3fd1 (patch)
treea689937995d2accd426225b4cd4f8fdb638310b4 /common
parent75ba5d258a64da22adb6b070199d4920118614ee (diff)
Resume APIH Functionality
Updated license for 2019 and added null check test Moved record creation to RequestHandlerUtils Updated uri retrieval to obtain full uri Updated verify based on actual objects Renamed tests for better description Removed use of Spring in unit tests Moved constant to other logger files Added new class to JerseyConfiguration Separated resume request work to separate file Updated value that progress is saved as in db Added new original_partner_name key for partnername retrieval Added column for progress to be saved to db Added additional columns to be saved to requestDb Added inProgress request check to resume Change-Id: I9ef1e61829be49da348b29bc255beb073b48639d Issue-ID: SO-1831 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/org/onap/so/logger/MdcConstants.java1
-rw-r--r--common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java8
2 files changed, 5 insertions, 4 deletions
diff --git a/common/src/main/java/org/onap/so/logger/MdcConstants.java b/common/src/main/java/org/onap/so/logger/MdcConstants.java
index 9f8417e047..e3212733c8 100644
--- a/common/src/main/java/org/onap/so/logger/MdcConstants.java
+++ b/common/src/main/java/org/onap/so/logger/MdcConstants.java
@@ -10,4 +10,5 @@ public class MdcConstants {
public static final String SERVICE_NAME = "ServiceName";
public static final String STATUSCODE = "StatusCode";
public static final String ENDTIME = "EndTimestamp";
+ public static final String ORIGINAL_PARTNER_NAME = "OriginalPartnerName";
}
diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
index 4741f7f099..7e2b603ba6 100644
--- a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
+++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
@@ -20,7 +20,6 @@
package org.onap.so.logging.jaxrs.filter;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.annotation.Annotation;
@@ -40,7 +39,9 @@ import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
import javax.ws.rs.ext.Providers;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
+import org.onap.so.logger.HttpHeadersConstants;
import org.onap.so.logger.LogConstants;
+import org.onap.so.logger.MdcConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
@@ -76,8 +77,10 @@ public class JaxRsFilterLogging implements ContainerRequestFilter, ContainerResp
mdcSetup.setClientIPAddress(httpServletRequest);
mdcSetup.setInstanceUUID();
mdcSetup.setEntryTimeStamp();
+ MDC.put(HttpHeadersConstants.REQUESTOR_ID, headers.getFirst("X-RequestorID"));
MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, ONAPLogConstants.ResponseStatus.INPROGRESS.toString());
MDC.put(LogConstants.URI_BASE, containerRequest.getUriInfo().getBaseUri().toString());
+ MDC.put(MdcConstants.ORIGINAL_PARTNER_NAME, MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME));
logger.info(ONAPLogConstants.Markers.ENTRY, "Entering");
} catch (Exception e) {
logger.warn("Error in incoming JAX-RS Inteceptor", e);
@@ -127,7 +130,6 @@ public class JaxRsFilterLogging implements ContainerRequestFilter, ContainerResp
return message;
}
-
private void setRequestId(MultivaluedMap<String, String> headers) {
String requestId = headers.getFirst(ONAPLogConstants.Headers.REQUEST_ID);
if (requestId == null || requestId.isEmpty())
@@ -168,6 +170,4 @@ public class JaxRsFilterLogging implements ContainerRequestFilter, ContainerResp
MDC.remove(ONAPLogConstants.MDCs.TARGET_SERVICE_NAME);
}
-
-
}