Logging for status EVALUATION to NDG

This commit is contained in:
rajesh
2025-06-06 14:28:21 +05:30
parent 64632c9bb2
commit bfc850b3b3
2 changed files with 1336 additions and 1311 deletions

View File

@@ -1053,15 +1053,16 @@ public class Utils {
return headers; return headers;
} }
public static void setHttpServletRequestForThread(String redirectURI, String methodType,HttpServletRequest request,String remoteUser) { public static void setHttpServletRequestForThread(HttpServletRequest request,String methodType, String remoteUser, Long userActionId) {
MockHttpServletRequest mockRequest = new MockHttpServletRequest(); MockHttpServletRequest mockRequest = new MockHttpServletRequest();
mockRequest.setRequestURI(redirectURI); mockRequest.setRequestURI(request.getRequestURI());
mockRequest.setMethod(methodType); mockRequest.setMethod(methodType);
mockRequest.setRemoteUser(remoteUser); mockRequest.setRemoteUser(remoteUser); // or pass it in if needed
Long userActionId = (Long) request.getAttribute(GepafinConstant.USER_ACTION_ID); mockRequest.setAttribute(GepafinConstant.USER_ACTION_ID, userActionId);
mockRequest.setAttribute(GepafinConstant.USER_ACTION_ID,userActionId );
ServletRequestAttributes attributes = new ServletRequestAttributes(mockRequest); ServletRequestAttributes attributes = new ServletRequestAttributes(mockRequest);
RequestContextHolder.setRequestAttributes(attributes, true); RequestContextHolder.setRequestAttributes(attributes, true);
} }
} }