X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=dashboard%2Fwebapp-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fric%2Fportal%2Fdashboard%2Fportalapi%2FPortalRestCentralServiceImpl.java;h=a2fae9f06119de347ed903c598009970c47828a4;hb=592ce20ec359928373de2e7f06214c8f8ad73c20;hp=581ca25d0a40a0d6737b4f832703fbdf17eab6ca;hpb=3b1e23945b9426ad7aaacfc3794e15286d82c816;p=nonrtric.git diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalRestCentralServiceImpl.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalRestCentralServiceImpl.java index 581ca25d..a2fae9f0 100644 --- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalRestCentralServiceImpl.java +++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalRestCentralServiceImpl.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,52 +38,52 @@ import org.springframework.context.ApplicationContext; * Implements the contract used by the Portal to transmit user details to this * on-boarded application. The requests are intercepted first by a servlet in * the EPSDK-FW library, which proxies the calls to these methods. - * + * * An instance of this class is created upon first request to the API. But this * class is found and instantiated via Class.forName(), so cannot use Spring * annotations. */ public class PortalRestCentralServiceImpl implements IPortalRestCentralService { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private final PortalAuthManager authManager; - private final DashboardUserManager userManager; + private final PortalAuthManager authManager; + private final DashboardUserManager userManager; - public PortalRestCentralServiceImpl() throws IOException, PortalAPIException { - final ApplicationContext context = SpringContextCache.getApplicationContext(); - authManager = (PortalAuthManager) context.getBean(PortalAuthManager.class); - userManager = (DashboardUserManager) context.getBean(DashboardUserManager.class); - } + public PortalRestCentralServiceImpl() throws IOException, PortalAPIException { + final ApplicationContext context = SpringContextCache.getApplicationContext(); + authManager = context.getBean(PortalAuthManager.class); + userManager = context.getBean(DashboardUserManager.class); + } - /* - * Answers the Portal API credentials. - */ - @Override - public Map getAppCredentials() throws PortalAPIException { - logger.debug("getAppCredentials"); - return authManager.getAppCredentials(); - } + /* + * Answers the Portal API credentials. + */ + @Override + public Map getAppCredentials() throws PortalAPIException { + logger.debug("getAppCredentials"); + return authManager.getAppCredentials(); + } - /* - * Extracts the user ID from a cookie in the header - */ - @Override - public String getUserId(HttpServletRequest request) throws PortalAPIException { - logger.debug("getuserId"); - return authManager.validateEcompSso(request); - } + /* + * Extracts the user ID from a cookie in the header + */ + @Override + public String getUserId(HttpServletRequest request) throws PortalAPIException { + logger.debug("getuserId"); + return authManager.validateEcompSso(request); + } - @Override - public void pushUser(EcompUser user) throws PortalAPIException { - logger.debug("pushUser: {}", user); - userManager.createUser(user); - } + @Override + public void pushUser(EcompUser user) throws PortalAPIException { + logger.debug("pushUser: {}", user); + userManager.createUser(user); + } - @Override - public void editUser(String loginId, EcompUser user) throws PortalAPIException { - logger.debug("editUser: {}", user); - userManager.updateUser(loginId, user); - } + @Override + public void editUser(String loginId, EcompUser user) throws PortalAPIException { + logger.debug("editUser: {}", user); + userManager.updateUser(loginId, user); + } }