diff options
Diffstat (limited to 'ecomp-portal-BE-os')
8 files changed, 66 insertions, 28 deletions
diff --git a/ecomp-portal-BE-os/pom.xml b/ecomp-portal-BE-os/pom.xml index 4ad50dfd..398520cb 100644 --- a/ecomp-portal-BE-os/pom.xml +++ b/ecomp-portal-BE-os/pom.xml @@ -314,11 +314,6 @@ <artifactId>tiles-jsp</artifactId> <version>3.0.5</version> </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-client</artifactId> - <version>3.0.0-milestone1</version> - </dependency> <!-- Mapper --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> @@ -629,11 +624,6 @@ <version>1.8.5</version> <scope>test</scope> </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.9.3</version> - </dependency> <!-- OpenID Connect Dependencies --> <dependency> <groupId>org.mitre</groupId> diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java index 8314e7b9..66237523 100644 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java @@ -39,12 +39,7 @@ package org.onap.portalapp.portal.controller; import java.util.HashMap; import java.util.Map; -import java.util.Set; import javax.servlet.http.HttpServletRequest; -import javax.validation.ConstraintViolation; -import javax.validation.Validation; -import javax.validation.Validator; -import javax.validation.ValidatorFactory; import org.json.JSONObject; import org.onap.portalapp.portal.domain.EPUser; import org.onap.portalapp.portal.ecomp.model.PortalRestResponse; diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/interceptor/SessionTimeoutInterceptor.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/interceptor/SessionTimeoutInterceptor.java index 689b25f2..8a3bee62 100644 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/interceptor/SessionTimeoutInterceptor.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/interceptor/SessionTimeoutInterceptor.java @@ -42,7 +42,6 @@ import javax.servlet.http.HttpServletResponse; import org.onap.portalapp.authentication.LoginStrategy; import org.onap.portalapp.portal.domain.EPUser; -import org.onap.portalapp.portal.utils.EcompPortalUtils; import org.onap.portalapp.util.EPUserUtils; import org.onap.portalapp.util.SessionCookieUtil; import org.onap.portalsdk.core.controller.FusionBaseController; diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/logging/aop/EPEELFLoggerAspect.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/logging/aop/EPEELFLoggerAspect.java index 9cd18453..05ad61af 100644 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/logging/aop/EPEELFLoggerAspect.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/logging/aop/EPEELFLoggerAspect.java @@ -45,7 +45,6 @@ import org.onap.portalapp.portal.logging.aop.EPAuditLog; import org.onap.portalapp.portal.logging.aop.EPEELFLoggerAdvice; import org.onap.portalapp.portal.logging.aop.EPMetricsLog; import org.onap.portalapp.portal.transport.FieldsValidator; -import org.onap.portalapp.portal.utils.EcompPortalUtils; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum; import org.springframework.beans.factory.annotation.Autowired; diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchServiceImpl.java index 0e9932e0..479564f5 100644 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchServiceImpl.java @@ -113,7 +113,7 @@ public class SearchServiceImpl implements SearchService { resultOfSearch.addAll(resultOfAdditionalSearch); } resultOfSearch.addAll(resultOfSearchUserId); - resultOfSearch.stream().distinct().collect(Collectors.toList()); + resultOfSearch = resultOfSearch.stream().distinct().collect(Collectors.toList()); resultOfSearch = this.cutSearchResultToMaximumSize(resultOfSearch); ObjectMapper mapper = new ObjectMapper(); String result = "[]"; diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java index c00533b6..1a347e07 100644 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java @@ -40,15 +40,10 @@ package org.onap.portalapp.util; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; import org.onap.portalapp.portal.utils.EPCommonSystemProperties; -import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; import org.onap.portalsdk.core.onboarding.util.CipherUtil; -import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; import org.onap.portalsdk.core.util.SystemProperties; -import org.onap.portalsdk.core.web.support.AppUtils; public class SessionCookieUtil extends CommonSessionCookieUtil{ diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties index 041458d3..a3aa565f 100644 --- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties @@ -40,7 +40,7 @@ db.driver = org.mariadb.jdbc.Driver #db.connectionURL = jdbc:mariadb:failover://localhost:3306/ecomp_portal #db.userName = XXXX #db.password = XXXX -db.connectionURL = jdbc:mariadb:failover://localhost:3306/portal_2_6_os +db.connectionURL = jdbc:mariadb:failover://localhost:3306/portal_3_2_os db.userName = root db.password = root # is the db.password property encrypted? @@ -145,13 +145,13 @@ window_width_threshold_right_menu = 1350 external_system_notification_url= https://jira.onap.org/browse/ # External Access System Basic Auth Credentials & Rest endpoint(These credentials doesn't work as these are place holders for now) -ext_central_access_user_name = m00468@portal.onap.org -ext_central_access_password = dR2NABMkxPaFbIbym87ZwQ== -ext_central_access_url = https://aaftest.test.onap.org:8095/proxy/authz/ +ext_central_access_user_name = aaf_admin@people.osaaf.org +ext_central_access_password = CkmGguWw+Yn0yzqximmSExkOSJ7BdKvOTHFmTMg9Yvc= +ext_central_access_url = https://aaf-service:31110/authz/ ext_central_access_user_domain = @csp.onap.org # External Central Auth system access -remote_centralized_system_access = false +remote_centralized_system_access = true #left menu with root value or non-root portal_left_menu = non-root
\ No newline at end of file diff --git a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/scheduler/SessionMgtRegistryTest.java b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/scheduler/SessionMgtRegistryTest.java new file mode 100644 index 00000000..dcd5881b --- /dev/null +++ b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/scheduler/SessionMgtRegistryTest.java @@ -0,0 +1,60 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : Portal + * ================================================================================ + * Copyright (C) 2020 IBM Intellectual Property. All rights reserved. + *================================================================================= + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.portalapp.scheduler; + +import static org.junit.Assert.assertNotNull; +import java.text.ParseException; +import java.util.HashMap; +import java.util.Map; +import org.junit.Before; +import org.junit.Test; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.onap.portalapp.service.sessionmgt.TimeoutHandler; +import org.springframework.scheduling.quartz.JobDetailFactoryBean; + +public class SessionMgtRegistryTest { + + @Mock + JobDetailFactoryBean job; + @Mock + TimeoutHandler lj; + @InjectMocks + SessionMgtRegistry lr; + + String groupName = "AppGroup"; + String jobName = "LogJob"; + @Before + public void initialize(){ + MockitoAnnotations.initMocks(this); + } + @Test + public void jobDetailFactoryBeantest() throws ParseException{ + + Map<String, Object> map = new HashMap<String, Object>(); + map.put("units", "bytes"); + job.setJobClass(TimeoutHandler.class); + job.setJobDataAsMap(map); + job.setGroup(groupName); + job.setName(jobName); + assertNotNull(lr.jobDetailFactoryBean()); + } +} |