summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/config/ConfigLoader.java186
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportSchedule.java6
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java52
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java63
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorController.java13
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java85
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FavoritesController.java4
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java18
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java4
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/FavoritesControllerTest.java16
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java12
-rw-r--r--ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts9
-rw-r--r--ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts23
-rw-r--r--ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.prod.ts1
-rw-r--r--ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.ts1
-rw-r--r--ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java8
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts9
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts28
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts5
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts7
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html10
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss37
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts13
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts7
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java4
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RestApiRequestBuilder.java8
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java4
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileService.java2
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java8
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallServiceImpl.java4
-rw-r--r--ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/RestApiRequestBuilderTest.java34
-rw-r--r--ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/WebServiceCallServiceImplTest.java12
33 files changed, 317 insertions, 378 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/config/ConfigLoader.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/config/ConfigLoader.java
index de62b738..b1640d92 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/config/ConfigLoader.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/config/ConfigLoader.java
@@ -65,99 +65,99 @@ public class ConfigLoader {
public static final String RAPTOR_PDF_PROPERTIES = "raptor_pdf";
private static String raptorActionMapString =
- "report.run |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_run.jsp \n"
- + "mobile.report.run |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |mobile_report_run.jsp \n"
- + "report.dashrep1.run |org.onap.portalsdk.analytics.controller.ActionHandler|reportDashRep1 |report_run_dashrep1.jsp \n"
- + "report.dashrep2.run |org.onap.portalsdk.analytics.controller.ActionHandler|reportDashRep2 |report_run_dashrep2.jsp \n"
- + "report.dashrep3.run |org.onap.portalsdk.analytics.controller.ActionHandler|reportDashRep3 |report_run_dashrep3.jsp \n"
- + "report.dashrep4.run |org.onap.portalsdk.analytics.controller.ActionHandler|reportDashRep4 |report_run_dashrep4.jsp \n"
- + "report.download |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_xls.jsp \n"
- + "report.download.excel2007 |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_xlsx.jsp \n"
- + "report.download.page |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_page_xls.jsp \n"
- + "report.csv.download |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_csv.jsp \n"
- + "report.text.download |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_txt.jsp \n"
- + "report.search |org.onap.portalsdk.analytics.controller.ActionHandler|reportSearch |report_search.jsp \n"
- + "report.search.execute |org.onap.portalsdk.analytics.controller.ActionHandler|reportSearchExecute |report_search \n"
- + "report.search.user |org.onap.portalsdk.analytics.controller.ActionHandler|reportSearchUser |report_search.jsp \n"
- + "report.search.public |org.onap.portalsdk.analytics.controller.ActionHandler|reportSearchPublic |report_search.jsp \n"
- + "report.search.favorite |org.onap.portalsdk.analytics.controller.ActionHandler|reportSearchFavorites |report_search.jsp \n"
- + "report.wizard |org.onap.portalsdk.analytics.controller.ActionHandler|reportWizard |report_wizard \n"
- + "report.create |org.onap.portalsdk.analytics.controller.ActionHandler|reportCreate |report_wizard \n"
- + "report.import |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_import \n"
- + "report.import.save |org.onap.portalsdk.analytics.controller.ActionHandler|reportImportSave |report_wizard \n"
- + "report.copy |org.onap.portalsdk.analytics.controller.ActionHandler|reportCopy |report_wizard \n"
- + "report.copy.container |org.onap.portalsdk.analytics.controller.ActionHandler|reportCopy |raptor_wizard_container.jsp \n"
- + "report.edit |org.onap.portalsdk.analytics.controller.ActionHandler|reportEdit |report_wizard \n"
- + "report.delete |org.onap.portalsdk.analytics.controller.ActionHandler|reportDelete |report_search \n"
- + "report.popup.field |org.onap.portalsdk.analytics.controller.ActionHandler|reportFormFieldPopup |popup_field.jsp \n"
- + "report.popup.map |org.onap.portalsdk.analytics.controller.ActionHandler|reportValuesMapDefPopup |popup_map.jsp \n"
- + "report.popup.drilldown.table |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_drill_down_table.jsp \n"
- + "report.popup.drilldown.report|org.onap.portalsdk.analytics.controller.ActionHandler|reportDrillDownToReportDefPopup|popup_drill_down_report \n"
- + "report.popup.import.semaphore|org.onap.portalsdk.analytics.controller.ActionHandler|importSemaphorePopup |popup_import_semaphore \n"
- + "report.popup.semaphore |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_semaphore \n"
- + "report.popup.semaphore.save |org.onap.portalsdk.analytics.controller.ActionHandler|saveSemaphorePopup |popup_semaphore \n"
- + "report.popup.filter.col |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_filter_col.jsp \n"
- + "report.popup.filter.data |org.onap.portalsdk.analytics.controller.ActionHandler|reportFilterDataPopup |popup_filter_data.jsp \n"
- + "report.popup.sql |org.onap.portalsdk.analytics.controller.ActionHandler|reportShowSQLPopup |popup_sql \n "
- + "report.run.popup |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_run_popup.jsp \n"
- + "report.popup.test.cond |org.onap.portalsdk.analytics.controller.ActionHandler|testSchedCondPopup |popup_sql \n"
- + "report.popup.testrun.sql |org.onap.portalsdk.analytics.controller.ActionHandler|testRunSQLPopup |popup_testrun_sql \n"
- + "report.test.jsp |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |test_run_sql \n"
- + "report.field.testrun.jsp |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |test_field_run_sql \n"
- + "report.field.default.testrun.jsp |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |default_field_run_sql \n"
- + "report.field.date.start.testrun.jsp |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |date_start_field_run_sql \n"
- + "report.field.date.end.testrun.jsp |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |date_end_field_run_sql \n"
- + "report.popup.table.cols |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_table_cols \n"
- + "refresh.cache |org.onap.portalsdk.analytics.controller.ActionHandler|refreshCache |message.jsp \n"
- + "report.message |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |message.jsp \n"
- + "report.download.pdf |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_pdf.jsp \n"
- + "report.popup.pdfconfig |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_pdf_config.jsp \n"
- + "download.all |org.onap.portalsdk.analytics.controller.ActionHandler|downloadAll |close.jsp \n"
- + "download.all.jsp |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_download_flat_file.jsp \n"
- + "download.data.file |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |download_data_file.jsp \n"
- + "popup.calendar |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |gtm_calendar.jsp \n"
- + "report.folderlist |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |folder_report_list.jsp \n"
- + "report.folderlist_iframe |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |folder_report_list_iframe.jsp \n"
- + "report.childDropDown |org.onap.portalsdk.analytics.controller.ActionHandler|getChildDropDown |raptor_childdropdown.jsp \n"
- + "report.create.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_create_container.jsp \n"
- + "report.search.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_container.jsp \n"
- + "report.search.execute.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_execute_container.jsp \n"
- + "report.search.user.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_user_container.jsp \n"
- + "report.search.public.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_public_container.jsp \n"
- + "report.search.favorite.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_favorite_container.jsp \n"
- + "report.run.container |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_run_container.jsp \n"
- + "report.formfields.run.container |org.onap.portalsdk.analytics.controller.ActionHandler|formFieldRun |report_run_container.jsp \n"
- + "report.run.jsp |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_run.jsp \n"
- + "report.schedule.multiple |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |wizard_schedule_multiple.jsp \n"
- + "report.schedule.submit |org.onap.portalsdk.analytics.controller.ActionHandler|processSchedule |wizard_schedule_only.jsp \n"
- + "report.schedule.report.submit |org.onap.portalsdk.analytics.controller.ActionHandler|processScheduleReportList |wizard_schedule_only.jsp \n"
- + "report.schedule.report.submit_wmenu |org.onap.portalsdk.analytics.controller.ActionHandler|processScheduleReportList |wizard_schedule_only_from_search.jsp \n"
- + "report.schedule_only |org.onap.portalsdk.analytics.controller.ActionHandler|processSchedule |wizard_schedule_only \n"
- + "report.schedule_only_from_search |org.onap.portalsdk.analytics.controller.ActionHandler|processSchedule |wizard_schedule_only_from_search.jsp \n"
- + "report.schedule_delete |org.onap.portalsdk.analytics.controller.ActionHandler|processScheduleDelete |report_run_container.jsp \n"
- + "report.schedule.submit_from_search |org.onap.portalsdk.analytics.controller.ActionHandler|processSchedule |wizard_schedule_only_from_search.jsp \n"
- + "report.dashboard.detail |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |dashboard_report_run_detail.jsp \n"
- + "report.csv.download.direct |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_csv.jsp \n"
- + "report.csv.download.direct |org.onap.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_csv.jsp \n"
- + "report.download.csv.session |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_csv \n"
- + "report.download.excel2007.session |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_xlsx.jsp \n"
- + "report.download.excel.session |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_xls.jsp \n"
- + "report.download.pdf.session |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_pdf.jsp \n"
- + "report.download.page.session |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_page_xls.jsp \n"
- + "report.data.remove.session |org.onap.portalsdk.analytics.controller.ActionHandler|removeReportDataFromSession |report_run_container.jsp \n"
- + "report.dashboard.run.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_dashboard_run_container.jsp \n"
- + "chart.force.cluster |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |force_cluster.jsp \n"
- + "chart.run |org.onap.portalsdk.analytics.controller.ActionHandler|reportChartRun |report_run_container.jsp \n"
- + "chart.json |org.onap.portalsdk.analytics.controller.ActionHandler|reportChartRun |report_run_container.jsp \n"
- + "chart.data.json |org.onap.portalsdk.analytics.controller.ActionHandler|reportChartDataRun |report_run_container.jsp \n"
- + "quicklinks.json |org.onap.portalsdk.analytics.controller.ActionHandler|getQuickLinksJSON |report_run_container.jsp \n"
- + "embed.run |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_embed_run_container.zul \n"
- + "schedule.edit |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |wizard_adhoc_schedule.zul \n"
- + "chart.annotations.run |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |plugin_chart_annotation.jsp \n"
- + "chart.annotations.exec |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |chart_annotations.jsp \n"
- + "chart.mini |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |chart_minified.jsp \n"
- + "report.olap.run.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_olap_run_container.jsp \n"
- + "report.hive.run.container |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_hive_run_container.jsp \n"
+ "report.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_run.jsp\t\n"
+ + "mobile.report.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|mobile_report_run.jsp\t\n"
+ + "report.dashrep1.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportDashRep1\t|report_run_dashrep1.jsp\t\n"
+ + "report.dashrep2.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportDashRep2\t|report_run_dashrep2.jsp\t\n"
+ + "report.dashrep3.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportDashRep3\t|report_run_dashrep3.jsp\t\n"
+ + "report.dashrep4.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportDashRep4\t|report_run_dashrep4.jsp\t\n"
+ + "report.download\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_download_xls.jsp\t\n"
+ + "report.download.excel2007\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_download_xlsx.jsp\t\n"
+ + "report.download.page\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_download_page_xls.jsp\t\n"
+ + "report.csv.download\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_download_csv.jsp\t\n"
+ + "report.text.download\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_download_txt.jsp\t\n"
+ + "report.search\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportSearch\t|report_search.jsp\t\n"
+ + "report.search.execute\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportSearchExecute\t|report_search\t\n"
+ + "report.search.user\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportSearchUser\t|report_search.jsp\t\n"
+ + "report.search.public\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportSearchPublic\t|report_search.jsp\t\n"
+ + "report.search.favorite\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportSearchFavorites\t|report_search.jsp\t\n"
+ + "report.wizard\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportWizard\t|report_wizard\t\n"
+ + "report.create\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportCreate\t|report_wizard\t\n"
+ + "report.import\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_import\t\n"
+ + "report.import.save\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportImportSave\t|report_wizard\t\n"
+ + "report.copy\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportCopy\t|report_wizard\t\n"
+ + "report.copy.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportCopy\t|raptor_wizard_container.jsp\t\n"
+ + "report.edit\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportEdit\t|report_wizard\t\n"
+ + "report.delete\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportDelete\t|report_search\t\n"
+ + "report.popup.field\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportFormFieldPopup\t|popup_field.jsp\t\n"
+ + "report.popup.map\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportValuesMapDefPopup\t|popup_map.jsp\t\n"
+ + "report.popup.drilldown.table\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|popup_drill_down_table.jsp\t\n"
+ + "report.popup.drilldown.report|org.onap.portalsdk.analytics.controller.ActionHandler|reportDrillDownToReportDefPopup|popup_drill_down_report\t\n"
+ + "report.popup.import.semaphore|org.onap.portalsdk.analytics.controller.ActionHandler|importSemaphorePopup\t|popup_import_semaphore\t\n"
+ + "report.popup.semaphore\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|popup_semaphore\t\n"
+ + "report.popup.semaphore.save\t|org.onap.portalsdk.analytics.controller.ActionHandler|saveSemaphorePopup\t|popup_semaphore\t\n"
+ + "report.popup.filter.col\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|popup_filter_col.jsp \n"
+ + "report.popup.filter.data\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportFilterDataPopup\t|popup_filter_data.jsp\t\n"
+ + "report.popup.sql\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportShowSQLPopup\t|popup_sql\t\n "
+ + "report.run.popup\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_run_popup.jsp\t\n"
+ + "report.popup.test.cond\t|org.onap.portalsdk.analytics.controller.ActionHandler|testSchedCondPopup\t|popup_sql\t\n"
+ + "report.popup.testrun.sql\t|org.onap.portalsdk.analytics.controller.ActionHandler|testRunSQLPopup\t|popup_testrun_sql\t\n"
+ + "report.test.jsp\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|test_run_sql\t\n"
+ + "report.field.testrun.jsp\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|test_field_run_sql\t\n"
+ + "report.field.default.testrun.jsp\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|default_field_run_sql\t\n"
+ + "report.field.date.start.testrun.jsp\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|date_start_field_run_sql\t\n"
+ + "report.field.date.end.testrun.jsp |org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|date_end_field_run_sql\t\n"
+ + "report.popup.table.cols\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|popup_table_cols\t\n"
+ + "refresh.cache\t|org.onap.portalsdk.analytics.controller.ActionHandler|refreshCache\t|message.jsp\t\n"
+ + "report.message\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|message.jsp\t\n"
+ + "report.download.pdf\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_download_pdf.jsp\t\n"
+ + "report.popup.pdfconfig\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|popup_pdf_config.jsp\t\n"
+ + "download.all\t|org.onap.portalsdk.analytics.controller.ActionHandler|downloadAll\t|close.jsp\t\n"
+ + "download.all.jsp\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|popup_download_flat_file.jsp\t\n"
+ + "download.data.file\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|download_data_file.jsp\t\n"
+ + "popup.calendar\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|gtm_calendar.jsp\t\n"
+ + "report.folderlist\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|folder_report_list.jsp\t\n"
+ + "report.folderlist_iframe\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|folder_report_list_iframe.jsp\t\n"
+ + "report.childDropDown\t|org.onap.portalsdk.analytics.controller.ActionHandler|getChildDropDown\t|raptor_childdropdown.jsp\t\n"
+ + "report.create.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_create_container.jsp\t\n"
+ + "report.search.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_search_container.jsp\t\n"
+ + "report.search.execute.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_search_execute_container.jsp\t\n"
+ + "report.search.user.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_search_user_container.jsp\t\n"
+ + "report.search.public.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_search_public_container.jsp\t\n"
+ + "report.search.favorite.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_search_favorite_container.jsp\t\n"
+ + "report.run.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_run_container.jsp\t\n"
+ + "report.formfields.run.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|formFieldRun\t|report_run_container.jsp\t\n"
+ + "report.run.jsp\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_run.jsp\t\n"
+ + "report.schedule.multiple\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|wizard_schedule_multiple.jsp\t\n"
+ + "report.schedule.submit\t|org.onap.portalsdk.analytics.controller.ActionHandler|processSchedule\t|wizard_schedule_only.jsp\t\n"
+ + "report.schedule.report.submit\t|org.onap.portalsdk.analytics.controller.ActionHandler|processScheduleReportList\t|wizard_schedule_only.jsp\t\n"
+ + "report.schedule.report.submit_wmenu\t|org.onap.portalsdk.analytics.controller.ActionHandler|processScheduleReportList\t|wizard_schedule_only_from_search.jsp\t\n"
+ + "report.schedule_only\t|org.onap.portalsdk.analytics.controller.ActionHandler|processSchedule\t|wizard_schedule_only\t\n"
+ + "report.schedule_only_from_search\t|org.onap.portalsdk.analytics.controller.ActionHandler|processSchedule\t|wizard_schedule_only_from_search.jsp\t\n"
+ + "report.schedule_delete\t|org.onap.portalsdk.analytics.controller.ActionHandler|processScheduleDelete\t|report_run_container.jsp\t\n"
+ + "report.schedule.submit_from_search\t|org.onap.portalsdk.analytics.controller.ActionHandler|processSchedule\t|wizard_schedule_only_from_search.jsp\t\n"
+ + "report.dashboard.detail\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|dashboard_report_run_detail.jsp\t\n"
+ + "report.csv.download.direct\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_download_csv.jsp\t\n"
+ + "report.csv.download.direct\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportRun\t|report_download_csv.jsp\t\n"
+ + "report.download.csv.session\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_download_csv\t\n"
+ + "report.download.excel2007.session\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_download_xlsx.jsp\t\n"
+ + "report.download.excel.session\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_download_xls.jsp\t\n"
+ + "report.download.pdf.session\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_download_pdf.jsp\t\n"
+ + "report.download.page.session\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_download_page_xls.jsp\t\n"
+ + "report.data.remove.session\t|org.onap.portalsdk.analytics.controller.ActionHandler|removeReportDataFromSession\t|report_run_container.jsp\t\n"
+ + "report.dashboard.run.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_dashboard_run_container.jsp\t\n"
+ + "chart.force.cluster\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|force_cluster.jsp\t\n"
+ + "chart.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportChartRun\t|report_run_container.jsp\t\n"
+ + "chart.json\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportChartRun\t|report_run_container.jsp\t\n"
+ + "chart.data.json\t|org.onap.portalsdk.analytics.controller.ActionHandler|reportChartDataRun\t|report_run_container.jsp\t\n"
+ + "quicklinks.json\t|org.onap.portalsdk.analytics.controller.ActionHandler|getQuickLinksJSON\t|report_run_container.jsp\t\n"
+ + "embed.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_embed_run_container.zul\t\n"
+ + "schedule.edit\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|wizard_adhoc_schedule.zul\t\n"
+ + "chart.annotations.run\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|plugin_chart_annotation.jsp\t\n"
+ + "chart.annotations.exec\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|chart_annotations.jsp\t\n"
+ + "chart.mini\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|chart_minified.jsp\t\n"
+ + "report.olap.run.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_olap_run_container.jsp\t\n"
+ + "report.hive.run.container\t|org.onap.portalsdk.analytics.controller.ActionHandler|gotoJsp\t|report_hive_run_container.jsp\t\n"
;
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportSchedule.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportSchedule.java
index 4a5aa77e..5ceae666 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportSchedule.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportSchedule.java
@@ -1035,7 +1035,6 @@ public class ReportSchedule extends RaptorObject implements Serializable{
c_sql = c_sql.replace("[getScheduleID()]", getScheduleID());
sb.append(c_sql);
- //sb.append("DELETE FROM cr_report_schedule where rep_id = " + reportID +" and sched_user_id = " + getScheduleUserID() + " and schedule_id = " + getScheduleID());
DbUtils.executeUpdate(connection, sb.toString());
}
@@ -1134,8 +1133,6 @@ public class ReportSchedule extends RaptorObject implements Serializable{
try {
connection = DbUtils.getConnection();
-
- //String sql = "SELECT condition_large_sql FROM cr_report_schedule WHERE schedule_id=?";
String sql = Globals.getLoadCondSql();
stmt = connection.prepareStatement(sql);
stmt.setString(1,scheduleId);
@@ -1212,12 +1209,10 @@ public class ReportSchedule extends RaptorObject implements Serializable{
ResultSet rs = null;
try {
- //String sql = "update cr_report_schedule set condition_large_sql = EMPTY_CLOB() where schedule_id = " + scheduleId;
String sql = Globals.getPersistCondSqlUpdate();
sql = sql.replace("[scheduleId]", scheduleId);
DbUtils.executeUpdate(sql);
- //sql = "SELECT condition_large_sql FROM cr_report_schedule cr WHERE schedule_id=? FOR UPDATE";
sql = Globals.getPersistCondSqlLarge();
stmt = connection.prepareStatement(sql);
stmt.setString(1,scheduleId);
@@ -1237,7 +1232,6 @@ public class ReportSchedule extends RaptorObject implements Serializable{
} catch (RaptorException ex) {
if(ex.getMessage().indexOf("invalid identifier")!= -1) {
try {
- //String sql = "update cr_report_schedule set condition_sql = ? where schedule_id = " + scheduleId;
String sql = Globals.getPersistCondSqlSet();
sql = sql.replace("[scheduleId]", scheduleId);
stmt = connection.prepareStatement(sql);
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java
index f3aad70f..496b1598 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java
@@ -1108,7 +1108,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
for(dr.resetNext();dr.hasNext();)
{
DataValue dv = dr.getNext();
- //System.out.println(columnCount +" --> "+dv);
if(dv.isVisible()) {
HtmlFormatter cfmt = dv.getCellFormatter();
HtmlFormatter rfmt = dv.getRowFormatter();
@@ -1161,7 +1160,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
for(;dr.hasNext();)
{
DataValue dv = dr.getNext();
- //System.out.println(columnCount +" --> "+dv);
if(dv.isVisible()) {
HtmlFormatter cfmt = dv.getCellFormatter();
HtmlFormatter rfmt = dv.getRowFormatter();
@@ -1226,8 +1224,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
font.setColor(Color.decode(fmt.getFontColor()));
if(fmt.getFontSize().trim().length()>0)
font.setSize(Float.parseFloat(fmt.getFontSize())-Globals.getDataFontSizeOffset());
-// if(fmt.getFontFace().trim().length()>0)
-// cellFont.setFamily()
}
@@ -1363,7 +1359,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
String title = (String) session.getAttribute("TITLE_"+index);
String subtitle = (String) session.getAttribute("SUBTITLE_"+index);
if(nvl(title).length()>0) {
- //PdfPTable table = new PdfPTable(1);
table.setWidthPercentage(100f);
table.getDefaultCell().setHorizontalAlignment(Rectangle.ALIGN_CENTER);
table.getDefaultCell().setVerticalAlignment(Rectangle.ALIGN_BOTTOM);
@@ -1374,17 +1369,11 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
Font.BOLD,
Color.BLACK);
- //addEmptyRows(table,1);
table.getDefaultCell().setHorizontalAlignment(Rectangle.ALIGN_CENTER);
- //table.getDefaultCell().setBackgroundColor(Color.decode(Globals.getDataTableHeaderBackgroundFontColor()));
title = Utils.replaceInString(title, "<BR/>", " ");
title = Utils.replaceInString(title, "<br/>", " ");
title = Utils.replaceInString(title, "<br>", " ");
title = strip.stripHtml(nvl(title).trim());
- //subtitle = Utils.replaceInString(subtitle, "<BR/>", " ");
- //subtitle = Utils.replaceInString(subtitle, "<br/>", " ");
- //subtitle = Utils.replaceInString(subtitle, "<br>", " ");
- //subtitle = strip.stripHtml(nvl(subtitle).trim());
StyleSheet styles = new StyleSheet();
HTMLWorker htmlWorker = new HTMLWorker(document);
@@ -1401,17 +1390,11 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
}
p1.add(elem);
}
- //cell = new PdfPCell(p1);
StyleSheet style = new StyleSheet();
style.loadTagStyle("font", "font-size", "3");
style.loadTagStyle("font", "size", "3");
styles.loadStyle("pdfFont1", "size", "11px");
styles.loadStyle("pdfFont1", "font-size", "11px");
- /*ArrayList p = HTMLWorker.parseToList(new StringReader(nvl(title)), style);
- for (int k = 0; k < p.size(); ++k){
- document.add((com.lowagie.text.Element)p.get(k));
- }*/
- //p1.font().setSize(3.0f);
PdfPCell titleCell = new PdfPCell(new Phrase(title, font));
titleCell.setColspan(rr.getVisibleColumnCount());
PdfPCell subtitleCell = new PdfPCell(p1);
@@ -1420,7 +1403,6 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
subtitleCell.setHorizontalAlignment(1);
table.addCell(titleCell);
table.addCell(subtitleCell);
- //document.add(table);
}
return table;
}
@@ -1450,14 +1432,7 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
Font.BOLD,
Color.BLACK);
-
- //addEmptyRows(table,1);
table.getDefaultCell().setHorizontalAlignment(Rectangle.ALIGN_CENTER);
- //table.getDefaultCell().setBackgroundColor(Color.decode(Globals.getDataTableHeaderBackgroundFontColor()));
- /*title = Utils.replaceInString(title, "<BR/>", " ");
- title = Utils.replaceInString(title, "<br/>", " ");
- title = Utils.replaceInString(title, "<br>", " ");
- title = strip.stripHtml(nvl(title).trim());*/
StyleSheet style = new StyleSheet();
HTMLWorker htmlWorker = new HTMLWorker(document);
@@ -1475,15 +1450,12 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
p1.add(elem);
}
-/*
- HTMLWorker.parseToList(new StringReader(nvl(title)), style);*/
PdfPCell titleCell = new PdfPCell(p1);
titleCell.setHorizontalAlignment(Element.ALIGN_LEFT);
table.addCell(titleCell);
//table.
document.add(table);
}
- //return table;
}
@@ -1494,39 +1466,26 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
FONT_SIZE+1f,
Font.BOLD,
Color.decode(Globals.getDataTableHeaderFontColor()));
- //table.setHeaderRows(1);
table.getDefaultCell().setHorizontalAlignment(Rectangle.ALIGN_CENTER);
table.getDefaultCell().setBackgroundColor(Color.decode(Globals.getDataTableHeaderBackgroundFontColor()));
String title = "";
boolean firstPass = true;
- /*if(rd.reportTotalRowHeaderCols!=null) {
- if(firstPass) {
- table.addCell(new Paragraph("No.", font));
- firstPass = false;
- }
- }*/
for (rd.reportColumnHeaderRows.resetNext(); rd.reportColumnHeaderRows.hasNext();)
{
if(firstPass) {
for(rd.reportRowHeaderCols.resetNext();rd.reportRowHeaderCols.hasNext();) {
- /*if(firstPass) {
- table.addCell(new Paragraph("No.", font));
- firstPass = false;
- } else {*/
RowHeaderCol rhc = rd.reportRowHeaderCols.getNext();
title = rhc.getColumnTitle();
title = Utils.replaceInString(title,"_nl_", " \n");
table.addCell(new Paragraph(title,font));
- //}
}
}
ColumnHeaderRow chr = rd.reportColumnHeaderRows.getNext();
for (chr.resetNext(); chr.hasNext();) {
ColumnHeader ch = chr.getNext();
- //System.out.println(ch);
if(ch.isVisible()) {
title = ch.getColumnTitle();
title = Utils.replaceInString(title,"_nl_", " \n");
@@ -1542,13 +1501,10 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
Date sysdate = oracleDateFormat.parse(ReportLoader.getSystemDateTime());
SimpleDateFormat dtimestamp = new SimpleDateFormat(Globals.getScheduleDatePattern());
return dtimestamp.format(sysdate)+" "+Globals.getTimeZone();
- //paramList.add(new IdNameValue("DATE", dtimestamp.format(sysdate)+" "+Globals.getTimeZone()));
} catch(Exception ex) {}
SimpleDateFormat s = new SimpleDateFormat(pattern);
s.setTimeZone(TimeZone.getTimeZone(Globals.getTimeZone()));
- //System.out.println("^^^^^^^^^^^^^^^^^^^^ " + Calendar.getInstance().getTime());
- //System.out.println("^^^^^^^^^^^^^^^^^^^^ " + s.format(Calendar.getInstance().getTime()));
return s.format(Calendar.getInstance().getTime());
}
@@ -1567,12 +1523,10 @@ public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{
} catch (NumberFormatException e) {}
pb.setCurrentPage(temp);
- //pb.setPortrait( trueORfalse(request.getParameter("isPortrait"),true));
pb.setPortrait(trueORfalse(rr.getPDFOrientation() == "portait"?"true":"false", true));
- //pb.setCoverPageIncluded( trueORfalse(request.getParameter("isCoverPageIncluded"), true));
- //if(Globals.isCoverPageNeeded()) {
- pb.setCoverPageIncluded(Globals.isCoverPageNeeded()?rr.isPDFCoverPage():false);
- //}
+
+ pb.setCoverPageIncluded(Globals.isCoverPageNeeded()?rr.isPDFCoverPage():false);
+
pb.setTitle(nvl(request.getParameter("title")));
pb.setPagesize(nvls(request.getParameter("pagesize"),"LETTER"));
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java
index b64f8e07..6d9c94f9 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java
@@ -990,10 +990,6 @@ return sheetName;
}
return limit;
}
-
-// public static String getWhereConditionForUserRole() {
-// return nvls(raptorProperties.getProperty("schedule_where_condition"),"").trim();
-// }
public static String getCustomizedScheduleQueryForUsers() {
return nvls(raptorProperties.getProperty("schedule_custom_query_for_users"),"").trim();
}
@@ -1336,65 +1332,6 @@ return sheetName;
List formParameter = new ArrayList();
String formField = "";
-// for(int i = 1 ; i < (countOfFields+1); i++)
-// {
-// formField ="ff"+i;
-//
-// if(request.getParameterValues(formField) != null && request.getParameterValues(formField).length > 1 )
-// {
-// String[] vals = request.getParameterValues(formField);
-// boolean isMultiValue = false;
-// StringBuffer value = new StringBuffer("");
-// if(vals.length > 1) {
-// isMultiValue = true;
-// value.append("(");
-// }
-// for(int j = 0 ; j < vals.length; j++)
-// {
-// if(isMultiValue) value.append("'");
-// try {
-// if(vals[j] !=null && vals[j].length() > 0)
-// value.append(java.net.URLDecoder.decode(vals[j], "UTF-8"));// + ",";
-// else
-// value.append(vals[j]);
-// } catch (UnsupportedEncodingException ex) {value.append(vals[j]);}
-// catch (IllegalArgumentException ex1){value.append(vals[j]);}
-// catch (Exception ex2){value.append(vals[j]);}
-//
-//
-// if(isMultiValue) value.append("'");
-//
-// if(j != vals.length -1) {
-// value.append(",");
-// }
-// }
-// if(vals.length > 1) {
-// value.append(")");
-// }
-//
-// //value = value.substring(0 , value.length());
-//
-// valuesMap.put(fieldNameMap.get(formField), value.toString());
-// value = new StringBuffer("");
-//
-// }
-// else if(request.getParameter(formField) != null)
-// {
-// String value = "";
-// value = request.getParameter(formField);
-// try {
-// if(value !=null && value.length() > 0)
-// value = java.net.URLDecoder.decode(request.getParameter(formField), "UTF-8");
-// } catch (UnsupportedEncodingException ex) {}
-// catch (IllegalArgumentException ex1){}
-// catch (Exception ex2){}
-// valuesMap.put(fieldNameMap.get(formField), value);
-//
-// }else
-// {
-// valuesMap.put(fieldNameMap.get(formField), "NULL" );
-// }
-// }
for(int i = 0 ; i < rff.size(); i++) {
ff = ((FormField)rff.getFormField(i));
formField = ff.getFieldName();
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorController.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorController.java
index 8eda540d..a044a9c4 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorController.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorController.java
@@ -58,6 +58,7 @@ import org.onap.portalsdk.core.controller.RestrictedBaseController;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@@ -73,30 +74,30 @@ public class RaptorController extends RestrictedBaseController {
private static final String IS_EMBEDDED = "isEmbedded";
private static final String ACTION_NOT_FOUND = "Action not found";
- @RequestMapping(value = { "/report" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report" })
public ModelAndView report(HttpServletRequest request) {
request.getSession().setAttribute(IS_EMBEDDED, false);
return new ModelAndView("report");
}
- @RequestMapping(value = { "/reportDS1" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/reportDS1" })
public ModelAndView reportDS1(HttpServletRequest request) {
request.getSession().setAttribute(IS_EMBEDDED, false);
return new ModelAndView("reportDS1");
}
- @RequestMapping(value = { "/report_embedded" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report_embedded" })
public ModelAndView reportEmbedded(HttpServletRequest request) {
request.getSession().setAttribute(IS_EMBEDDED, true);
return new ModelAndView("report_embedded");
}
- @RequestMapping(value = { "/report_sample" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report_sample" })
public ModelAndView reportSample(HttpServletRequest request) {
return new ModelAndView("report_sample");
}
- @RequestMapping(value = { "/report_import.htm" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report_import.htm" })
public ModelAndView reportImport(HttpServletRequest request) throws IOException {
String viewName = "report_import";
Action action = null;
@@ -119,7 +120,7 @@ public class RaptorController extends RestrictedBaseController {
return new ModelAndView(viewName, "model", null);
}
- @RequestMapping(value = { "/report_wizard.htm" }, method = { RequestMethod.POST, RequestMethod.GET })
+ @GetMapping(value = { "/report_wizard.htm" })
public ModelAndView reportWizard(HttpServletRequest request, HttpServletResponse response) throws IOException {
String viewName = "";
String actionKey = nvl(request.getParameter(AppConstants.RI_ACTION), request.getParameter("action"));
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java
index ae9d39a1..a39d371d 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java
@@ -120,6 +120,9 @@ import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -137,7 +140,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
private String viewName;
- @RequestMapping(value = { "/raptor.htm" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/raptor.htm" })
public void RaptorSearch(HttpServletRequest request, HttpServletResponse response)
throws IOException, RaptorException {
@@ -301,7 +304,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
}
- @RequestMapping(value = "/report/wizard/drill_down_param/{parameter}", method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = "/report/wizard/drill_down_param/{parameter}", produces = "application/json")
public @ResponseBody List<DrillDownParamDef> getDrillDownParamDef (@PathVariable("parameter") String parameter, HttpServletRequest request, HttpServletResponse response)
{
List<DrillDownParamDef> list = new ArrayList<>();
@@ -315,7 +318,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return list;
}
- @RequestMapping(value = "/report/wizard/list_columns", method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = "/report/wizard/list_columns", produces = "application/json")
public @ResponseBody ArrayList<ColumnJSON> listColumns(HttpServletRequest request, HttpServletResponse response)
{
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
@@ -332,7 +335,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return listJSON;
}
- @RequestMapping(value = "/report/wizard/list_drilldown_reports", method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = "/report/wizard/list_drilldown_reports", produces = "application/json")
public @ResponseBody ArrayList<ColumnJSON> list_drilldown_reports(HttpServletRequest request,
HttpServletResponse response) throws RaptorException {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
@@ -380,7 +383,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return listJSON;
}
- @RequestMapping(value = "/report/wizard/list_formfields", method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = "/report/wizard/list_formfields", produces = "application/json")
public @ResponseBody ArrayList<SearchFieldJSON> listFormFields(HttpServletRequest request,
HttpServletResponse response) {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
@@ -402,7 +405,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return listJSON;
}
- @RequestMapping(value = "/report/wizard/list_child_report_col/{reportID}", method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = "/report/wizard/list_child_report_col/{reportID}", produces = "application/json")
public @ResponseBody ArrayList<ColumnJSON> listChildReportCols(@PathVariable("reportID") String reportID,
HttpServletRequest request, HttpServletResponse response) throws RaptorException {
ReportRuntime ddRr = (new ReportHandler()).loadReportRuntime(request, reportID, false);
@@ -420,7 +423,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return listJSON;
}
- @RequestMapping(value = "/report/wizard/list_child_report_ff/{reportID}", method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = "/report/wizard/list_child_report_ff/{reportID}", produces = "application/json")
public @ResponseBody ArrayList<SearchFieldJSON> listChildReportFormFields(@PathVariable("reportID") String reportID,
HttpServletRequest request, HttpServletResponse response) throws RaptorException {
ReportRuntime ddRr = (new ReportHandler()).loadReportRuntime(request, reportID, false);
@@ -442,7 +445,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return listJSON;
}
- @RequestMapping(value = "report/wizard/copy_report/{reportID}", method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = "report/wizard/copy_report/{reportID}", produces = "application/json")
public @ResponseBody MessageJSON copyReport(@PathVariable("reportID") String reportID, HttpServletRequest request,
HttpServletResponse response){
MessageJSON messageJSON = new MessageJSON();
@@ -469,7 +472,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return messageJSON;
}
- @RequestMapping(value = "report/wizard/import_report", method = RequestMethod.POST, consumes = "application/json")
+ @PostMapping(value = "report/wizard/import_report", consumes = "application/json")
public @ResponseBody MessageJSON importReport(@RequestBody ImportJSON importJSON, HttpServletRequest request,
HttpServletResponse response) {
MessageJSON messageJSON = new MessageJSON();
@@ -500,7 +503,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
- @RequestMapping(value = "report/wizard/get_formfield_groups_data/{id}", method = RequestMethod.GET)
+ @GetMapping(value = "report/wizard/get_formfield_groups_data/{id}")
public @ResponseBody FormFieldGroupsJSON getFFGroupsData(@PathVariable Map<String, String> pathVariables,
HttpServletRequest request, HttpServletResponse response) throws IOException, RaptorException {
@@ -531,7 +534,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return formFieldGroupsJSON;
}
- @RequestMapping(value = "report/wizard/clearSession", method = RequestMethod.GET)
+ @GetMapping(value = "report/wizard/clearSession")
public @ResponseBody MessageJSON clearSession(HttpServletRequest request, HttpServletResponse response) {
MessageJSON messageJSON = new MessageJSON();
removeVariablesFromSession(request);
@@ -542,7 +545,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
- @RequestMapping(value = "report/wizard/save_formfield_groups_data", method = RequestMethod.POST)
+ @PostMapping(value = "report/wizard/save_formfield_groups_data")
public @ResponseBody MessageJSON saveFFGroupsData(@RequestBody FormFieldGroupsJSON formFieldGroupsJSON,
HttpServletRequest request, HttpServletResponse response) throws IOException, RaptorException {
@@ -577,7 +580,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return messageJSON;
}
- @RequestMapping(value = "report/wizard/save_formfield_tab_data", method = RequestMethod.POST)
+ @PostMapping(value = "report/wizard/save_formfield_tab_data")
public @ResponseBody MessageJSON saveFFTabWiseData(@RequestBody FormEditJSON formEditJSON,
HttpServletRequest request, HttpServletResponse response) {
ReportDefinition rdef = null;
@@ -663,7 +666,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return messageJSON;
}
- @RequestMapping(value = "report/wizard/add_formfield_tab_data", method = RequestMethod.POST)
+ @PostMapping(value = "report/wizard/add_formfield_tab_data")
public @ResponseBody MessageJSON addFFTabWiseData(@RequestBody FormEditJSON formEditJSON,
HttpServletRequest request, HttpServletResponse response) {
ReportDefinition rdef;
@@ -720,7 +723,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return messageJSON;
}
- @RequestMapping(value = "report/wizard/save_col_tab_data", method = RequestMethod.POST)
+ @PostMapping(value = "report/wizard/save_col_tab_data")
public @ResponseBody MessageJSON saveColTabWiseData(@RequestBody ColumnEditJSON columnEditJSON,
HttpServletRequest request, HttpServletResponse response) {
ReportDefinition rdef;
@@ -785,7 +788,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return messageJSON;
}
- @RequestMapping(value = "report/wizard/save_def_tab_data/{id}", method = RequestMethod.POST)
+ @PostMapping(value = "report/wizard/save_def_tab_data/{id}")
public @ResponseBody MessageJSON saveDefTabWiseData(@PathVariable("id") String id,
@RequestBody DefinitionJSON definitionJSON, HttpServletRequest request, HttpServletResponse response)
{
@@ -983,8 +986,8 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return messageJSON;
}
- @RequestMapping(value = { "/report/wizard/retrieve_form_tab_wise_data/{id}",
- "/report/wizard/retrieve_form_tab_wise_data/{id}/{action}" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/retrieve_form_tab_wise_data/{id}",
+ "/report/wizard/retrieve_form_tab_wise_data/{id}/{action}" })
public @ResponseBody FormEditJSON retrieveFormTabWiseData(@PathVariable Map<String, String> pathVariables,
HttpServletRequest request, HttpServletResponse response) {
ReportDefinition rdef;
@@ -1072,7 +1075,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return wizardJSON;
}
- @RequestMapping(value = { "/report/wizard/retrieve_col_tab_wise_data/{id}" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/retrieve_col_tab_wise_data/{id}" })
public @ResponseBody ColumnEditJSON retrieveColTabWiseData(@PathVariable Map<String, String> pathVariables,
HttpServletRequest request, HttpServletResponse response) {
ReportDefinition rdef;
@@ -1137,8 +1140,8 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return wizardJSON;
}
- @RequestMapping(value = { "/report/wizard/retrieve_sql_tab_wise_data/{id}",
- "/report/wizard/retrieve_sql_tab_wise_data/" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/retrieve_sql_tab_wise_data/{id}",
+ "/report/wizard/retrieve_sql_tab_wise_data/" })
public @ResponseBody QueryJSON retrieveSqlTabWiseData(@PathVariable Map<String, String> pathVariables,
HttpServletRequest request, HttpServletResponse response) throws RaptorException {
ReportDefinition rdef = null;
@@ -1181,7 +1184,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return wizardJSON;
}
- @RequestMapping(value = { "/report/wizard/retrieveTotalForTheColList" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/retrieveTotalForTheColList" })
public @ResponseBody List<IdNameValue> getTotalForTheCol(HttpServletRequest request)
{
IdNameList idNameList = AppConstants.TOTAL_FUNCTIONS;
@@ -1192,7 +1195,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return list;
}
- @RequestMapping(value = { "/report/wizard/security/retrieveReportUserList" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/security/retrieveReportUserList" })
public @ResponseBody List<SecurityEntry> getReportUserList(HttpServletRequest request)
throws RaptorException {
List<SecurityEntry> reportUserList = new ArrayList<>();
@@ -1205,7 +1208,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return reportUserList;
};
- @RequestMapping(value = { "/report/wizard/security/retrieveReportRoleList" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/security/retrieveReportRoleList" })
public @ResponseBody List<IdNameValue> getReportRoleList(HttpServletRequest request)
throws RaptorException {
List<IdNameValue> reportRoleList = new ArrayList<>();
@@ -1219,7 +1222,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return reportRoleList;
};
- @RequestMapping(value = { "/report/wizard/security/retrieveReportUserList_query" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/security/retrieveReportUserList_query" })
public @ResponseBody List<Map<String, String>> getReportUserListQuery(HttpServletRequest request)
{
List<Map<String, String>> reportUserList = new ArrayList();
@@ -1242,7 +1245,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
- @RequestMapping(value = "/report/security/addReportUser", method = RequestMethod.POST)
+ @PostMapping(value = "/report/security/addReportUser")
public @ResponseBody Map<String,String> addSelectedReportUser(
@RequestBody String userIdToAdd, HttpServletRequest request, HttpServletResponse response)
{
@@ -1263,7 +1266,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
}
- @RequestMapping(value = "/report/security/removeReportUser", method = RequestMethod.POST)
+ @PostMapping(value = "/report/security/removeReportUser")
public @ResponseBody Map<String,String> removeSelectedReportUser(
@RequestBody String userIdToRemove, HttpServletRequest request, HttpServletResponse response)
{
@@ -1285,7 +1288,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
}
- @RequestMapping(value = "/report/security/addReportRole", method = RequestMethod.POST)
+ @PostMapping(value = "/report/security/addReportRole")
public @ResponseBody Map<String,String> addSelectedReportRole(
@RequestBody String roleIdToAdd, HttpServletRequest request, HttpServletResponse response) {
Map<String, String> JsonResponse = new HashMap<>();
@@ -1305,7 +1308,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
}
- @RequestMapping(value = "/report/security/removeReportRole", method = RequestMethod.POST)
+ @PostMapping(value = "/report/security/removeReportRole")
public @ResponseBody Map<String,String> removeSelectedReportRole(
@RequestBody String roleIdToRemove, HttpServletRequest request, HttpServletResponse response)
{
@@ -1326,7 +1329,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
}
- @RequestMapping(value = "/report/security/updateReportSecurityInfo", method = RequestMethod.POST)
+ @PostMapping(value = "/report/security/updateReportSecurityInfo")
public @ResponseBody Map<String,String> updateReportSecurityInfo(
@RequestBody Map<String,String> securityInfo, HttpServletRequest request, HttpServletResponse response)
{
@@ -1350,7 +1353,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
}
- @RequestMapping(value = "/report/security/toggleUserEditAccess/{userID}", method = RequestMethod.POST)
+ @PostMapping(value = "/report/security/toggleUserEditAccess/{userID}")
public @ResponseBody Map<String,String> toggleUserEditAccess(
@PathVariable("userID") String userId,
@RequestBody String readOnly, HttpServletRequest request, HttpServletResponse response)
@@ -1377,7 +1380,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
};
- @RequestMapping(value = "/report/security/toggleRoleEditAccess/{roleID}", method = RequestMethod.POST)
+ @PostMapping(value = "/report/security/toggleRoleEditAccess/{roleID}")
public @ResponseBody Map<String,String> toggleRoleEditAccess(
@PathVariable("roleID") String roleId,
@RequestBody String readOnly, HttpServletRequest request, HttpServletResponse response)
@@ -1404,7 +1407,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
};
- @RequestMapping(value = { "/report/wizard/security/retrieveReportOwner" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/security/retrieveReportOwner" })
public @ResponseBody List<IdNameValue> getReportOwnerInList(HttpServletRequest request)
throws RaptorException {
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
@@ -1443,7 +1446,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
- @RequestMapping(value = { "/report/wizard/security/getReportSecurityInfo" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/security/getReportSecurityInfo" })
public @ResponseBody Map<String,String> getReportSecurityInfo(HttpServletRequest request)
{
Map<String, String> securityInfoMap = new HashMap<>();
@@ -1465,7 +1468,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return securityInfoMap;
}
- @RequestMapping(value = { "/report/wizard/security/getReportSecurityUsers" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/security/getReportSecurityUsers" })
public @ResponseBody List<SecurityEntry> getReportSecurityUsers(HttpServletRequest request)
throws RaptorException {
@@ -1484,7 +1487,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
- @RequestMapping(value = { "/report/wizard/security/getReportSecurityRoles" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/security/getReportSecurityRoles" })
public @ResponseBody List<SecurityEntry> getReportSecurityRoles(HttpServletRequest request)
throws RaptorException {
@@ -1501,8 +1504,8 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
- @RequestMapping(value = { "/report/wizard/retrieve_def_tab_wise_data/{id}",
- "/report/wizard/retrieve_def_tab_wise_data/{id}/{detailId}" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/report/wizard/retrieve_def_tab_wise_data/{id}",
+ "/report/wizard/retrieve_def_tab_wise_data/{id}/{detailId}" })
public @ResponseBody DefinitionJSON retrieveDefTabWiseData(@PathVariable Map<String, String> pathVariables,
HttpServletRequest request, HttpServletResponse response) throws RaptorException {
ReportDefinition rdef;
@@ -1662,7 +1665,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
- @RequestMapping(value = "/report/wizard/retrieve_data/{validate}", method = RequestMethod.POST)
+ @PostMapping(value = "/report/wizard/retrieve_data/{validate}")
public @ResponseBody RaptorResponse retrieveDataForGivenQuery(@PathVariable("validate") boolean validate,
@RequestBody QueryJSON queryJSON, HttpServletRequest request, HttpServletResponse response)
throws RaptorException {
@@ -1859,7 +1862,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
}
- @RequestMapping(value = "/report/wizard/get_report_log/{reportID}", method = RequestMethod.GET)
+ @GetMapping(value = "/report/wizard/get_report_log/{reportID}")
public @ResponseBody ArrayList<ReportLogEntry> getLogs(@PathVariable("reportID") String reportId, HttpServletRequest request,
HttpServletResponse ReportLogEntry) {
ArrayList<ReportLogEntry> arrayList = new ArrayList<>();
@@ -1875,7 +1878,7 @@ public class RaptorControllerAsync extends RestrictedBaseController {
return arrayList;
}
- @RequestMapping(value = "save_chart", method = RequestMethod.POST)
+ @PostMapping(value = "save_chart")
public void reportChartReceive(@RequestBody ChartJSON chartJSON, HttpServletRequest request,
HttpServletResponse response) {
//ReportRuntime reportRuntime;
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FavoritesController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FavoritesController.java
index fbb9cc5d..09cbb0ac 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FavoritesController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FavoritesController.java
@@ -52,6 +52,8 @@ import org.onap.portalsdk.core.logging.aspect.AuditLog;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.onboarding.rest.FavoritesClient;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.service.AppService;
import org.onap.portalsdk.core.util.SystemProperties;
import org.slf4j.MDC;
@@ -109,7 +111,7 @@ public class FavoritesController extends RestrictedBaseController {
appUserName = app.getUsername();
try {
decryptedPwd = CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (Exception e) {
logger.error(EELFLoggerDelegate.errorLogger,
"FavoritesController.getFavorites failed while decrypting password", e);
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java
index ff80d413..24e44d4b 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java
@@ -139,6 +139,24 @@ public class ProfileSearchController extends RestrictedBaseController {
logger.error(EELFLoggerDelegate.applicationLogger, "getUserPagination failed", e);
}
}
+
+ @RequestMapping(value = { "/get_all_users" }, method = RequestMethod.GET)
+ public void getAllUsers(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<>();
+ ObjectMapper mapper = new ObjectMapper();
+ logger.info(EELFLoggerDelegate.applicationLogger, "Initiating get_all_users in ProfileSearchController");
+ List<User> profileList = null;
+ try {
+ profileList = service.listAllUsers();
+ model.put("profileList", mapper.writeValueAsString(profileList));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.setContentType(APPLICATION_JSON);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.applicationLogger, "getAllUsers failed", e);
+ }
+ }
@SuppressWarnings("unchecked")
private Map<String, Object> setDashboardData(HttpServletRequest request)
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java
index 2b75aea1..8598ed15 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java
@@ -62,6 +62,8 @@ import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
import org.onap.portalsdk.core.restful.domain.EcompRole;
@@ -527,7 +529,7 @@ public class OnBoardingApiServiceImpl implements IPortalRestAPIService, IPortalR
appUserName = app.getUsername();
try {
decryptedPwd = CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (CipherUtilException e) {
logger.error(EELFLoggerDelegate.errorLogger, "getAppCredentials failed", e);
}
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/FavoritesControllerTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/FavoritesControllerTest.java
index 5c54d40d..e980f2a1 100644
--- a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/FavoritesControllerTest.java
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/core/FavoritesControllerTest.java
@@ -53,6 +53,8 @@ import org.onap.portalsdk.core.domain.App;
import org.onap.portalsdk.core.domain.User;
import org.onap.portalsdk.core.onboarding.rest.FavoritesClient;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.service.AppService;
import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
@@ -60,7 +62,7 @@ import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
-@PrepareForTest({SystemProperties.class, CipherUtil.class, FavoritesClient.class})
+@PrepareForTest({SystemProperties.class, CipherUtil.class, FavoritesClient.class, KeyProperties.class, KeyConstants.class})
public class FavoritesControllerTest {
@InjectMocks
@@ -89,6 +91,8 @@ public class FavoritesControllerTest {
HttpSession session = Mockito.mock(HttpSession.class);
Mockito.when(request.getSession()).thenReturn(session);
PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
User user = new User();
user.setId(123L);
Mockito.when(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)).thenReturn("user");
@@ -101,7 +105,7 @@ public class FavoritesControllerTest {
Mockito.when(appService.getDefaultApp()).thenReturn(app);
PowerMockito.mockStatic(CipherUtil.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
Mockito.when(CipherUtil.decryptPKC(app.getAppPassword(), app.getAppPassword())).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(FavoritesClient.class);
@@ -120,6 +124,8 @@ public class FavoritesControllerTest {
HttpSession session = Mockito.mock(HttpSession.class);
Mockito.when(request.getSession()).thenReturn(session);
PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
User user = new User();
user.setId(123L);
Mockito.when(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)).thenReturn("user");
@@ -131,7 +137,7 @@ public class FavoritesControllerTest {
app.setAppPassword("Password");
Mockito.when(appService.getDefaultApp()).thenReturn(app);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(FavoritesClient.class);
Mockito.when(FavoritesClient.getFavorites(Mockito.anyString(), Mockito.anyString(),
@@ -149,6 +155,8 @@ public class FavoritesControllerTest {
HttpSession session = Mockito.mock(HttpSession.class);
Mockito.when(request.getSession()).thenReturn(session);
PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
User user = new User();
user.setId(123L);
Mockito.when(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)).thenReturn("user");
@@ -161,7 +169,7 @@ public class FavoritesControllerTest {
Mockito.when(appService.getDefaultApp()).thenReturn(null);
PowerMockito.mockStatic(CipherUtil.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
Mockito.when(CipherUtil.decryptPKC(app.getAppPassword(), app.getAppPassword())).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(FavoritesClient.class);
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java
index 9d5e4fea..2c6827ed 100644
--- a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java
@@ -65,6 +65,8 @@ import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
import org.onap.portalsdk.core.restful.domain.EcompRole;
@@ -83,7 +85,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
import org.springframework.context.ApplicationContext;
@RunWith(PowerMockRunner.class)
-@PrepareForTest({ AppContextManager.class, PortalApiProperties.class, JSONUtil.class, PortalTimeoutHandler.class, SystemProperties.class, CipherUtil.class })
+@PrepareForTest({ AppContextManager.class, PortalApiProperties.class, JSONUtil.class, PortalTimeoutHandler.class, SystemProperties.class, CipherUtil.class, KeyProperties.class, KeyConstants.class })
public class OnBoardingApiServiceImplTest {
@Mock
@@ -426,7 +428,9 @@ public class OnBoardingApiServiceImplTest {
PowerMockito.mockStatic(SystemProperties.class);
PowerMockito.mockStatic(CipherUtil.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(key);
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(key);
Mockito.when(CipherUtil.decryptPKC(app.getAppPassword(), key)).thenReturn(app.getAppPassword());
Mockito.when(appServiceImpl.getDefaultApp()).thenReturn(app);
OnBoardingApiServiceImpl onBoardingApiServiceImpl = new OnBoardingApiServiceImpl();
@@ -453,7 +457,9 @@ public class OnBoardingApiServiceImplTest {
PowerMockito.mockStatic(SystemProperties.class);
PowerMockito.mockStatic(CipherUtil.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(key);
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(key);
Mockito.when(CipherUtil.decryptPKC(app.getAppPassword(), key)).thenThrow(CipherUtilException.class);
Mockito.when(appServiceImpl.getDefaultApp()).thenReturn(app);
OnBoardingApiServiceImpl onBoardingApiServiceImpl = new OnBoardingApiServiceImpl();
diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts
index a86ea759..6dcdda67 100644
--- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts
+++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts
@@ -36,7 +36,7 @@
*
*/
import { CommonModule } from '@angular/common';
-import { HttpClientModule } from '@angular/common/http';
+import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@@ -47,6 +47,7 @@ import { SidebarService } from './shared/services/index';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { UserService } from './shared/services/user/user.service';
+import { HeaderInterceptor } from './shared/interceptors/header-interceptor';
@NgModule({
imports: [
@@ -60,7 +61,11 @@ import { UserService } from './shared/services/user/user.service';
ReactiveFormsModule,
],
declarations: [AppComponent],
- providers: [SidebarService,UserService],
+ providers: [SidebarService,UserService,{
+ provide: HTTP_INTERCEPTORS,
+ useClass: HeaderInterceptor,
+ multi: true,
+ }],
bootstrap: [AppComponent]
})
export class AppModule {}
diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts
index 7d14ee39..1c631347 100644
--- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts
+++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts
@@ -10,56 +10,59 @@ export class ProfileService {
constructor(private http:HttpClient) { }
getUserPagination(){
- return this.http.get(environment.getUserPagination,{ withCredentials: true });
+ return this.http.get(environment.getUserPagination);
}
+ getAllUsers(){
+ return this.http.get(environment.getAllUsers);
+ }
getPostSearch(postSearchBean:any)
{
- return this.http.post(environment.postSearch,JSON.stringify({postSearchBean: postSearchBean}),{ withCredentials: true });
+ return this.http.post(environment.postSearch,JSON.stringify({postSearchBean: postSearchBean}));
}
importUser(postSearchBean:any)
{
- return this.http.post(environment.importSearch,JSON.stringify({postSearchBean: postSearchBean}),{ withCredentials: true });
+ return this.http.post(environment.importSearch,JSON.stringify({postSearchBean: postSearchBean}));
}
getPostProfile()
{
- return this.http.get(environment.getPostProfile,{ withCredentials: true });
+ return this.http.get(environment.getPostProfile);
}
getSelfProfile()
{
- return this.http.get(environment.getSelfProfile,{ withCredentials: true });
+ return this.http.get(environment.getSelfProfile);
}
getProfileById(profileId){
- return this.http.get(environment.getProfileById+"?profile_id="+profileId, {withCredentials: true });
+ return this.http.get(environment.getProfileById+"?profile_id="+profileId);
}
removeRole(data,profileId)
{
- return this.http.post(environment.removeUserRole+'?profile_id='+profileId,JSON.stringify({role: data}),{ withCredentials: true });
+ return this.http.post(environment.removeUserRole+'?profile_id='+profileId,JSON.stringify({role: data}));
}
addUserRole(data,profileId)
{
- return this.http.post(environment.addUserRole+'?profile_id='+profileId,JSON.stringify({role: data}),{ withCredentials: true });
+ return this.http.post(environment.addUserRole+'?profile_id='+profileId,JSON.stringify({role: data}));
}
saveProfile(data,profileId)
{
- return this.http.post(environment.saveProfile+'?profile_id='+profileId,JSON.stringify({profile: data.profile,selectedCountry:data.selectedCountry, selectedState:data.selectedState, selectedTimeZone:data.selectedTimeZone}),{ withCredentials: true });
+ return this.http.post(environment.saveProfile+'?profile_id='+profileId,JSON.stringify({profile: data.profile,selectedCountry:data.selectedCountry, selectedState:data.selectedState, selectedTimeZone:data.selectedTimeZone}));
}
toggleProfileActive(profileId){
- return this.http.get(environment.toggleProfileActive+profileId,{ withCredentials: true });
+ return this.http.get(environment.toggleProfileActive+profileId);
}
diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.prod.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.prod.ts
index e53aeb67..a0f59731 100644
--- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.prod.ts
+++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.prod.ts
@@ -11,6 +11,7 @@ export const environment = {
getFunctionCdList:'admin_fn_menu/get_function_cd_list',
getParentList:'admin_fn_menu/get_parent_list',
getUserPagination:'get_user_pagination?pageNum=0&viewPerPage=0',
+ getAllUsers:'get_all_users',
deleteRole:'role_list/removeRole',
getTopMenu:'get_topMenuInfo',
deleteRoleFunction:'role_function_list/removeRoleFunction',
diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.ts
index 0114df00..214c39df 100644
--- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.ts
+++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/environments/environment.ts
@@ -15,6 +15,7 @@ export const environment = {
getFunctionCdList:'http://www.sdk.onap.org:8080/epsdk-app-os/admin_fn_menu/get_function_cd_list',
getParentList:'http://www.sdk.onap.org:8080/epsdk-app-os/admin_fn_menu/get_parent_list',
getUserPagination:'http://www.sdk.onap.org:8080/epsdk-app-os/get_user_pagination?pageNum=0&viewPerPage=0',
+ getAllUsers:'http://www.sdk.onap.org:8080/epsdk-app-os/get_all_users',
deleteRole:'http://www.sdk.onap.org:8080/epsdk-app-os/role_list/removeRole',
getTopMenu:'http://www.sdk.onap.org:8080/epsdk-app-os/get_topMenuInfo',
deleteRoleFunction:'http://www.sdk.onap.org:8080/epsdk-app-os/role_function_list/removeRoleFunction',
diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java
index 074311dc..d8076a71 100644
--- a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java
+++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java
@@ -47,6 +47,8 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.util.SystemProperties;
import org.springframework.web.servlet.ModelAndView;
@@ -100,9 +102,9 @@ public class LoginStrategyImpl extends LoginStrategy {
Cookie userIdCookie = getCookie(request, USER_ID);
if (userIdCookie != null) {
final String cookieValue = userIdCookie.getValue();
- if (!SystemProperties.containsProperty(SystemProperties.Decryption_Key))
- throw new IllegalStateException("Failed to find property " + SystemProperties.Decryption_Key);
- final String decryptionKey = SystemProperties.getProperty(SystemProperties.Decryption_Key);
+ if ((null == KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)) || ("".equalsIgnoreCase(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY))))
+ throw new IllegalStateException("Failed to find property " + KeyConstants.CIPHER_ENCRYPTION_KEY);
+ final String decryptionKey = KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY);
userId = CipherUtil.decrypt(cookieValue, decryptionKey);
logger.debug(EELFLoggerDelegate.debugLogger, "getUserIdFromCookie: decrypted as {}", userId);
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
index bd9bea48..4b3e1c7c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
@@ -47,7 +47,6 @@ import { LayoutModule } from '../../layout.module';
import { CookieService } from 'ngx-cookie-service';
import { HeaderService } from 'src/app/shared/services/header/header.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { Router } from '@angular/router';
import 'rxjs/add/observable/of';
import { Observable } from 'rxjs/Observable';
@@ -55,11 +54,8 @@ import { Observable } from 'rxjs/Observable';
describe('HeaderComponent', () => {
let headerService:HeaderService;
- let cookieService:CookieService;
- let router:Router;
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;
- let spy: any;
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -83,7 +79,6 @@ describe('HeaderComponent', () => {
component = fixture.componentInstance;
fixture.detectChanges();
headerService = TestBed.get(HeaderService);
- cookieService=TestBed.get(CookieService);
});
@@ -96,6 +91,10 @@ describe('HeaderComponent', () => {
let spy=spyOn(headerService, 'getTopMenuItems').and.returnValue(Observable.of('you object'));
component.ngOnInit();
expect(spy).toHaveBeenCalled();
+ expect(component.userFirstName).toEqual(component.response.firstName);
+ expect(component.userEmail).toEqual(component.response.email);
+ expect(component.userId).toEqual(component.response.userid);
+ expect(component.userName).toEqual(component.userName);
})
})
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
index 7bf5c649..1e447c72 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
@@ -38,8 +38,6 @@
import { Component, OnInit } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { HeaderService } from '../../../shared/services/header/header.service';
-import { UserService } from 'src/app/shared/services/user/user.service';
-import { User } from 'src/app/shared/services/user/user';
import { CookieService } from 'ngx-cookie-service';
@Component({
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts
index 1240e981..c42235be 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts
@@ -51,7 +51,7 @@ export class AdminService {
constructor(private http:HttpClient) { }
getRoleFunctionList(){
- return this.http.get(environment.roleFunctionList,{ withCredentials: true });
+ return this.http.get(environment.roleFunctionList);
}
saveRoleFunction(roleData:string){
@@ -60,65 +60,65 @@ export class AdminService {
getUsageList()
{
- return this.http.get(environment.usageList,{ withCredentials: true });
+ return this.http.get(environment.usageList);
}
getCacheRegions(){
- return this.http.get(environment.cachedRegions,{ withCredentials: true });
+ return this.http.get(environment.cachedRegions);
}
getRole(roleId){
- return this.http.get(environment.getRole+'?role_id=' + roleId,{ withCredentials: true });
+ return this.http.get(environment.getRole+'?role_id=' + roleId);
}
getFnMenuItems()
{
- return this.http.get(environment.getFnMenuItems,{ withCredentials: true });
+ return this.http.get(environment.getFnMenuItems);
}
updateFnMenuItem(menuObj: any): Observable<any> {
let updateMenuURL = environment.updateFnMenuItem;
- return this.http.post(updateMenuURL, menuObj, {withCredentials: true})
+ return this.http.post(updateMenuURL, menuObj)
}
getFunctionCdList(): Observable<any>{
let getFunctionCdListURL = environment.getFunctionCdList;
- return this.http.get(getFunctionCdListURL , { withCredentials: true } );
+ return this.http.get(getFunctionCdListURL);
}
getParentData(): Observable<any>{
let getParentDataURL = environment.getParentList;
- return this.http.get(getParentDataURL , { withCredentials: true } );
+ return this.http.get(getParentDataURL);
}
deleteRole(roleData:any){
- return this.http.post(environment.deleteRole,JSON.stringify({role: roleData}),{ withCredentials: true });
+ return this.http.post(environment.deleteRole,JSON.stringify({role: roleData}));
}
deleteRoleFunction(roleFunc:any)
{
- return this.http.post(environment.deleteRoleFunction,roleFunc,{ withCredentials: true });
+ return this.http.post(environment.deleteRoleFunction,roleFunc);
}
removeRoleFunction(roleFunc:any, roleId:any){
let removeRoleFunctionURL = environment.removeRoleFunction+roleId;
- return this.http.post(removeRoleFunctionURL,JSON.stringify({roleFunction:roleFunc}),{ withCredentials: true });
+ return this.http.post(removeRoleFunctionURL,JSON.stringify({roleFunction:roleFunc}));
}
saveRole(roleObj:any, roleId:any){
let saveRoleURL = environment.saveRole+roleId;
- return this.http.post(saveRoleURL,JSON.stringify(roleObj),{ withCredentials: true });
+ return this.http.post(saveRoleURL,JSON.stringify(roleObj));
}
deleteMenu(fnMenuItem:any){
- return this.http.post(environment.deleteMenu,JSON.stringify({fnMenuItem: fnMenuItem}),{ withCredentials: true });
+ return this.http.post(environment.deleteMenu,JSON.stringify({fnMenuItem: fnMenuItem}));
}
getCacheRegionDetails(cacheName:any){
- return this.http.get(environment.getRegion+'?cacheName='+cacheName,{ withCredentials: true });
+ return this.http.get(environment.getRegion+'?cacheName='+cacheName);
}
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
index eb8b63dd..a32b2e3e 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
@@ -56,11 +56,6 @@ describe('MenusComponent', () => {
expect(component).toBeTruthy();
});
- // it('should test getFnMenuItems method inside getMenus',()=>{
- // let spy=spyOn(adminService,'getFnMenuItems').and.returnValue(Observable.of(stubData))
- // component.getMenus();
- // expect(spy).toHaveBeenCalled();
- // })
describe('test getMenus',()=>{
it('should test getMenus',()=>{
let spy=spyOn(adminService,'getParentData').and.returnValue(Observable.of('you object'))
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
index 5d996964..84d5b8ac 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
@@ -41,11 +41,8 @@ import { MatTableDataSource } from '@angular/material/table';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { AdminService } from '../admin.service';
-import { NgbModal, ModalDismissReasons, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { InformationModalComponent } from 'src/app/modals/information-modal/information-modal.component';
-import { NewMenuComponent } from './new-menu/new-menu.component';
-import { Column, DataTableSettings, RdpCrudInterface , ColumnTypes} from 'portalsdk-tag-lib';
-import { element } from '@angular/core/src/render3';
+import { NgbModal} from '@ng-bootstrap/ng-bootstrap';
+import { Column, DataTableSettings, ColumnTypes} from 'portalsdk-tag-lib';
import { MenusService } from './menus.service';
@Component({
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html
index 5f131fb6..a6682306 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html
@@ -50,12 +50,12 @@
<ng-container matColumnDef="Last Name">
<th mat-header-cell *matHeaderCellDef id="heading2"> {{userHeaders[1]}} </th>
- <td mat-cell *matCellDef="let rowData"> {{rowData.lastName}} </td>
+ <td mat-cell *matCellDef="let rowData"> {{rowData.last_name}} </td>
</ng-container>
<ng-container matColumnDef="First Name">
<th mat-header-cell *matHeaderCellDef id="heading3">{{userHeaders[2]}} </th>
- <td mat-cell *matCellDef="let rowData"> {{rowData.firstName}}</td>
+ <td mat-cell *matCellDef="let rowData"> {{rowData.first_name}}</td>
</ng-container>
<ng-container matColumnDef="Email">
@@ -63,12 +63,12 @@
<td mat-cell *matCellDef="let rowData" > {{rowData.email}} </td>
</ng-container>
- <ng-container matColumnDef="orgUserId">
+ <ng-container matColumnDef="Org User ID">
<th mat-header-cell *matHeaderCellDef id="heading4"> {{userHeaders[4]}} </th>
<td mat-cell *matCellDef="let rowData" > {{rowData.orgUserId}} </td>
</ng-container>
- <ng-container matColumnDef="orgManagerUserId">
+ <ng-container matColumnDef="Org Manager User ID">
<th mat-header-cell *matHeaderCellDef id="heading4"> {{userHeaders[5]}} </th>
<td mat-cell *matCellDef="let rowData" > {{rowData.orgManagerUserId}} </td>
</ng-container>
@@ -86,7 +86,7 @@
<ng-container matColumnDef="Active?">
<th mat-header-cell *matHeaderCellDef id="heading6"> {{userHeaders[7]}} </th>
<td mat-cell *matCellDef="let rowData">
- <mat-slide-toggle [(ngModel)]="rowData.active" (change)="toggleUserActive(rowData)"></mat-slide-toggle>
+ <mat-slide-toggle [checked]="(rowData.active_yn =='Y' || rowData.active_yn == true) ? true : false" (change)="toggleUserActive(rowData,$event)"></mat-slide-toggle>
</td>
</ng-container>
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss
index 3b9e9d3b..ec84c3b0 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss
@@ -37,35 +37,18 @@
*/
table {
- width: 100%;
- }
-
- .mat-form-field {
- font-size: 14px;
- width: 100%;
- }
-
- td, th {
- width: 25%;
- }
- .mat-form-field[_ngcontent-c4] {
- font-size: 14px;
- width: 20%;
- float: right;
- }
+ width: 100%;
+}
- /*td.mat-cell, td.mat-footer-cell{
- padding: 0;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- border-right-style: solid;
- border-right-color: rgba(0,0,0,.12);
- border-right-width: 1px;
- }
-*/
+::ng-deep .mat-header-cell{
+ font-weight: bold;
+ font-size: 14px;
+ color: #343a40;
+}
-td[_ngcontent-c4], th[_ngcontent-c4] {
- width: 15%;
+::ng-deep .mat-form-field[_ngcontent-c4] {
+ font-size: 14px;
+ width: 20%;
}
#edit-button{
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
index 9ae59ca8..734aaf09 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
@@ -57,14 +57,13 @@ export class SearchComponent implements OnInit {
response: any;
result: any;
profileList:any;
- userHeaders = ["User ID","Last Name","First Name","Email","orgUserId","orgManagerUserId","Edit","Active?"];
+ userHeaders = ["User ID","Last Name","First Name","Email","Org User ID","Org Manager User ID","Edit","Active?"];
constructor(public profileservice:ProfileService, public ngbModal: NgbModal,private _router: Router) { }
dataSource: MatTableDataSource<[]>;
@ViewChild(MatPaginator, {}) paginator: MatPaginator;
@ViewChild(MatSort, {}) sort: MatSort;
-
ngOnInit() {
this.getUsers();
}
@@ -72,7 +71,7 @@ export class SearchComponent implements OnInit {
getUsers(){
this.showSpinner = true;
let response;
- this.response = this.profileservice.getUserPagination();
+ this.response = this.profileservice.getAllUsers();
this.response.subscribe(data => {
response = data;
this.result = JSON.parse(response.data);
@@ -84,9 +83,9 @@ export class SearchComponent implements OnInit {
});
}
- toggleUserActive(user){
- let activeOrInactive = (user.active) ? 'activate' : 'inactivate';
- let confirmationMsg = 'You are about to ' + activeOrInactive + ' the user ' + user.firstName +" "+user.lastName+ '. Do you want to continue?';
+ toggleUserActive(user, e){
+ let activeOrInactive = (e.checked) ? 'activate' : 'inactivate';
+ let confirmationMsg = 'You are about to ' + activeOrInactive + ' the user ' + user.first_name +" "+user.last_name+ '. Do you want to continue?';
const modalInfoRef = this.ngbModal.open(InformationModalComponent);
modalInfoRef.componentInstance.title = 'Confirmation';
modalInfoRef.componentInstance.message = confirmationMsg;
@@ -104,7 +103,7 @@ export class SearchComponent implements OnInit {
this.openConfirmationModal("Error",error);
});
} else {
- user.active = !user.active;
+ this.ngOnInit();
}
}, (result) => {
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts
index 5a5a41a8..50973763 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts
@@ -45,18 +45,11 @@ import {
} from '@angular/common/http';
import { Observable } from 'rxjs';
import { v4 as uuid } from 'uuid';
-declare const getWebJunctionXSRFToken: any;
export class HeaderInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
- // Clone the request to add the new header
- // HttpHeader object immutable - copy values
- var XSRFToken = getWebJunctionXSRFToken();
- console.log('XSRFToken:', XSRFToken);
const headerSettings: { [name: string]: string | string[]; } = {};
headerSettings['X-ECOMP-RequestID'] = uuid();
const requestType = req.params.get('requestType');
- if (XSRFToken.name && XSRFToken.value)
- headerSettings['X-XSRF-TOKEN'] = XSRFToken.value;
if(requestType!=null && requestType==='fileUpload'){
//headerSettings['Content-Type'] = 'multipart/form-data';
}else{
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java
index 58c6cd62..3a7baccd 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java
@@ -51,6 +51,8 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.objectcache.AbstractCacheManager;
import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
import org.onap.portalsdk.core.service.DataAccessService;
@@ -144,7 +146,7 @@ public class ResourceInterceptor extends HandlerInterceptorAdapter {
String decreptedPwd = null;
try {
decreptedPwd = CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (Exception e) {
logger.error(EELFLoggerDelegate.errorLogger, "handleSessionUpdates failed to decrypt password", e);
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RestApiRequestBuilder.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RestApiRequestBuilder.java
index d9b96284..8f1a26bb 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RestApiRequestBuilder.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RestApiRequestBuilder.java
@@ -46,6 +46,8 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
import org.onap.portalsdk.core.onboarding.rest.RestWebServiceClient;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.util.SystemProperties;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
@@ -78,7 +80,7 @@ public class RestApiRequestBuilder {
appUserName = app.getUsername();
try {
decryptedPwd = CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (CipherUtilException e) {
logger.error(EELFLoggerDelegate.errorLogger, "getViaREST failed", e);
throw new IOException("getViaREST failed", e);
@@ -116,7 +118,7 @@ public class RestApiRequestBuilder {
appUserName = app.getUsername();
try {
decryptedPwd = CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (CipherUtilException e) {
logger.error(EELFLoggerDelegate.errorLogger, "postViaREST failed", e);
throw new IOException("postViaREST failed", e);
@@ -153,7 +155,7 @@ public class RestApiRequestBuilder {
appUserName = app.getUsername();
try {
decryptedPwd = CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (CipherUtilException e) {
logger.error(EELFLoggerDelegate.errorLogger, "deleteViaRest failed", e);
throw new IOException("deleteViaRest failed", e);
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java
index 9ed0f38c..7df80183 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java
@@ -58,6 +58,8 @@ import org.onap.portalsdk.core.domain.User;
import org.onap.portalsdk.core.domain.UserApp;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.util.SystemProperties;
import org.onap.portalsdk.external.authorization.domain.ExternalAccessPerms;
import org.onap.portalsdk.external.authorization.domain.ExternalAccessRole;
@@ -265,7 +267,7 @@ public class UserApiServiceImpl implements UserApiService {
if (encrypted != null && encrypted.length() > 0) {
try {
result = CipherUtil.decryptPKC(encrypted,
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
} catch (Exception e) {
logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed", e);
throw e;
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileService.java
index 9a43a203..880b6d73 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileService.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileService.java
@@ -51,4 +51,6 @@ public interface UserProfileService {
public List<User> findAllUserWithOnOffline(String originOrgUserId);
List<User> findAllActive();
+
+ List<User> listAllUsers();
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java
index 879a11de..67dfefab 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java
@@ -45,6 +45,7 @@ import java.util.SortedSet;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
+import org.onap.portalsdk.core.domain.Profile;
import org.onap.portalsdk.core.domain.Role;
import org.onap.portalsdk.core.domain.User;
import org.onap.portalsdk.core.domain.support.CollaborateList;
@@ -132,4 +133,11 @@ public class UserProfileServiceImpl implements UserProfileService {
return users;
}
+ @Override
+ public List<User> listAllUsers() {
+ @SuppressWarnings("unchecked")
+ List<User> users = getDataAccessService().getList(Profile.class, null);
+ return users;
+ }
+
}
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallServiceImpl.java
index 5582fd2e..a49be085 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallServiceImpl.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallServiceImpl.java
@@ -42,6 +42,8 @@ import java.util.List;
import org.onap.portalsdk.core.domain.App;
import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.util.SystemProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -70,7 +72,7 @@ public class WebServiceCallServiceImpl implements WebServiceCallService {
String encriptedPwdDB = app.getAppPassword();
String appUserName = app.getUsername();
String decreptedPwd = CipherUtil.decryptPKC(encriptedPwdDB,
- secretKey == null ? SystemProperties.getProperty(SystemProperties.Decryption_Key) : secretKey);
+ secretKey == null ? KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY) : secretKey);
if (decreptedPwd.equals(requestPassword) && appUserName.equals(requestAppName)) {
return true;
}
diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/RestApiRequestBuilderTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/RestApiRequestBuilderTest.java
index 099f4c42..132ab546 100644
--- a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/RestApiRequestBuilderTest.java
+++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/RestApiRequestBuilderTest.java
@@ -48,13 +48,15 @@ import org.mockito.Mockito;
import org.onap.portalsdk.core.domain.App;
import org.onap.portalsdk.core.onboarding.rest.RestWebServiceClient;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
-@PrepareForTest({ SystemProperties.class, CipherUtil.class, RestWebServiceClient.class })
+@PrepareForTest({ SystemProperties.class, CipherUtil.class, RestWebServiceClient.class, KeyProperties.class, KeyConstants.class })
public class RestApiRequestBuilderTest {
@InjectMocks
@@ -77,10 +79,12 @@ public class RestApiRequestBuilderTest {
String status = "SUCCESS";
PowerMockito.mockStatic(SystemProperties.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(CipherUtil.class);
Mockito.when(CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key))).thenReturn(app.getAppPassword());
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY))).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(RestWebServiceClient.class);
@@ -110,7 +114,9 @@ public class RestApiRequestBuilderTest {
app.setAppPassword("Password");
PowerMockito.mockStatic(SystemProperties.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
Mockito.when(appService.getDefaultApp()).thenReturn(app);
restApiRequestBuilder.getViaREST(restEndPoint, isBasicAuth, userId);
@@ -155,10 +161,12 @@ public class RestApiRequestBuilderTest {
String status = "SUCCESS";
PowerMockito.mockStatic(SystemProperties.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(CipherUtil.class);
Mockito.when(CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key))).thenReturn(app.getAppPassword());
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY))).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(RestWebServiceClient.class);
RestWebServiceClient client = Mockito.mock(RestWebServiceClient.class);
@@ -187,7 +195,9 @@ public class RestApiRequestBuilderTest {
app.setAppPassword("Password");
PowerMockito.mockStatic(SystemProperties.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
Mockito.when(appService.getDefaultApp()).thenReturn(app);
restApiRequestBuilder.postViaREST(restEndPoint, isBasicAuth,content, userId);
@@ -230,10 +240,12 @@ public class RestApiRequestBuilderTest {
String status = "SUCCESS";
PowerMockito.mockStatic(SystemProperties.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(CipherUtil.class);
Mockito.when(CipherUtil.decryptPKC(app.getAppPassword(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key))).thenReturn(app.getAppPassword());
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY))).thenReturn(app.getAppPassword());
PowerMockito.mockStatic(RestWebServiceClient.class);
RestWebServiceClient client = Mockito.mock(RestWebServiceClient.class);
@@ -262,7 +274,9 @@ public class RestApiRequestBuilderTest {
app.setAppPassword("Password");
PowerMockito.mockStatic(SystemProperties.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(app.getAppPassword());
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(app.getAppPassword());
Mockito.when(appService.getDefaultApp()).thenReturn(app);
restApiRequestBuilder.deleteViaRest(restEndPoint, isBasicAuth,content, userId);
diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/WebServiceCallServiceImplTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/WebServiceCallServiceImplTest.java
index 69e9b410..89c2fabf 100644
--- a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/WebServiceCallServiceImplTest.java
+++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/core/service/WebServiceCallServiceImplTest.java
@@ -48,13 +48,15 @@ import org.mockito.Mock;
import org.mockito.Mockito;
import org.onap.portalsdk.core.domain.App;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@RunWith(PowerMockRunner.class)
-@PrepareForTest({CipherUtil.class, SystemProperties.class})
+@PrepareForTest({CipherUtil.class, SystemProperties.class, KeyProperties.class, KeyConstants.class})
public class WebServiceCallServiceImplTest {
@InjectMocks
@@ -78,7 +80,9 @@ public class WebServiceCallServiceImplTest {
Mockito.when(appService.getDefaultApp()).thenReturn(app);
PowerMockito.mockStatic(CipherUtil.class);
PowerMockito.mockStatic(SystemProperties.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(secretKey);
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn(secretKey);
Mockito.when(CipherUtil.decryptPKC(Mockito.anyString(), Mockito.anyString())).thenReturn(requestPassword);
webServiceCallServiceImpl.verifyRESTCredential(secretKey, requestAppName, requestPassword);
Assert.assertTrue(true);
@@ -95,7 +99,9 @@ public class WebServiceCallServiceImplTest {
Mockito.when(appService.getDefaultApp()).thenReturn(app);
PowerMockito.mockStatic(CipherUtil.class);
PowerMockito.mockStatic(SystemProperties.class);
- Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn("Key");
+ PowerMockito.mockStatic(KeyProperties.class);
+ PowerMockito.mockStatic(KeyConstants.class);
+ Mockito.when(KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY)).thenReturn("Key");
Mockito.when(CipherUtil.decryptPKC(Mockito.anyString(), Mockito.anyString())).thenReturn("Key");
webServiceCallServiceImpl.verifyRESTCredential(secretKey, requestAppName, requestPassword);
Assert.assertFalse(false);