aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@att.com>2018-02-20 18:03:30 +0200
committerOfir Sonsino <os0695@intl.att.com>2018-02-27 14:47:52 +0200
commitefedea1c5d80532f5b1180d57c8dafce5dcb302a (patch)
treec4bdefe8758b01f31c9e91a9ded0ab989daeb5e2 /vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java
parentb94bd70f1595fad9546c3506393613f68504f495 (diff)
org.onap migration
Change-Id: I5e2d01a6da21d4003c910b5fe0702b35c2089a77 Issue-ID: VID-86 Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java40
1 files changed, 0 insertions, 40 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java b/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java
deleted file mode 100644
index 1df4f42bc..000000000
--- a/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.onap.vid.controller;
-
-import org.apache.commons.lang3.exception.ExceptionUtils;
-import org.openecomp.portalsdk.core.domain.User;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.onap.vid.model.ExceptionResponse;
-import org.slf4j.MDC;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
-import static org.onap.vid.utils.Logging.getMethodName;
-
-public class ControllersUtils {
-
-
- public static String extractUserId(HttpServletRequest request) {
- String userId = "";
- HttpSession session = request.getSession();
- if (session != null) {
- User user = (User) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));
- if (user != null) {
- //userId = user.getHrid();
- userId = user.getLoginId();
- if (userId == null)
- userId = user.getOrgUserId();
- }
- }
- return userId;
- }
-
- public static ExceptionResponse handleException(Exception e, EELFLoggerDelegate logger) {
- logger.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodName(), ExceptionUtils.getMessage(e), e);
-
- ExceptionResponse exceptionResponse = new ExceptionResponse(e);
- return exceptionResponse;
- }
-}