- public static final String SEARCH_AUTH_POLICY_NAME = "search";
- public static final String URL_PREFIX = "services/search-data-service/v1/search";
-
- public enum Action {
- POST, GET, PUT, DELETE
- };
-
- /**
- * This method uses the contents of the supplied HTTP headers and request
- * structures to populate the MDC Context used for logging purposes.
- *
- * @param httpReq - HTTP request structure.
- * @param headers - HTTP headers
- */
-// protected static void initMdcContext(HttpServletRequest httpReq, HttpHeaders headers) {
-//
-// // Auto generate a transaction if we were not provided one.
-// String transId = null;
-// if (headers != null) {
-// // transId = headers.getRequestHeaders().getFirst("X-TransactionId");
-// transId = headers.getFirst("X-TransactionId");
-//
-// if ((transId == null) || (transId.equals(""))) {
-// transId = UUID.randomUUID().toString();
-// }
-// }
-//
-// String fromIp = (httpReq != null) ? httpReq.getRemoteAddr() : "";
-// String fromApp = (headers != null) ? headers.getFirst("X-FromAppId") : "";
-//
-// MdcContext.initialize(transId, SearchDbConstants.SDB_SERVICE_NAME, "", fromApp, fromIp);
-// }
-
- protected static void initMdcContext ( HttpServletRequest httpReq, HttpHeaders headers) {
-
- // Auto generate a transaction if we were not provided one.
- String transId = null;
- if (headers != null) {
- // transId = headers.getRequestHeaders().getFirst("X-TransactionId");
- transId = headers.getFirst("X-TransactionId");
-
- if ((transId == null) || (transId.equals(""))) {
- transId = UUID.randomUUID().toString();
- }
- }
+ public static final String SEARCH_AUTH_POLICY_NAME = "search";
+ public static final String URL_PREFIX = "services/search-data-service/v1/search";
+
+ public enum Action {
+ POST,
+ GET,
+ PUT,
+ DELETE
+ };
+
+ /**
+ * This method uses the contents of the supplied HTTP headers and request structures to populate the MDC Context
+ * used for logging purposes.
+ *
+ * @param httpReq - HTTP request structure.
+ * @param headers - HTTP headers
+ */
+ protected static void initMdcContext(HttpServletRequest httpReq, HttpHeaders headers) {
+
+ // Auto generate a transaction if we were not provided one.
+ String transId = null;
+ if (headers != null) {
+ transId = headers.getFirst("X-TransactionId");
+
+ if ((transId == null) || (transId.equals(""))) {
+ transId = UUID.randomUUID().toString();
+ }
+ }