diff options
692 files changed, 22818 insertions, 13727 deletions
diff --git a/LICENSE.txt b/LICENSE.txt index 9532e5b8..317c24c3 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,19 +1,35 @@ -/* - * ============LICENSE_START=========================================================== - * ==================================================================================== - * Copyright 2017 AT&T Intellectual Property. All rights reserved. - * ==================================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================================= - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - */
\ No newline at end of file + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. diff --git a/ecomp-sdk/.gitignore b/ecomp-sdk/.gitignore deleted file mode 100644 index 442c9518..00000000 --- a/ecomp-sdk/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.project -/.settings diff --git a/ecomp-sdk/README.md b/ecomp-sdk/README.md index 7af36cb6..e1d18139 100644 --- a/ecomp-sdk/README.md +++ b/ecomp-sdk/README.md @@ -1,17 +1,14 @@ -# ECOMP Portal SDK +# ONAP Portal SDK -This is the parent Maven project for the following -ECOMP Portal SDK child Maven projects: +This is the parent Maven project for the following child Maven modules: -* SDK Framework library -* SDK Core library -* SDK Analytics library -* SDK Workflow library -* SDK Common Application library -* SDK Common Overlay Web Application +* Portal SDK Framework library +* Portal SDK Core library +* Portal SDK Analytics library +* Portal SDK Workflow library +* Portal SDK Common Application library +* Portal SDK Common Overlay Web Application -This area also includes ECOMP Portal SDK web application projects -for AT&T internal use and open source distribution, but they are -not child Maven projects. +This area also includes ECOMP Portal SDK web application projects. Release notes are published in each project. diff --git a/ecomp-sdk/epsdk-analytics/README.md b/ecomp-sdk/epsdk-analytics/README.md index 9e81d85e..9c3ce95d 100644 --- a/ecomp-sdk/epsdk-analytics/README.md +++ b/ecomp-sdk/epsdk-analytics/README.md @@ -1,8 +1,8 @@ -# ECOMP Portal SDK Analytics +# ONAP Portal SDK Analytics ## Overview -This is the Maven project for the ECOMP Portal SDK Analytics library, +This is the Maven project for the ONAP Portal SDK Analytics library, which is distributed as epsdk-analytics-N.N.N.jar. This library requires Hibernate and Spring, and provides data-visualization features including charts, maps and reports ("Raptor"). @@ -11,12 +11,20 @@ features including charts, maps and reports ("Raptor"). ### ONAP Distributions -Version 1.3.0 -- [Portal-19] Renaming the Group Id in the POM file to org.onap.portal.sdk -- [PORTAL-58] Removing restricted image files under raptor -- [PORTAL-60] remove CalendarPopup.js that's user for raptor schedule tab +Version 1.4.0 +- PORTAL-19 Rename Java package base to org.onap +- PORTAL-72 Address Sonar Scan code issues +- PORTAL-42 Use OParent as parent POM +- PORTAL-90 Use approved ONAP license text + +Version 1.3.0, 28 August 2017 +- Portal-19 Renaming the Group Id in the POM file to org.onap.portal.sdk +- PORTAL-58 Removing restricted image files under raptor +- PORTAL-60 remove CalendarPopup.js that's user for raptor schedule tab + Version 1.1.0 -- [Portal-7] Improvements added as part of the rebasing process -- [PORTAL-17] Remove jfree related items +- Portal-7 Improvements added as part of the rebasing process +- PORTAL-17 Remove jfree related items + Version 1.0.0 - Initial release diff --git a/ecomp-sdk/epsdk-analytics/pom.xml b/ecomp-sdk/epsdk-analytics/pom.xml index 3c22efc1..3ef1ddb9 100644 --- a/ecomp-sdk/epsdk-analytics/pom.xml +++ b/ecomp-sdk/epsdk-analytics/pom.xml @@ -5,65 +5,21 @@ <parent> <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-project</artifactId> - <version>1.3.0-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> </parent> <!-- GroupId is inherited from parent --> <artifactId>epsdk-analytics</artifactId> <!-- Version is inherited from parent --> <packaging>jar</packaging> - <name>ECOMP Portal SDK Analytics</name> + <name>ONAP Portal SDK Analytics</name> <description>Provides analytics features for SDK applications</description> <url>https://wiki.onap.org/display/DW/Portal</url> + <!-- properties are inherited from parent --> + <!-- repositories are inherited from parent --> - <build> - <plugins> - <!-- - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>license-maven-plugin</artifactId> - <version>1.10</version> - <configuration> - <encoding>UTF-8</encoding> - <licenseName>my_license</licenseName> - <licenseResolver>${project.baseUri}/license</licenseResolver> - <inceptionYear>2017</inceptionYear> - <organizationName>AT&T Intellectual Property</organizationName> - <projectName>eCOMP Portal SDK</projectName> - <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> - <processStartTag>================================================================================</processStartTag> - <sectionDelimiter>================================================================================</sectionDelimiter> - <processEndTag>================================================================================</processEndTag> - <roots> - <root>src/main</root> - </roots> - <excludes> - <exclude>*.png</exclude> - <exclude>*.drl</exclude> - <exclude>*.gif</exclude> - <exclude>*.jpeg</exclude> - <exclude>*.jpg</exclude> - <exclude>*.bmp</exclude> - <exclude>*.ico</exclude> - <exclude>*.svg</exclude> - </excludes> - </configuration> - <executions> - <execution> - <id>first</id> - <goals> - <goal>update-file-header</goal> - </goals> - <phase>process-sources</phase> - </execution> - </executions> - </plugin> - --> - </plugins> - </build> - <dependencies> <!-- sdk-core --> diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/AntBuild.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/AntBuild.java index d6904b8e..aee59fc5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/AntBuild.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/AntBuild.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics; +package org.onap.portalsdk.analytics; import java.io.IOException; import java.net.URL; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/RaptorObject.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/RaptorObject.java new file mode 100644 index 00000000..8a54e8bc --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/RaptorObject.java @@ -0,0 +1,62 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics; + +public class RaptorObject extends java.lang.Object { + + protected String nvl(String s) { + return (s == null) ? "" : s; + } + + protected String nvl(String s, String sDefault) { + return nvl(s).equals("") ? sDefault : s; + } + + protected static String nvls(String s) { + return (s == null) ? "" : s; + } + + protected static String nvls(String s, String sDefault) { + return nvls(s).equals("") ? sDefault : s; + } + + protected boolean getFlagInBoolean(String s) { + return nvl(s).toUpperCase().startsWith("Y") || nvl(s).toLowerCase().equals("true"); + } + +} // RaptorObject 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 new file mode 100644 index 00000000..af8d3803 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/config/ConfigLoader.java @@ -0,0 +1,206 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.config; + +import java.io.*; +import java.util.*; +import javax.servlet.*; + +import org.onap.portalsdk.analytics.controller.*; +import org.onap.portalsdk.analytics.util.*; + +public class ConfigLoader { + // public static final String RAPTOR_ACTION_MAP = + // "raptor_action_map.properties"; + + private static final String P_FILE_EXTENSION = ".properties"; + + public static final String RAPTOR_PROPERTIES = "raptor"; + + public static final String SQL_PROPERTIES = "sql"; + + public static final String APP_PROPERTIES = "raptor_app"; + + public static final String DB_PROPERTIES = "raptor_db"; + + private static String configFilesPath = "/WEB-INF/conf/"; + + 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" + + ; + + private ConfigLoader() { + } + + public static void setConfigFilesPath(String path) { + configFilesPath = path; + } // setConfigFilesPath + + public static Properties getProperties(ServletContext servletContext, String propertiesFile) + throws IOException { + return getProperties(servletContext, propertiesFile, null); + } // getProperties + + public static Properties getProperties(ServletContext servletContext, + String propertiesFile, String systemTypeExtension) throws IOException { + Properties p = new Properties(); + p.load(servletContext.getResourceAsStream(configFilesPath + propertiesFile + + ((systemTypeExtension == null) ? "" : "_" + systemTypeExtension) + + P_FILE_EXTENSION)); + return p; + } // getProperties + + public static ActionMapping loadRaptorActionMapping(ServletContext servletContext) + throws IOException { + ActionMapping actionMapping = new ActionMapping(); + + String pLine = null; + // BufferedReader pFile = new BufferedReader(new + // InputStreamReader(servletContext.getResourceAsStream(internalFilesPath+RAPTOR_ACTION_MAP))); + BufferedReader pFile = new BufferedReader(new StringReader(raptorActionMapString)); + while ((pLine = pFile.readLine()) != null) + if (pLine.trim().length() > 0) + try { + actionMapping.addAction(Action.parse(pLine)); + } catch (Exception e) { + Log + .write("[ConfigLoader.loadRaptorActionMapping] Error - unable to parse action [" + + pLine + "]"); + } + pFile.close(); + + return actionMapping; + } // loadRaptorActionMapping + +} // ConfigLoader + diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/Action.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/Action.java index 5591b434..2ab3be26 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/Action.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/Action.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.controller; +package org.onap.portalsdk.analytics.controller; import java.util.*; -import org.openecomp.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.system.*; -public class Action extends org.openecomp.portalsdk.analytics.RaptorObject { +public class Action extends org.onap.portalsdk.analytics.RaptorObject { private String action = null; private String controllerClass = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/ActionHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java index ca3a39db..0d5ef418 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/ActionHandler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ /* =========================================================================================== * This class is part of <I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I> @@ -41,7 +59,7 @@ * They can also be scheduled.</LI></UL> * */ -package org.openecomp.portalsdk.analytics.controller; +package org.onap.portalsdk.analytics.controller; import java.io.BufferedWriter; import java.io.File; @@ -70,54 +88,53 @@ import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.error.RaptorSchedularException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.error.UserDefinedException; -import org.openecomp.portalsdk.analytics.error.ValidationException; -import org.openecomp.portalsdk.analytics.model.DataCache; -import org.openecomp.portalsdk.analytics.model.ReportHandler; -import org.openecomp.portalsdk.analytics.model.ReportLoader; -import org.openecomp.portalsdk.analytics.model.SearchHandler; -import org.openecomp.portalsdk.analytics.model.base.IdNameColLookup; -import org.openecomp.portalsdk.analytics.model.base.IdNameList; -import org.openecomp.portalsdk.analytics.model.base.IdNameSql; -import org.openecomp.portalsdk.analytics.model.base.ReportSecurity; -import org.openecomp.portalsdk.analytics.model.definition.ReportDefinition; -import org.openecomp.portalsdk.analytics.model.definition.ReportSchedule; -import org.openecomp.portalsdk.analytics.model.runtime.ChartWebRuntime; -import org.openecomp.portalsdk.analytics.model.runtime.ErrorJSONRuntime; -import org.openecomp.portalsdk.analytics.model.runtime.FormField; -import org.openecomp.portalsdk.analytics.model.runtime.FormatProcessor; -import org.openecomp.portalsdk.analytics.model.runtime.ReportFormFields; -import org.openecomp.portalsdk.analytics.model.runtime.ReportJSONRuntime; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.model.runtime.VisualManager; -import org.openecomp.portalsdk.analytics.model.search.ReportSearchResultJSON; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.system.fusion.domain.QuickLink; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.view.DataRow; -import org.openecomp.portalsdk.analytics.view.DataValue; -import org.openecomp.portalsdk.analytics.view.ReportData; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.error.RaptorSchedularException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.error.UserDefinedException; +import org.onap.portalsdk.analytics.error.ValidationException; +import org.onap.portalsdk.analytics.model.DataCache; +import org.onap.portalsdk.analytics.model.ReportHandler; +import org.onap.portalsdk.analytics.model.ReportLoader; +import org.onap.portalsdk.analytics.model.SearchHandler; +import org.onap.portalsdk.analytics.model.base.IdNameColLookup; +import org.onap.portalsdk.analytics.model.base.IdNameList; +import org.onap.portalsdk.analytics.model.base.IdNameSql; +import org.onap.portalsdk.analytics.model.base.ReportSecurity; +import org.onap.portalsdk.analytics.model.definition.ReportDefinition; +import org.onap.portalsdk.analytics.model.definition.ReportSchedule; +import org.onap.portalsdk.analytics.model.runtime.ChartWebRuntime; +import org.onap.portalsdk.analytics.model.runtime.ErrorJSONRuntime; +import org.onap.portalsdk.analytics.model.runtime.FormField; +import org.onap.portalsdk.analytics.model.runtime.FormatProcessor; +import org.onap.portalsdk.analytics.model.runtime.ReportFormFields; +import org.onap.portalsdk.analytics.model.runtime.ReportJSONRuntime; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.model.runtime.VisualManager; +import org.onap.portalsdk.analytics.model.search.ReportSearchResultJSON; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.system.fusion.domain.QuickLink; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.view.DataRow; +import org.onap.portalsdk.analytics.view.DataValue; +import org.onap.portalsdk.analytics.view.ReportData; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -public class ActionHandler extends org.openecomp.portalsdk.analytics.RaptorObject { +public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject { - //private static Log debugLogger = LogFactory.getLog(ActionHandler.class.getName()); - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ActionHandler.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ActionHandler.class); private void preserveReportRuntimeAsBackup(HttpServletRequest request) { HttpSession session = request.getSession(); @@ -2184,7 +2201,7 @@ public class ActionHandler extends org.openecomp.portalsdk.analytics.RaptorObjec if (dbInfo!=null && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionMapping.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionMapping.java new file mode 100644 index 00000000..f6eae35b --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionMapping.java @@ -0,0 +1,52 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.controller; + +import java.util.*; + +public class ActionMapping extends HashMap { + + public void addAction(Action action) { + put(action.getAction(), action); + } // addAction + + public Action getAction(String actionKey) { + return (Action) get(actionKey); + } // getAction + +} // ActionMapping diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/Controller.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/Controller.java index 2776e189..09f5186a 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/Controller.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/Controller.java @@ -1,40 +1,59 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ - package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; -import java.lang.reflect.*; -import javax.servlet.*; -import javax.servlet.http.*; - -import org.openecomp.portalsdk.analytics.controller.*; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.model.runtime.ReportParamValues; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - -public class Controller extends org.openecomp.portalsdk.analytics.RaptorObject { + package org.onap.portalsdk.analytics.controller; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; + +public class Controller extends org.onap.portalsdk.analytics.RaptorObject { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Controller.class); - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Controller.class); public Controller() { } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/ErrorHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ErrorHandler.java index 165d7653..e08c21fb 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/ErrorHandler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ErrorHandler.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.controller; +package org.onap.portalsdk.analytics.controller; import java.io.PrintWriter; import java.io.StringWriter; @@ -25,23 +43,22 @@ import java.io.Writer; import java.util.*; import javax.servlet.http.*; -import org.openecomp.portalsdk.analytics.error.*; -import org.openecomp.portalsdk.analytics.model.definition.ReportDefinition; -import org.openecomp.portalsdk.analytics.model.runtime.ErrorJSONRuntime; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.*; +import org.onap.portalsdk.analytics.model.definition.ReportDefinition; +import org.onap.portalsdk.analytics.model.runtime.ErrorJSONRuntime; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -public class ErrorHandler extends org.openecomp.portalsdk.analytics.RaptorObject { - +public class ErrorHandler extends org.onap.portalsdk.analytics.RaptorObject { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ErrorHandler.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ErrorHandler.class); public ErrorHandler() { } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardProcessor.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java index 39cd5bae..11a58e73 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardProcessor.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardProcessor.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.controller; +package org.onap.portalsdk.analytics.controller; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -30,34 +48,34 @@ import javax.servlet.http.HttpServletRequest; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ValidationException; -import org.openecomp.portalsdk.analytics.model.ReportHandler; -import org.openecomp.portalsdk.analytics.model.ReportLoader; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.model.base.OrderBySeqComparator; -import org.openecomp.portalsdk.analytics.model.base.OrderSeqComparator; -import org.openecomp.portalsdk.analytics.model.definition.ReportDefinition; -import org.openecomp.portalsdk.analytics.model.definition.ReportSchedule; -import org.openecomp.portalsdk.analytics.model.runtime.FormField; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.XSSFilter; -import org.openecomp.portalsdk.analytics.xmlobj.ChartDrillFormfield; -import org.openecomp.portalsdk.analytics.xmlobj.ColFilterType; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.DataSourceType; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.analytics.xmlobj.FormatType; -import org.openecomp.portalsdk.analytics.xmlobj.JavascriptItemType; -import org.openecomp.portalsdk.analytics.xmlobj.Marker; -import org.openecomp.portalsdk.analytics.xmlobj.ObjectFactory; -import org.openecomp.portalsdk.analytics.xmlobj.SemaphoreType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ValidationException; +import org.onap.portalsdk.analytics.model.ReportHandler; +import org.onap.portalsdk.analytics.model.ReportLoader; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.model.base.OrderBySeqComparator; +import org.onap.portalsdk.analytics.model.base.OrderSeqComparator; +import org.onap.portalsdk.analytics.model.definition.ReportDefinition; +import org.onap.portalsdk.analytics.model.definition.ReportSchedule; +import org.onap.portalsdk.analytics.model.runtime.FormField; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.XSSFilter; +import org.onap.portalsdk.analytics.xmlobj.ChartDrillFormfield; +import org.onap.portalsdk.analytics.xmlobj.ColFilterType; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.DataSourceType; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.analytics.xmlobj.FormatType; +import org.onap.portalsdk.analytics.xmlobj.JavascriptItemType; +import org.onap.portalsdk.analytics.xmlobj.Marker; +import org.onap.portalsdk.analytics.xmlobj.ObjectFactory; +import org.onap.portalsdk.analytics.xmlobj.SemaphoreType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; /**<HR/> * This class is part of <B><I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I></B><BR/> @@ -86,9 +104,9 @@ import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; * */ -public class WizardProcessor extends org.openecomp.portalsdk.analytics.RaptorObject { +public class WizardProcessor extends org.onap.portalsdk.analytics.RaptorObject { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WizardProcessor.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WizardProcessor.class); public WizardProcessor() { } @@ -1324,7 +1342,7 @@ public class WizardProcessor extends org.openecomp.portalsdk.analytics.RaptorObj List reportCols = rdef.getAllColumns(); for (Iterator iter = reportCols.iterator(); iter.hasNext();) { DataColumnType dct = (DataColumnType) iter.next(); - if (argValue.equals("[" + dct.getDisplayName() + "]")) { + if (argValue != null && argValue.equals("[" + dct.getDisplayName() + "]")) { argValue = dct.getColId(); break; } @@ -2283,7 +2301,7 @@ public class WizardProcessor extends org.openecomp.portalsdk.analytics.RaptorObj ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute( AppConstants.SI_REPORT_DEFINITION); - org.openecomp.portalsdk.analytics.xmlobj.ReportMap repMap = rdef.getReportMap(); + org.onap.portalsdk.analytics.xmlobj.ReportMap repMap = rdef.getReportMap(); //clearing already added if (repMap != null){ repMap.getMarkers().removeAll(repMap.getMarkers()); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequence.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequence.java index 7dc677bd..7463598e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequence.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequence.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ - package org.openecomp.portalsdk.analytics.controller; + package org.onap.portalsdk.analytics.controller; import java.util.*; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.model.definition.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.model.definition.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; public class WizardSequence extends Vector { // private String currentStep = AppConstants.WS_DEFINITION; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceCrossTab.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceCrossTab.java new file mode 100644 index 00000000..641b0f60 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceCrossTab.java @@ -0,0 +1,63 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.controller; + +import java.util.*; + +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; + +public class WizardSequenceCrossTab extends WizardSequence { + + public WizardSequenceCrossTab(boolean userIsAuthorizedToSeeLog) { + super(); + + add(AppConstants.WS_TABLES); + add(AppConstants.WS_COLUMNS); + add(AppConstants.WS_FORM_FIELDS); + add(AppConstants.WS_FILTERS); + add(AppConstants.WS_JAVASCRIPT); + add(AppConstants.WS_USER_ACCESS); + //add(AppConstants.WS_SCHEDULE); + if (userIsAuthorizedToSeeLog) + if (Globals.getEnableReportLog()) + add(AppConstants.WS_REPORT_LOG); + add(AppConstants.WS_RUN); + } // WizardSequenceCrossTab + +} // WizardSequenceCrossTab diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceDashboard.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceDashboard.java new file mode 100644 index 00000000..6d27eab1 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceDashboard.java @@ -0,0 +1,58 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.controller; + +import java.util.*; + +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; + +public class WizardSequenceDashboard extends WizardSequence { + + public WizardSequenceDashboard(boolean userIsAuthorizedToSeeLog) { + super(); + + add(AppConstants.WS_USER_ACCESS); + //add(AppConstants.WS_SCHEDULE); + if (userIsAuthorizedToSeeLog) + if (Globals.getEnableReportLog()) + add(AppConstants.WS_REPORT_LOG); + add(AppConstants.WS_RUN); + } // WizardSequenceDashboard + +} // WizardSequenceDashboard diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceLinear.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceLinear.java new file mode 100644 index 00000000..f1dfa580 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceLinear.java @@ -0,0 +1,65 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.controller; + +import java.util.*; + +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; + +public class WizardSequenceLinear extends WizardSequence { + + public WizardSequenceLinear(boolean userIsAuthorizedToSeeLog) { + super(); + + add(AppConstants.WS_TABLES); + add(AppConstants.WS_COLUMNS); + add(AppConstants.WS_FORM_FIELDS); + add(AppConstants.WS_FILTERS); + add(AppConstants.WS_SORTING); + //add(AppConstants.WS_JAVASCRIPT); + //add(AppConstants.WS_CHART); + add(AppConstants.WS_USER_ACCESS); + //add(AppConstants.WS_SCHEDULE); + if (userIsAuthorizedToSeeLog) + if (Globals.getEnableReportLog()) + add(AppConstants.WS_REPORT_LOG); + add(AppConstants.WS_RUN); + } // WizardSequenceLinear + +} // WizardSequenceLinear diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedCrossTab.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedCrossTab.java new file mode 100644 index 00000000..db10147d --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedCrossTab.java @@ -0,0 +1,62 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.controller; + +import java.util.*; + +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; + +public class WizardSequenceSQLBasedCrossTab extends WizardSequence { + + public WizardSequenceSQLBasedCrossTab(boolean userIsAuthorizedToSeeLog) { + super(); + + add(AppConstants.WS_SQL); + add(AppConstants.WS_COLUMNS); + add(AppConstants.WS_FORM_FIELDS); + add(AppConstants.WS_JAVASCRIPT); + add(AppConstants.WS_USER_ACCESS); + //add(AppConstants.WS_SCHEDULE); + if (userIsAuthorizedToSeeLog) + if (Globals.getEnableReportLog()) + add(AppConstants.WS_REPORT_LOG); + add(AppConstants.WS_RUN); + } // WizardSequenceSQLBasedCrossTab + +} // WizardSequenceSQLBasedCrossTab diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedHive.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedHive.java new file mode 100644 index 00000000..2243257d --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedHive.java @@ -0,0 +1,64 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.controller; + +import java.util.*; + +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; + +public class WizardSequenceSQLBasedHive extends WizardSequence { + + public WizardSequenceSQLBasedHive(boolean userIsAuthorizedToSeeLog) { + super(); + + add(AppConstants.WS_SQL); + add(AppConstants.WS_COLUMNS); + add(AppConstants.WS_FORM_FIELDS); + add(AppConstants.WS_JAVASCRIPT); + add(AppConstants.WS_CHART); + add(AppConstants.WS_USER_ACCESS); + //add(AppConstants.WS_MAP); + //add(AppConstants.WS_SCHEDULE); + if (userIsAuthorizedToSeeLog) + if (Globals.getEnableReportLog()) + add(AppConstants.WS_REPORT_LOG); + add(AppConstants.WS_RUN); + } // WizardSequenceSQLBasedHive + +} // WizardSequenceSQLBasedHive diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedLinear.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedLinear.java new file mode 100644 index 00000000..4f30d312 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedLinear.java @@ -0,0 +1,65 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.controller; + +import java.util.*; + +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; + +public class WizardSequenceSQLBasedLinear extends WizardSequence { + + public WizardSequenceSQLBasedLinear(boolean userIsAuthorizedToSeeLog) { + super(); + + add(AppConstants.WS_SQL); + add(AppConstants.WS_COLUMNS); + add(AppConstants.WS_FORM_FIELDS); + //add(AppConstants.WS_JAVASCRIPT); + //if(!Globals.showAnimatedChartOnly()) + //add(AppConstants.WS_CHART); + add(AppConstants.WS_USER_ACCESS); + //add(AppConstants.WS_MAP); + //add(AppConstants.WS_SCHEDULE); + if (userIsAuthorizedToSeeLog) + if (Globals.getEnableReportLog()) + add(AppConstants.WS_REPORT_LOG); + add(AppConstants.WS_RUN); + } // WizardSequenceSQLBasedLinear + +} // WizardSequenceSQLBasedLinear diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedLinearDatamining.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedLinearDatamining.java new file mode 100644 index 00000000..2feea9a4 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/WizardSequenceSQLBasedLinearDatamining.java @@ -0,0 +1,64 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.controller; + +import java.util.*; + +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; + +public class WizardSequenceSQLBasedLinearDatamining extends WizardSequence { + + public WizardSequenceSQLBasedLinearDatamining(boolean userIsAuthorizedToSeeLog) { + super(); + + add(AppConstants.WS_SQL); + add(AppConstants.WS_COLUMNS); + add(AppConstants.WS_FORM_FIELDS); + add(AppConstants.WS_DATA_FORECASTING); + add(AppConstants.WS_JAVASCRIPT); + add(AppConstants.WS_CHART); + add(AppConstants.WS_USER_ACCESS); + //add(AppConstants.WS_SCHEDULE); + if (userIsAuthorizedToSeeLog) + if (Globals.getEnableReportLog()) + add(AppConstants.WS_REPORT_LOG); + add(AppConstants.WS_RUN); + } // WizardSequenceSQLBasedLinear + +} // WizardSequenceSQLBasedLinear diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorException.java new file mode 100644 index 00000000..4d192c25 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorException.java @@ -0,0 +1,53 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.error; + +public class RaptorException extends Exception { + + public RaptorException(String message) { + super(message); + } + + public RaptorException(String message, Throwable ex) { + super(message, ex); + } + + public RaptorException(Throwable ex) { + super(ex); + } +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorRuntimeException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorRuntimeException.java new file mode 100644 index 00000000..111d045a --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorRuntimeException.java @@ -0,0 +1,54 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.error; + +public class RaptorRuntimeException extends RaptorException { + + public RaptorRuntimeException (String message) { + super(message); + } + + public RaptorRuntimeException (String message, Throwable ex) { + super(message, ex); + } + + public RaptorRuntimeException (Throwable ex) { + super(ex); + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorSchedularException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorSchedularException.java new file mode 100644 index 00000000..fe8c9b31 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/RaptorSchedularException.java @@ -0,0 +1,54 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.error; + +public class RaptorSchedularException extends RaptorException { + + public RaptorSchedularException (String message) { + super(message); + } + + public RaptorSchedularException (String message, Throwable ex) { + super(message, ex); + } + + public RaptorSchedularException (Throwable ex) { + super(ex); + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/ReportSQLException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/ReportSQLException.java new file mode 100644 index 00000000..7475df48 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/ReportSQLException.java @@ -0,0 +1,69 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.error; + +public class ReportSQLException extends RaptorException { + private String reportSQL = null; + + public ReportSQLException(String message, String reportSQL) { + super(message); + + this.reportSQL = reportSQL; + } // ReportSQLException + + public ReportSQLException(String message, String reportSQL, Throwable ex) { + super(message, ex); + + this.reportSQL = reportSQL; + } // ReportSQLException + + public ReportSQLException(String message) { + super(message); + this.reportSQL = ""; + } // ReportSQLException + + public ReportSQLException(String message, Throwable ex) { + super(message, ex); + this.reportSQL = ""; + } // ReportSQLException + + public String getReportSQL() { + return reportSQL; + } // getReportSQL + +} // ReportSQLException diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/UserAccessException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/UserAccessException.java new file mode 100644 index 00000000..7cae7f0b --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/UserAccessException.java @@ -0,0 +1,52 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.error; + +public class UserAccessException extends RaptorRuntimeException { + + public UserAccessException(Throwable ex) { + super(ex); + } // UserAccessException + + public UserAccessException(String reportID, String userName, String accessType) { + //super("User " + userName + " does NOT have " + accessType + " permission for report " + // + reportID); + super("Access denied. Please contact Administrator"); + } // UserAccessException + +} // UserAccessException diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/UserDefinedException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/UserDefinedException.java new file mode 100644 index 00000000..7675d8db --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/UserDefinedException.java @@ -0,0 +1,54 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +/** + * + */ +package org.onap.portalsdk.analytics.error; + +/** + * @author sundar + * This class is exclusively used to print error messages to user. + * + */ +public class UserDefinedException extends RaptorRuntimeException { + + public UserDefinedException(String message) { + super(message); + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/ValidationException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/ValidationException.java new file mode 100644 index 00000000..6dd7e601 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/error/ValidationException.java @@ -0,0 +1,60 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.error; + +public class ValidationException extends RaptorRuntimeException { + private String fieldID = null; + + public ValidationException(String message) { + super(message); + } + + public ValidationException(String message, Throwable ex) { + super(message, ex); + } + + public ValidationException(String fieldID, String message) { + super(message); + this.fieldID = fieldID; + } + + public String getFieldID() { + return fieldID; + } + +} // ValidationException diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/line/Line.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/Line.java index 5e9b840c..31bfa81b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/line/Line.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/Line.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.line; +package org.onap.portalsdk.analytics.gmap.line; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; -import org.openecomp.portalsdk.analytics.gmap.map.NovaMap; +import org.onap.portalsdk.analytics.gmap.map.NovaMap; public class Line { private NovaMap map; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/line/LineCollection.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineCollection.java index 18ccba65..cead8219 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/line/LineCollection.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineCollection.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.line; +package org.onap.portalsdk.analytics.gmap.line; import java.util.ArrayList; import java.util.HashSet; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/line/LineInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineInfo.java index b48264fb..e19fe349 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/line/LineInfo.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/line/LineInfo.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.line; +package org.onap.portalsdk.analytics.gmap.line; import java.util.ArrayList; import java.util.HashMap; @@ -26,7 +44,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.openecomp.portalsdk.analytics.gmap.map.GeoCoordinate; +import org.onap.portalsdk.analytics.gmap.map.GeoCoordinate; public class LineInfo { public GeoCoordinate geoCoordinate1; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/ColorProperties.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/ColorProperties.java index 3094dcd7..d620fbd7 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/ColorProperties.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/ColorProperties.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.map; +package org.onap.portalsdk.analytics.gmap.map; import java.awt.Color; import java.util.ArrayList; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/GMapProperties.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/GMapProperties.java new file mode 100644 index 00000000..412cc813 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/GMapProperties.java @@ -0,0 +1,67 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.gmap.map; + +import java.io.InputStream; +import java.util.Properties; + +import org.onap.portalsdk.analytics.system.Globals; + +public class GMapProperties { + + public static String getProjectFolder() { + return Globals.getProjectFolder(); + } + + public static String getMarketShapefileFolder() { + return Globals.getMarketShapefileFolder(); + } + + public static String getTileSize() { + return Globals.getTileSize(); + } + + public static String getOutputFolder() { + return Globals.getOutputFolder(); + } + + public static String getTempFolderURL() { + return Globals.getTempFolderURL(); + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/GeoCoordinate.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/GeoCoordinate.java new file mode 100644 index 00000000..a7d7d984 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/GeoCoordinate.java @@ -0,0 +1,43 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.gmap.map; + +public class GeoCoordinate { + public double longitude; + public double latitude; +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/MapConstant.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/MapConstant.java index b0fd59cc..d56194c6 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/MapConstant.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/MapConstant.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.map; +package org.onap.portalsdk.analytics.gmap.map; public class MapConstant { public static final String CURSOR = "CURSOR"; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/NovaMap.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java index 04a0416d..6938273f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/NovaMap.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/NovaMap.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.map; +package org.onap.portalsdk.analytics.gmap.map; import java.awt.Color; import java.awt.Font; @@ -33,11 +51,11 @@ import java.util.HashSet; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.gmap.line.Line; -import org.openecomp.portalsdk.analytics.gmap.line.LineInfo; -import org.openecomp.portalsdk.analytics.gmap.map.layer.SwingLayer; -import org.openecomp.portalsdk.analytics.gmap.node.Node; -import org.openecomp.portalsdk.analytics.gmap.node.NodeInfo; +import org.onap.portalsdk.analytics.gmap.line.Line; +import org.onap.portalsdk.analytics.gmap.line.LineInfo; +import org.onap.portalsdk.analytics.gmap.map.layer.SwingLayer; +import org.onap.portalsdk.analytics.gmap.node.Node; +import org.onap.portalsdk.analytics.gmap.node.NodeInfo; public class NovaMap { private static int[] shapeWidth; @@ -392,7 +410,6 @@ public class NovaMap { checkTransform(geoArea); - boolean shapefileLayerPainted = false; boolean swingLayerPainted = false; Object object = request.getAttribute("server_process_interrupted"); @@ -410,7 +427,7 @@ public class NovaMap { //if(showLegend) layer.paintLegend(g2Legend); g2d.dispose(); - if(showLegend) + if(showLegend && g2Legend != null) g2Legend.dispose(); object = request.getAttribute("server_process_interrupted"); @@ -418,7 +435,7 @@ public class NovaMap { System.out.println("interrupted"); return imageArr; } - else if (!shapefileLayerPainted && !swingLayerPainted) { + else if (!swingLayerPainted) { System.out.println("not painted"); return imageArr; } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/layer/SwingLayer.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java index 1c2ebed7..df3623be 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/layer/SwingLayer.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/map/layer/SwingLayer.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.map.layer; +package org.onap.portalsdk.analytics.gmap.map.layer; import java.awt.Color; import java.awt.Font; @@ -37,12 +55,12 @@ import java.util.Set; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.gmap.map.ColorProperties; -import org.openecomp.portalsdk.analytics.gmap.map.MapConstant; -import org.openecomp.portalsdk.analytics.gmap.map.NovaMap; -import org.openecomp.portalsdk.analytics.gmap.node.Node; -import org.openecomp.portalsdk.analytics.gmap.node.NodeInfo; -import org.openecomp.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.gmap.map.ColorProperties; +import org.onap.portalsdk.analytics.gmap.map.MapConstant; +import org.onap.portalsdk.analytics.gmap.map.NovaMap; +import org.onap.portalsdk.analytics.gmap.node.Node; +import org.onap.portalsdk.analytics.gmap.node.NodeInfo; +import org.onap.portalsdk.analytics.system.Globals; public class SwingLayer { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/node/Node.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/Node.java index 8b0c66ae..6188cee1 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/node/Node.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/Node.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.node; +package org.onap.portalsdk.analytics.gmap.node; import java.awt.geom.Point2D; import java.util.ArrayList; @@ -28,8 +46,8 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import org.openecomp.portalsdk.analytics.gmap.map.MapConstant; -import org.openecomp.portalsdk.analytics.gmap.map.NovaMap; +import org.onap.portalsdk.analytics.gmap.map.MapConstant; +import org.onap.portalsdk.analytics.gmap.map.NovaMap; public class Node { private Set<String> nodeIDSet; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/node/NodeCollection.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java index f5f301d7..c54b268a 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/node/NodeCollection.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeCollection.java @@ -1,30 +1,53 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.node; +package org.onap.portalsdk.analytics.gmap.node; import java.util.HashMap; import java.util.HashSet; import java.util.Set; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; + public class NodeCollection { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(NodeCollection.class); + private Set<String> selectedNode; // all selected node private String nodeID; // last clicked node private HashMap<String,NodeInfo> nodeCollection; @@ -67,10 +90,10 @@ public class NodeCollection { } public void addNode(NodeInfo nodeInfo) { - if (nodeInfo == null) { - System.out.println("nodeInfo is null"); - } - nodeCollection.put(nodeInfo.getNodeID()+""+nodeInfo.getNodeType(), nodeInfo); + if (nodeInfo == null) + logger.error("addNode: nodeInfo is null"); + else + nodeCollection.put(nodeInfo.getNodeID()+""+nodeInfo.getNodeType(), nodeInfo); } public HashMap<String,NodeInfo> getNodeCollection() { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/node/NodeInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeInfo.java index 06dedd1e..0ed7b842 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/node/NodeInfo.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/node/NodeInfo.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.node; +package org.onap.portalsdk.analytics.gmap.node; import java.util.ArrayList; import java.util.Iterator; @@ -27,7 +45,7 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.TreeMap; -import org.openecomp.portalsdk.analytics.gmap.map.GeoCoordinate; +import org.onap.portalsdk.analytics.gmap.map.GeoCoordinate; public class NodeInfo { public static final String NUMBER_OF_T1_KEY = "x_numberOfT1"; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/utils/MapUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/MapUtils.java index d3b7e894..277dac0f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/utils/MapUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/MapUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.utils; +package org.onap.portalsdk.analytics.gmap.utils; import java.io.ObjectOutputStream; import java.text.SimpleDateFormat; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/utils/SwingWorker.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/SwingWorker.java index 66fd9005..eeac444c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/utils/SwingWorker.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/SwingWorker.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.gmap.utils; +package org.onap.portalsdk.analytics.gmap.utils; import javax.swing.SwingUtilities; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/DataCache.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/DataCache.java index b62853d0..e5677b7a 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/DataCache.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/DataCache.java @@ -1,37 +1,55 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model; +package org.onap.portalsdk.analytics.model; import java.util.*; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.model.definition.*; -import org.openecomp.portalsdk.analytics.model.runtime.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.model.definition.*; +import org.onap.portalsdk.analytics.model.runtime.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; -public class DataCache extends org.openecomp.portalsdk.analytics.RaptorObject { +public class DataCache extends org.onap.portalsdk.analytics.RaptorObject { private static Vector dataViewActions = null; private static Vector publicReportIdNames = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/ReportHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java index 98e0b0f7..1d173784 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/ReportHandler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ /* =========================================================================================== * This class is part of <I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I> @@ -38,7 +56,7 @@ * row as short is not expoting more than 32768 rows. </LI></UL> * */ -package org.openecomp.portalsdk.analytics.model; +package org.onap.portalsdk.analytics.model; import java.io.BufferedInputStream; import java.io.BufferedWriter; @@ -116,38 +134,38 @@ import org.apache.poi.xssf.usermodel.XSSFFont; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.openecomp.portalsdk.analytics.controller.ErrorHandler; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.model.definition.ReportDefinition; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.ExecuteQuery; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.ExcelColorDef; -import org.openecomp.portalsdk.analytics.util.HtmlStripper; -import org.openecomp.portalsdk.analytics.util.Log; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; -import org.openecomp.portalsdk.analytics.view.ColumnHeaderRow; -import org.openecomp.portalsdk.analytics.view.DataRow; -import org.openecomp.portalsdk.analytics.view.DataValue; -import org.openecomp.portalsdk.analytics.view.HtmlFormatter; -import org.openecomp.portalsdk.analytics.view.ReportData; -import org.openecomp.portalsdk.analytics.view.RowHeader; -import org.openecomp.portalsdk.analytics.view.RowHeaderCol; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.DataSourceType; -import org.openecomp.portalsdk.analytics.xmlobj.FormatList; -import org.openecomp.portalsdk.analytics.xmlobj.FormatType; -import org.openecomp.portalsdk.analytics.xmlobj.Reports; -import org.openecomp.portalsdk.analytics.xmlobj.SemaphoreList; -import org.openecomp.portalsdk.analytics.xmlobj.SemaphoreType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.controller.ErrorHandler; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.model.definition.ReportDefinition; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.ExecuteQuery; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.ExcelColorDef; +import org.onap.portalsdk.analytics.util.HtmlStripper; +import org.onap.portalsdk.analytics.util.Log; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.view.ColumnHeader; +import org.onap.portalsdk.analytics.view.ColumnHeaderRow; +import org.onap.portalsdk.analytics.view.DataRow; +import org.onap.portalsdk.analytics.view.DataValue; +import org.onap.portalsdk.analytics.view.HtmlFormatter; +import org.onap.portalsdk.analytics.view.ReportData; +import org.onap.portalsdk.analytics.view.RowHeader; +import org.onap.portalsdk.analytics.view.RowHeaderCol; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.DataSourceType; +import org.onap.portalsdk.analytics.xmlobj.FormatList; +import org.onap.portalsdk.analytics.xmlobj.FormatType; +import org.onap.portalsdk.analytics.xmlobj.Reports; +import org.onap.portalsdk.analytics.xmlobj.SemaphoreList; +import org.onap.portalsdk.analytics.xmlobj.SemaphoreType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import com.lowagie.text.Document; import com.lowagie.text.Paragraph; @@ -156,9 +174,9 @@ import com.lowagie.text.html.simpleparser.StyleSheet; import com.lowagie.text.pdf.PdfPTable; //import javax.servlet.RequestDispatcher; -public class ReportHandler extends org.openecomp.portalsdk.analytics.RaptorObject { +public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportHandler.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportHandler.class); public ReportHandler() { } @@ -3326,7 +3344,7 @@ public class ReportHandler extends org.openecomp.portalsdk.analytics.RaptorObjec if(count==1) { if(nvl(rr.getTemplateFile()).length()>0) { - readTemplate = new FileInputStream(org.openecomp.portalsdk.analytics.system.AppUtils.getExcelTemplatePath()+rr.getTemplateFile()); + readTemplate = new FileInputStream(org.onap.portalsdk.analytics.system.AppUtils.getExcelTemplatePath()+rr.getTemplateFile()); wb=new XSSFWorkbook(readTemplate); } else { //copy the os file to new file and open new file in below line @@ -3470,7 +3488,7 @@ public class ReportHandler extends org.openecomp.portalsdk.analytics.RaptorObjec } else { os = new FileOutputStream(AppUtils.getTempFolderPath()+ filename+"T."+ nvls(extension, "xlsx")); - FileInputStream readTemplate = new FileInputStream(org.openecomp.portalsdk.analytics.system.AppUtils.getExcelTemplatePath()+rr.getTemplateFile()); + FileInputStream readTemplate = new FileInputStream(org.onap.portalsdk.analytics.system.AppUtils.getExcelTemplatePath()+rr.getTemplateFile()); wb=new XSSFWorkbook(readTemplate); if (rr != null) styles = loadXSSFStyles(rr, wb, styles); @@ -5498,12 +5516,12 @@ public class ReportHandler extends org.openecomp.portalsdk.analytics.RaptorObjec sw.insertRow(rowNum); cellNum = 0; - sw.createCell(cellNum, org.openecomp.portalsdk.analytics.system.Globals.getFooterFirstLine().replaceAll("&", "&"), styleDefaultCell.getIndex()); + sw.createCell(cellNum, org.onap.portalsdk.analytics.system.Globals.getFooterFirstLine().replaceAll("&", "&"), styleDefaultCell.getIndex()); sw.endRow(); rowNum += 1; sw.insertRow(rowNum); cellNum = 0; - sw.createCell(cellNum, org.openecomp.portalsdk.analytics.system.Globals.getFooterSecondLine().replaceAll("&", "&"), styleDefaultCell.getIndex()); + sw.createCell(cellNum, org.onap.portalsdk.analytics.system.Globals.getFooterSecondLine().replaceAll("&", "&"), styleDefaultCell.getIndex()); sw.endRow(); } @@ -6123,12 +6141,12 @@ public class ReportHandler extends org.openecomp.portalsdk.analytics.RaptorObjec sw.insertRow(rowNum); cellNum = 0; - sw.createCell(cellNum, org.openecomp.portalsdk.analytics.system.Globals.getFooterFirstLine().replaceAll("&", "&"), styleDefaultCell.getIndex()); + sw.createCell(cellNum, org.onap.portalsdk.analytics.system.Globals.getFooterFirstLine().replaceAll("&", "&"), styleDefaultCell.getIndex()); sw.endRow(); rowNum += 1; sw.insertRow(rowNum); cellNum = 0; - sw.createCell(cellNum, org.openecomp.portalsdk.analytics.system.Globals.getFooterSecondLine().replaceAll("&", "&"), styleDefaultCell.getIndex()); + sw.createCell(cellNum, org.onap.portalsdk.analytics.system.Globals.getFooterSecondLine().replaceAll("&", "&"), styleDefaultCell.getIndex()); sw.endRow(); } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/ReportLoader.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java index 6ad26732..fa30fc32 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/ReportLoader.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ /* =========================================================================================== * This class is part of <I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I> @@ -36,7 +54,7 @@ * "admin_role_equiv_to_super_role" in raptor.properties is Y. A check is made in corresponding to that. </LI></UL> * */ -package org.openecomp.portalsdk.analytics.model; +package org.onap.portalsdk.analytics.model; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -56,27 +74,24 @@ import java.util.Vector; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.model.base.ReportWrapper; -import org.openecomp.portalsdk.analytics.model.definition.ReportLogEntry; -import org.openecomp.portalsdk.analytics.model.search.ReportSearchResult; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.system.fusion.domain.QuickLink; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - -public class ReportLoader extends org.openecomp.portalsdk.analytics.RaptorObject { +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.model.base.ReportWrapper; +import org.onap.portalsdk.analytics.model.definition.ReportLogEntry; +import org.onap.portalsdk.analytics.model.search.ReportSearchResult; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.system.fusion.domain.QuickLink; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportLoader.class); +public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject { - - //private static Properties sqlProperty; + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportLoader.class); public static String loadCustomReportXML(String reportID) throws RaptorException { Connection connection = DbUtils.getConnection(); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/SearchHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/SearchHandler.java index eb9ceb65..5d71d147 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/SearchHandler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/SearchHandler.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ /* =========================================================================================== * This class is part of <I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I> @@ -41,20 +59,20 @@ * </UL> * */ -package org.openecomp.portalsdk.analytics.model; +package org.onap.portalsdk.analytics.model; import java.io.*; import java.sql.*; import java.util.*; import javax.servlet.http.*; -import org.openecomp.portalsdk.analytics.controller.*; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.search.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.controller.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.search.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; -public class SearchHandler extends org.openecomp.portalsdk.analytics.RaptorObject { +public class SearchHandler extends org.onap.portalsdk.analytics.RaptorObject { private static final String HTML_FORM = "forma"; private final static String PRIVATE_ICON = "<img border=0 src=" + AppUtils.getImgFolderURL() diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ChartSeqComparator.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ChartSeqComparator.java new file mode 100644 index 00000000..7e6246ce --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ChartSeqComparator.java @@ -0,0 +1,67 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.base; + +import java.util.Comparator; + +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; + +public class ChartSeqComparator implements Comparator { + + public int compare(Object o1, Object o2) { + DataColumnType dct1 = (DataColumnType) o1; + DataColumnType dct2 = (DataColumnType) o2; + + int dct1ChartSeq = (dct1.getChartSeq()!=null ? dct1.getChartSeq().intValue(): -1); + int dct2ChartSeq = (dct2.getChartSeq()!=null ? dct2.getChartSeq().intValue(): -1); + + if (dct1ChartSeq == dct2ChartSeq) + return 0; + else if (dct1ChartSeq < 0) // Position columns + // with seq -1 at + // the end + return 1; + else if (dct2ChartSeq < 0) + return -1; + else if (dct1ChartSeq < dct2ChartSeq) + return -1; + else + return 1; + } // compare + +} // ChartSeqComparator diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameColLookup.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameColLookup.java new file mode 100644 index 00000000..aef09763 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameColLookup.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.base; + +import java.util.*; + +public class IdNameColLookup extends IdNameLookup { + private String colId = null; + + public IdNameColLookup(String colId, String dbTableName, String dbIdField, + String dbNameField, String dbSortByField) { + super(dbTableName, dbIdField, dbNameField, dbSortByField, false); + this.colId = colId; + } // IdNameColLookup + + public String getColId() { + return colId; + } + +} // IdNameColLookup diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameList.java index 1a502fa6..3e88a8c1 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameList.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.base; +package org.onap.portalsdk.analytics.model.base; import java.util.*; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.system.*; public class IdNameList extends Vector { protected int pageNo = -1; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameLookup.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameLookup.java index 7bee36e6..69179e33 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameLookup.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameLookup.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.base; +package org.onap.portalsdk.analytics.model.base; import java.util.*; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.*; -import org.openecomp.portalsdk.analytics.model.runtime.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.*; +import org.onap.portalsdk.analytics.model.runtime.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; public class IdNameLookup extends IdNameSql { private String dbTableName = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameSql.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java index 173cfb11..ec063a80 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameSql.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ /* =========================================================================================== * This class is part of <I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I> @@ -35,22 +53,21 @@ * Database. * */ -package org.openecomp.portalsdk.analytics.model.base; +package org.onap.portalsdk.analytics.model.base; -import java.util.*; +import java.util.HashMap; -import org.openecomp.portalsdk.analytics.controller.ActionHandler; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.*; -import org.openecomp.portalsdk.analytics.model.runtime.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class IdNameSql extends IdNameList { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(IdNameSql.class); - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(IdNameSql.class); protected int dataSize = -1; @@ -198,7 +215,7 @@ public class IdNameSql extends IdNameList { String dbType = Globals.getDBType(); if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameValue.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameValue.java index d7566ab7..2e1dfb13 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameValue.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameValue.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.base; +package org.onap.portalsdk.analytics.model.base; public class IdNameValue { private String id = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/NameComparator.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/NameComparator.java new file mode 100644 index 00000000..ed0c3975 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/NameComparator.java @@ -0,0 +1,52 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.base; + +import java.util.Comparator; + +import org.onap.portalsdk.analytics.model.base.IdNameValue; + +public class NameComparator implements Comparator { + + public int compare(Object o1, Object o2) { + return ((IdNameValue) o1).getName() + .compareToIgnoreCase((((IdNameValue) o2).getName())); + } // compare + +} // NameComparator + diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/OrderBySeqComparator.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/OrderBySeqComparator.java new file mode 100644 index 00000000..3ec14321 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/OrderBySeqComparator.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.base; + +import java.util.Comparator; + +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; + +public class OrderBySeqComparator implements Comparator { + + public int compare(Object o1, Object o2) { + if (((DataColumnType) o1).getOrderBySeq() == ((DataColumnType) o2).getOrderBySeq()) + return 0; + else if (((DataColumnType) o1).getOrderBySeq() < ((DataColumnType) o2).getOrderBySeq()) + return -1; + else + return 1; + } // compare + +} // OrderSeqComparator diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/OrderSeqComparator.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/OrderSeqComparator.java new file mode 100644 index 00000000..66aa2a22 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/OrderSeqComparator.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.base; + +import java.util.Comparator; + +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; + +public class OrderSeqComparator implements Comparator { + + public int compare(Object o1, Object o2) { + if (((DataColumnType) o1).getOrderSeq() == ((DataColumnType) o2).getOrderSeq()) + return 0; + else if (((DataColumnType) o1).getOrderSeq() < ((DataColumnType) o2).getOrderSeq()) + return -1; + else + return 1; + } // compare + +} // OrderSeqComparator diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ReportSecurity.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportSecurity.java index 0466c1cd..a7ef8592 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ReportSecurity.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportSecurity.java @@ -1,43 +1,63 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.base; +package org.onap.portalsdk.analytics.model.base; -import java.io.*; -import java.sql.*; -import java.util.*; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.Vector; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.controller.ActionHandler; -import org.openecomp.portalsdk.analytics.error.*; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.model.definition.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - -public class ReportSecurity extends org.openecomp.portalsdk.analytics.RaptorObject { +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.UserAccessException; +import org.onap.portalsdk.analytics.model.definition.SecurityEntry; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportSecurity.class); +public class ReportSecurity extends org.onap.portalsdk.analytics.RaptorObject { + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportSecurity.class); private String reportID = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ReportUserRole.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportUserRole.java index 3563fc9a..2d6bd6d4 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ReportUserRole.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportUserRole.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.base; +package org.onap.portalsdk.analytics.model.base; import java.io.*; import java.sql.*; @@ -30,16 +48,16 @@ import javax.persistence.Id; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.controller.ActionHandler; -import org.openecomp.portalsdk.analytics.error.*; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.model.definition.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.controller.ActionHandler; +import org.onap.portalsdk.analytics.error.*; +import org.onap.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.model.definition.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; @Entity -public class ReportUserRole extends org.openecomp.portalsdk.analytics.RaptorObject implements Serializable { +public class ReportUserRole extends org.onap.portalsdk.analytics.RaptorObject implements Serializable { /** * diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ReportWrapper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java index 27967249..7dcf1afc 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ReportWrapper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.base; +package org.onap.portalsdk.analytics.model.base; import java.io.StringWriter; import java.util.ArrayList; @@ -45,52 +63,52 @@ import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import javax.xml.transform.stream.StreamResult; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.error.UserDefinedException; -import org.openecomp.portalsdk.analytics.model.DataCache; -import org.openecomp.portalsdk.analytics.model.ReportLoader; -import org.openecomp.portalsdk.analytics.model.definition.TableSource; -import org.openecomp.portalsdk.analytics.model.runtime.FormField; -import org.openecomp.portalsdk.analytics.model.runtime.ReportParamValues; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.SQLCorrector; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.xmlobj.ChartAdditionalOptions; -import org.openecomp.portalsdk.analytics.xmlobj.ChartDrillFormfield; -import org.openecomp.portalsdk.analytics.xmlobj.ChartDrillOptions; -import org.openecomp.portalsdk.analytics.xmlobj.ColFilterList; -import org.openecomp.portalsdk.analytics.xmlobj.ColFilterType; -import org.openecomp.portalsdk.analytics.xmlobj.CustomReportType; -import org.openecomp.portalsdk.analytics.xmlobj.DashboardEditorList; -import org.openecomp.portalsdk.analytics.xmlobj.DashboardReports; -import org.openecomp.portalsdk.analytics.xmlobj.DashboardReportsNew; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnList; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.DataSourceList; -import org.openecomp.portalsdk.analytics.xmlobj.DataSourceType; -import org.openecomp.portalsdk.analytics.xmlobj.DataminingOptions; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldList; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.analytics.xmlobj.FormatList; -import org.openecomp.portalsdk.analytics.xmlobj.FormatType; -import org.openecomp.portalsdk.analytics.xmlobj.JavascriptItemType; -import org.openecomp.portalsdk.analytics.xmlobj.JavascriptList; -import org.openecomp.portalsdk.analytics.xmlobj.Marker; -import org.openecomp.portalsdk.analytics.xmlobj.ObjectFactory; -import org.openecomp.portalsdk.analytics.xmlobj.PDFAdditionalOptions; -import org.openecomp.portalsdk.analytics.xmlobj.PredefinedValueList; -import org.openecomp.portalsdk.analytics.xmlobj.ReportMap; -import org.openecomp.portalsdk.analytics.xmlobj.Reports; -import org.openecomp.portalsdk.analytics.xmlobj.SemaphoreList; -import org.openecomp.portalsdk.analytics.xmlobj.SemaphoreType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.error.UserDefinedException; +import org.onap.portalsdk.analytics.model.DataCache; +import org.onap.portalsdk.analytics.model.ReportLoader; +import org.onap.portalsdk.analytics.model.definition.TableSource; +import org.onap.portalsdk.analytics.model.runtime.FormField; +import org.onap.portalsdk.analytics.model.runtime.ReportParamValues; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.SQLCorrector; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.xmlobj.ChartAdditionalOptions; +import org.onap.portalsdk.analytics.xmlobj.ChartDrillFormfield; +import org.onap.portalsdk.analytics.xmlobj.ChartDrillOptions; +import org.onap.portalsdk.analytics.xmlobj.ColFilterList; +import org.onap.portalsdk.analytics.xmlobj.ColFilterType; +import org.onap.portalsdk.analytics.xmlobj.CustomReportType; +import org.onap.portalsdk.analytics.xmlobj.DashboardEditorList; +import org.onap.portalsdk.analytics.xmlobj.DashboardReports; +import org.onap.portalsdk.analytics.xmlobj.DashboardReportsNew; +import org.onap.portalsdk.analytics.xmlobj.DataColumnList; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.DataSourceList; +import org.onap.portalsdk.analytics.xmlobj.DataSourceType; +import org.onap.portalsdk.analytics.xmlobj.DataminingOptions; +import org.onap.portalsdk.analytics.xmlobj.FormFieldList; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.analytics.xmlobj.FormatList; +import org.onap.portalsdk.analytics.xmlobj.FormatType; +import org.onap.portalsdk.analytics.xmlobj.JavascriptItemType; +import org.onap.portalsdk.analytics.xmlobj.JavascriptList; +import org.onap.portalsdk.analytics.xmlobj.Marker; +import org.onap.portalsdk.analytics.xmlobj.ObjectFactory; +import org.onap.portalsdk.analytics.xmlobj.PDFAdditionalOptions; +import org.onap.portalsdk.analytics.xmlobj.PredefinedValueList; +import org.onap.portalsdk.analytics.xmlobj.ReportMap; +import org.onap.portalsdk.analytics.xmlobj.Reports; +import org.onap.portalsdk.analytics.xmlobj.SemaphoreList; +import org.onap.portalsdk.analytics.xmlobj.SemaphoreType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; /**<HR/> * This class is part of <B><I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I></B><BR/> @@ -116,10 +134,9 @@ import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; * */ -public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObject { - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportWrapper.class); +public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject { + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportWrapper.class); protected CustomReportType cr = null; @@ -1559,7 +1576,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec String userID = AppUtils.getUserID(request); if (getReportDefType().equals(AppConstants.RD_SQL_BASED) && (!Globals.getAllowSQLBasedReports()) && (!AppUtils.isAdminUser(request))) - throw new org.openecomp.portalsdk.analytics.error.UserAccessException(reportID, "[" + userID + "] " + throw new org.onap.portalsdk.analytics.error.UserAccessException(reportID, "[" + userID + "] " + AppUtils.getUserName(request), AppConstants.UA_WRITE); } // verifySQLBasedReportAccess @@ -1574,7 +1591,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec // true) or another report (return false) private boolean isViewAction(String value) throws RaptorException { try { - Vector viewActions = org.openecomp.portalsdk.analytics.model.DataCache.getDataViewActions(); + Vector viewActions = org.onap.portalsdk.analytics.model.DataCache.getDataViewActions(); for (int i = 0; i < viewActions.size(); i++) if (value.equals(AppUtils.getBaseActionURL() + ((String) viewActions.get(i)))) @@ -2673,7 +2690,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec int posAnd = 0; if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); @@ -3650,7 +3667,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec String dbType = ""; if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); @@ -4136,7 +4153,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec String dbInfo = getDBInfo(); if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); @@ -4244,7 +4261,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec String dbInfo = getDBInfo(); if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); @@ -4354,7 +4371,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec String dbInfo = getDBInfo(); if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); @@ -4446,7 +4463,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec ObjectFactory objFactory = new ObjectFactory(); try { - JAXBContext jc = JAXBContext.newInstance("org.openecomp.portalsdk.analytics.xmlobj"); + JAXBContext jc = JAXBContext.newInstance("org.onap.portalsdk.analytics.xmlobj"); Marshaller m = jc.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); //JAXBElement jaxbElement = new JAXBElement(new QName("customReport"), Object.class, ""); @@ -4463,7 +4480,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec public static CustomReportType unmarshalCR(String reportXML) throws RaptorException { //CustomReport cr = null; try { - JAXBContext jc = JAXBContext.newInstance("org.openecomp.portalsdk.analytics.xmlobj"); + JAXBContext jc = JAXBContext.newInstance("org.onap.portalsdk.analytics.xmlobj"); Unmarshaller u = jc.createUnmarshaller(); javax.xml.bind.JAXBElement<CustomReportType> doc = (javax.xml.bind.JAXBElement<CustomReportType>) u.unmarshal(new java.io.StringReader( reportXML)); @@ -4598,7 +4615,7 @@ public class ReportWrapper extends org.openecomp.portalsdk.analytics.RaptorObjec public boolean isChartDrillDownContainsName(String name) { for (Iterator iter = getChartDrillOptions().getTargetFormfield().iterator(); iter .hasNext();) { - org.openecomp.portalsdk.analytics.xmlobj.ChartDrillFormfield cdf = (org.openecomp.portalsdk.analytics.xmlobj.ChartDrillFormfield) iter.next(); + org.onap.portalsdk.analytics.xmlobj.ChartDrillFormfield cdf = (org.onap.portalsdk.analytics.xmlobj.ChartDrillFormfield) iter.next(); if(cdf.getFormfield().equals(name)) { return true; } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/DBColumnInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/DBColumnInfo.java index 441cd231..6d02a1d5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/DBColumnInfo.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/DBColumnInfo.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition; +package org.onap.portalsdk.analytics.model.definition; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class DBColumnInfo extends RaptorObject { private String tableName = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/DrillDownParamDef.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/DrillDownParamDef.java index d6db9564..b024b487 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/DrillDownParamDef.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/DrillDownParamDef.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition; +package org.onap.portalsdk.analytics.model.definition; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class DrillDownParamDef extends RaptorObject { private String fieldName = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/Marker.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/Marker.java index 65153fc1..8cea0b56 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/Marker.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/Marker.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition; +package org.onap.portalsdk.analytics.model.definition; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class Marker extends RaptorObject { String markerColor = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/ReportDefinition.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java index 1e03b48b..9e8a6c94 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/ReportDefinition.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportDefinition.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition; +package org.onap.portalsdk.analytics.model.definition; import java.io.Serializable; import java.sql.Connection; @@ -36,44 +54,44 @@ import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; //import javax.xml.transform.stream.*; -import org.openecomp.portalsdk.analytics.controller.WizardSequence; -import org.openecomp.portalsdk.analytics.controller.WizardSequenceCrossTab; -import org.openecomp.portalsdk.analytics.controller.WizardSequenceDashboard; -import org.openecomp.portalsdk.analytics.controller.WizardSequenceLinear; -import org.openecomp.portalsdk.analytics.controller.WizardSequenceSQLBasedCrossTab; -import org.openecomp.portalsdk.analytics.controller.WizardSequenceSQLBasedHive; -import org.openecomp.portalsdk.analytics.controller.WizardSequenceSQLBasedLinear; -import org.openecomp.portalsdk.analytics.controller.WizardSequenceSQLBasedLinearDatamining; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.DataCache; -import org.openecomp.portalsdk.analytics.model.ReportLoader; -import org.openecomp.portalsdk.analytics.model.base.OrderBySeqComparator; -import org.openecomp.portalsdk.analytics.model.base.OrderSeqComparator; -import org.openecomp.portalsdk.analytics.model.base.ReportWrapper; -import org.openecomp.portalsdk.analytics.model.runtime.FormField; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.xmlobj.ChartAdditionalOptions; -import org.openecomp.portalsdk.analytics.xmlobj.ChartDrillOptions; -import org.openecomp.portalsdk.analytics.xmlobj.ColFilterType; -import org.openecomp.portalsdk.analytics.xmlobj.CustomReportType; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnList; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.DataSourceType; -import org.openecomp.portalsdk.analytics.xmlobj.DataminingOptions; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldList; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.analytics.xmlobj.FormatList; -import org.openecomp.portalsdk.analytics.xmlobj.FormatType; -import org.openecomp.portalsdk.analytics.xmlobj.JavascriptItemType; -import org.openecomp.portalsdk.analytics.xmlobj.ObjectFactory; -import org.openecomp.portalsdk.analytics.xmlobj.PredefinedValueList; -import org.openecomp.portalsdk.analytics.xmlobj.SemaphoreType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.controller.WizardSequence; +import org.onap.portalsdk.analytics.controller.WizardSequenceCrossTab; +import org.onap.portalsdk.analytics.controller.WizardSequenceDashboard; +import org.onap.portalsdk.analytics.controller.WizardSequenceLinear; +import org.onap.portalsdk.analytics.controller.WizardSequenceSQLBasedCrossTab; +import org.onap.portalsdk.analytics.controller.WizardSequenceSQLBasedHive; +import org.onap.portalsdk.analytics.controller.WizardSequenceSQLBasedLinear; +import org.onap.portalsdk.analytics.controller.WizardSequenceSQLBasedLinearDatamining; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.DataCache; +import org.onap.portalsdk.analytics.model.ReportLoader; +import org.onap.portalsdk.analytics.model.base.OrderBySeqComparator; +import org.onap.portalsdk.analytics.model.base.OrderSeqComparator; +import org.onap.portalsdk.analytics.model.base.ReportWrapper; +import org.onap.portalsdk.analytics.model.runtime.FormField; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.xmlobj.ChartAdditionalOptions; +import org.onap.portalsdk.analytics.xmlobj.ChartDrillOptions; +import org.onap.portalsdk.analytics.xmlobj.ColFilterType; +import org.onap.portalsdk.analytics.xmlobj.CustomReportType; +import org.onap.portalsdk.analytics.xmlobj.DataColumnList; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.DataSourceType; +import org.onap.portalsdk.analytics.xmlobj.DataminingOptions; +import org.onap.portalsdk.analytics.xmlobj.FormFieldList; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.analytics.xmlobj.FormatList; +import org.onap.portalsdk.analytics.xmlobj.FormatType; +import org.onap.portalsdk.analytics.xmlobj.JavascriptItemType; +import org.onap.portalsdk.analytics.xmlobj.ObjectFactory; +import org.onap.portalsdk.analytics.xmlobj.PredefinedValueList; +import org.onap.portalsdk.analytics.xmlobj.SemaphoreType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; /**<HR/> * This class is part of <B><I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I></B><BR/> @@ -95,8 +113,7 @@ import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; public class ReportDefinition extends ReportWrapper implements Serializable { - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportDefinition.class); - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportDefinition.class); private ReportSchedule reportSchedule = null; @@ -1176,7 +1193,7 @@ public class ReportDefinition extends ReportWrapper implements Serializable { if (colId != null) { if (!isParseSQLColID(colId)) - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "[" + colId + "] must either be a valid column id consisting only of letters, numbers, and underscores, or there must be a comma in front of it."); @@ -1273,7 +1290,7 @@ public class ReportDefinition extends ReportWrapper implements Serializable { boolean isCYMBALScript = false; if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); String dbType = remDbInfo.getDBType(dbInfo); if (dbType.equals("DAYTONA") && !(nextToken.toUpperCase().equals("SELECT"))) { isCYMBALScript = true; @@ -1288,7 +1305,7 @@ public class ReportDefinition extends ReportWrapper implements Serializable { if (nextToken.toUpperCase().equals("SELECT")) parsedSQL.append("SELECT "); else - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "The SQL must start with the SELECT keyword."); } else if (nextToken.toUpperCase().equals("DISTINCT") && parsedSQL.toString().equals("SELECT ")) { @@ -1296,7 +1313,7 @@ public class ReportDefinition extends ReportWrapper implements Serializable { } else if (nextToken.equals("*") && (parsedSQL.toString().equals("SELECT ") || parsedSQL.toString().equals( "SELECT DISTINCT "))) { - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "You cannot use \"SELECT *\". Please specify select columns/expressions."); } else if (nextToken.toUpperCase().equals("FROM")) { if (lastToken != null) { @@ -1338,7 +1355,7 @@ public class ReportDefinition extends ReportWrapper implements Serializable { else { String token = getNextSQLParseToken(sql, false); if (!token.toUpperCase().equals("FROM")) - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "|FROM keyword or a comma expected after [" + nextToken + "]."); @@ -1388,7 +1405,7 @@ public class ReportDefinition extends ReportWrapper implements Serializable { } if (updatedReportCols.size() == 0) - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "The SQL statement must have at least one column in the SELECT clause."); if (getDataSourceList().getDataSource().size() == 0) addDataSourceType(new ObjectFactory(), "du0", "DUAL", "", "DUAL", null, null, null); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/ReportLogEntry.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportLogEntry.java index 8f6cabc8..3704e38c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/ReportLogEntry.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportLogEntry.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition; +package org.onap.portalsdk.analytics.model.definition; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class ReportLogEntry extends RaptorObject { private String logTime = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/ReportMap.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportMap.java index 606157e5..8a294e99 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/ReportMap.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportMap.java @@ -1,32 +1,50 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition; +package org.onap.portalsdk.analytics.model.definition; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import org.openecomp.portalsdk.analytics.RaptorObject; -import org.openecomp.portalsdk.analytics.view.DataRow; -import org.openecomp.portalsdk.analytics.view.DataValue; -import org.openecomp.portalsdk.analytics.view.ReportData; +import org.onap.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.view.DataRow; +import org.onap.portalsdk.analytics.view.DataValue; +import org.onap.portalsdk.analytics.view.ReportData; public class ReportMap extends RaptorObject { String markerColor = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/ReportSchedule.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportSchedule.java index 8f20810e..23cf79f5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/ReportSchedule.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/ReportSchedule.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition; +package org.onap.portalsdk.analytics.model.definition; import java.io.IOException; import java.io.InputStreamReader; @@ -37,30 +55,29 @@ import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.RaptorObject; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.error.UserDefinedException; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.model.base.NameComparator; -import org.openecomp.portalsdk.analytics.model.runtime.FormField; -import org.openecomp.portalsdk.analytics.model.runtime.ReportParamValues; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.error.UserDefinedException; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.model.base.NameComparator; +import org.onap.portalsdk.analytics.model.runtime.FormField; +import org.onap.portalsdk.analytics.model.runtime.ReportParamValues; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class ReportSchedule extends RaptorObject { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportSchedule.class); - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportSchedule.class); private String reportID = null; @@ -514,7 +531,7 @@ public class ReportSchedule extends RaptorObject { int posAnd = 0; if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/SecurityEntry.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/SecurityEntry.java new file mode 100644 index 00000000..bd4d1549 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/SecurityEntry.java @@ -0,0 +1,62 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition; + +import org.onap.portalsdk.analytics.model.base.*; + +public class SecurityEntry extends IdNameValue { + private boolean readOnly = true; + + public SecurityEntry() { + super(); + } + + public SecurityEntry(String id, String name, boolean readOnly) { + super(id, name); + setReadOnly(readOnly); + } // SecurityEntry + + public boolean isReadOnly() { + return readOnly; + } + + public void setReadOnly(boolean readOnly) { + this.readOnly = readOnly; + } + +} // SecurityEntry diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/TableJoin.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/TableJoin.java new file mode 100644 index 00000000..6032d5a1 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/TableJoin.java @@ -0,0 +1,85 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition; + +import org.onap.portalsdk.analytics.RaptorObject; + +public class TableJoin extends RaptorObject { + private String srcTableName = null; + + private String destTableName = null; + + private String joinExpr = null; + + public TableJoin() { + super(); + } + + public TableJoin(String srcTableName, String destTableName, String joinExpr) { + this(); + + setSrcTableName(srcTableName); + setDestTableName(destTableName); + setJoinExpr(joinExpr); + } // TableJoin + + public String getSrcTableName() { + return srcTableName; + } + + public String getDestTableName() { + return destTableName; + } + + public String getJoinExpr() { + return joinExpr; + } + + public void setSrcTableName(String srcTableName) { + this.srcTableName = srcTableName; + } + + public void setDestTableName(String destTableName) { + this.destTableName = destTableName; + } + + public void setJoinExpr(String joinExpr) { + this.joinExpr = joinExpr; + } + +} // TableJoin diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/TableSource.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/TableSource.java index 9a4d114c..4ca177e8 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/TableSource.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/TableSource.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition; +package org.onap.portalsdk.analytics.model.definition; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class TableSource extends RaptorObject { private String tableName = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ColumnEditJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ColumnEditJSON.java index 7f203d36..d3478d77 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ColumnEditJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ColumnEditJSON.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; +package org.onap.portalsdk.analytics.model.definition.wizard; public class ColumnEditJSON implements WizardJSON { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ColumnJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ColumnJSON.java new file mode 100644 index 00000000..97347037 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ColumnJSON.java @@ -0,0 +1,59 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +public class ColumnJSON implements ElementJSON { + + private String id; + private String name; + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/DefinitionJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/DefinitionJSON.java index 2368fcc6..351192b5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/DefinitionJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/DefinitionJSON.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; +package org.onap.portalsdk.analytics.model.definition.wizard; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ElementJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ElementJSON.java new file mode 100644 index 00000000..a0bee600 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ElementJSON.java @@ -0,0 +1,51 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +import java.util.ArrayList; +import java.util.Map; + +import org.onap.portalsdk.analytics.view.ColumnHeader; + +public interface ElementJSON { + + // To be defined by child class + public String getId(); + public String getName(); + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/FormEditJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/FormEditJSON.java index 86d173e6..3d2dc41a 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/FormEditJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/FormEditJSON.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; +package org.onap.portalsdk.analytics.model.definition.wizard; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/IdNameBooleanJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/IdNameBooleanJSON.java new file mode 100644 index 00000000..e18302cc --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/IdNameBooleanJSON.java @@ -0,0 +1,66 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +public class IdNameBooleanJSON { + + private String id; + private String name; + private boolean selected; + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public boolean isSelected() { + return selected; + } + public void setSelected(boolean selected) { + this.selected = selected; + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ImportJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ImportJSON.java new file mode 100644 index 00000000..66bbb7e7 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ImportJSON.java @@ -0,0 +1,72 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +import java.util.List; + +public class ImportJSON implements WizardJSON { + + private String tabId; + private String tabName; + + private String reportXML; + + + public String getTabId() { + return tabId; + } + public void setTabId(String tabId) { + this.tabId = tabId; + } + public String getTabName() { + return tabName; + } + public void setTabName(String tabName) { + this.tabName = tabName; + } + public String getReportXML() { + return reportXML; + } + public void setReportXML(String reportXML) { + this.reportXML = reportXML; + } + + + + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ListJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ListJSON.java new file mode 100644 index 00000000..4a842958 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/ListJSON.java @@ -0,0 +1,58 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +import java.util.ArrayList; +import java.util.Map; + +import org.onap.portalsdk.analytics.view.ColumnHeader; + +public class ListJSON { + + private ArrayList<ElementJSON> elements; + + public ArrayList<ElementJSON> getElements() { + return elements; + } + + public void setElements(ArrayList<ElementJSON> elements) { + this.elements = elements; + } + + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/MessageJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/MessageJSON.java new file mode 100644 index 00000000..c5891b2e --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/MessageJSON.java @@ -0,0 +1,73 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Map; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; + +import org.json.JSONObject; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.view.ColumnHeader; +import org.onap.portalsdk.analytics.view.DataValue; +import org.onap.portalsdk.analytics.xmlobj.ColFilterList; +import org.onap.portalsdk.analytics.xmlobj.DataColumnList; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; + +public class MessageJSON { + + private String message; + private String anyStacktrace; + public String getMessage() { + return message; + } + public void setMessage(String message) { + this.message = message; + } + public String getAnyStacktrace() { + return anyStacktrace; + } + public void setAnyStacktrace(String anyStacktrace) { + this.anyStacktrace = anyStacktrace; + } + + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/NameBooleanJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/NameBooleanJSON.java new file mode 100644 index 00000000..f74f9671 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/NameBooleanJSON.java @@ -0,0 +1,59 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +public class NameBooleanJSON { + + private String name; + private boolean selected; + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public boolean isSelected() { + return selected; + } + public void setSelected(boolean selected) { + this.selected = selected; + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/QueryJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/QueryJSON.java new file mode 100644 index 00000000..d2df77c0 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/QueryJSON.java @@ -0,0 +1,78 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +import java.util.ArrayList; +import java.util.Map; + +import org.onap.portalsdk.analytics.model.definition.wizard.WizardJSON; +import org.onap.portalsdk.analytics.view.ColumnHeader; + +public class QueryJSON implements WizardJSON { + + private String query; + private String tabName; + private String tabId; + + + public String getTabName() { + return tabName; + } + + public void setTabName(String tabName) { + this.tabName = tabName; + } + + public String getTabId() { + return tabId; + } + + public void setTabId(String tabId) { + this.tabId = tabId; + } + + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/QueryResultJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/QueryResultJSON.java index a0909bf7..794e9813 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/QueryResultJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/QueryResultJSON.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; +package org.onap.portalsdk.analytics.model.definition.wizard; import java.util.ArrayList; import java.util.Map; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; +import org.onap.portalsdk.analytics.view.ColumnHeader; public class QueryResultJSON { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/RaptorError.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/RaptorError.java new file mode 100644 index 00000000..b04f4d45 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/RaptorError.java @@ -0,0 +1,49 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +public class RaptorError extends RaptorResponse{ + public RaptorError(String theMessage) { + error().put("message", theMessage); + } + + public RaptorError(String theMessage, Throwable theError) { + error().put("message", theMessage) + .put("exception", theError.toString()); + } +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/RaptorResponse.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/RaptorResponse.java new file mode 100644 index 00000000..d14f4d1a --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/RaptorResponse.java @@ -0,0 +1,68 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +import org.json.JSONObject; + +import com.fasterxml.jackson.annotation.JsonRawValue; + +public class RaptorResponse { + private JSONObject data = new JSONObject(), + error = new JSONObject(); + + public RaptorResponse() { + } + + public JSONObject data() { + return this.data; + } + + @JsonRawValue + public String getData() { + return this.data.toString(); + } + + public JSONObject error() { + return this.error; + } + + @JsonRawValue + public String getError() { + return this.error.toString(); + } +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/SearchFieldJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/SearchFieldJSON.java new file mode 100644 index 00000000..948188cd --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/SearchFieldJSON.java @@ -0,0 +1,59 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +public class SearchFieldJSON implements ElementJSON { + + private String id; + private String name; + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/WizardJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/WizardJSON.java new file mode 100644 index 00000000..0781f3f5 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/definition/wizard/WizardJSON.java @@ -0,0 +1,47 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.definition.wizard; + +public interface WizardJSON { + + public String getTabName(); + public void setTabName(String tabName); + public String getTabId(); + public void setTabId(String tabId); + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/pdf/PageEvent.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PageEvent.java index aefeb66d..91bdb09a 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/pdf/PageEvent.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PageEvent.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.pdf; +package org.onap.portalsdk.analytics.model.pdf; import java.awt.Color; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.Globals; import com.lowagie.text.BadElementException; import com.lowagie.text.Cell; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/pdf/PdfBean.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfBean.java index 0e8dc6ea..ccfd06ca 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/pdf/PdfBean.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfBean.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.pdf; +package org.onap.portalsdk.analytics.model.pdf; public class PdfBean { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/pdf/PdfReportHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java index 9e9b255c..f4c2b8a6 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/pdf/PdfReportHandler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/pdf/PdfReportHandler.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ /* =========================================================================================== @@ -35,7 +53,7 @@ * </UL> * */ -package org.openecomp.portalsdk.analytics.model.pdf; +package org.onap.portalsdk.analytics.model.pdf; import java.awt.Color; import java.io.File; @@ -67,30 +85,30 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.model.ReportHandler; -import org.openecomp.portalsdk.analytics.model.ReportLoader; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.model.definition.ReportDefinition; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.HtmlStripper; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; -import org.openecomp.portalsdk.analytics.view.ColumnHeaderRow; -import org.openecomp.portalsdk.analytics.view.DataRow; -import org.openecomp.portalsdk.analytics.view.DataValue; -import org.openecomp.portalsdk.analytics.view.HtmlFormatter; -import org.openecomp.portalsdk.analytics.view.ReportData; -import org.openecomp.portalsdk.analytics.view.RowHeader; -import org.openecomp.portalsdk.analytics.view.RowHeaderCol; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.model.ReportHandler; +import org.onap.portalsdk.analytics.model.ReportLoader; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.model.definition.ReportDefinition; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.HtmlStripper; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.view.ColumnHeader; +import org.onap.portalsdk.analytics.view.ColumnHeaderRow; +import org.onap.portalsdk.analytics.view.DataRow; +import org.onap.portalsdk.analytics.view.DataValue; +import org.onap.portalsdk.analytics.view.HtmlFormatter; +import org.onap.portalsdk.analytics.view.ReportData; +import org.onap.portalsdk.analytics.view.RowHeader; +import org.onap.portalsdk.analytics.view.RowHeaderCol; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import com.lowagie.text.BadElementException; import com.lowagie.text.Chunk; @@ -115,16 +133,14 @@ import com.lowagie.text.pdf.PdfWriter; * @author mwliu and sundar * */ -public class PdfReportHandler extends org.openecomp.portalsdk.analytics.RaptorObject{ +public class PdfReportHandler extends org.onap.portalsdk.analytics.RaptorObject{ + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PdfReportHandler.class); - /** - * - */ private PdfBean pb; private HtmlStripper strip = new HtmlStripper(); private static final int RetryCreateNewImage = 3; private int retryCreateNewImageCount=0; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PdfReportHandler.class); private String FONT_FAMILY = "Arial"; private int FONT_SIZE = 9; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/BarChartOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/BarChartOptions.java index 3c040599..7879be48 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/BarChartOptions.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/BarChartOptions.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; public class BarChartOptions { private boolean verticalOrientation; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/CategoryAxisJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/CategoryAxisJSON.java new file mode 100644 index 00000000..f529aa1b --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/CategoryAxisJSON.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.runtime; + +public class CategoryAxisJSON extends IndexValueJSON { + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartD3Helper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java index 698d52a5..4660b4f7 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartD3Helper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.io.BufferedWriter; import java.io.FileWriter; @@ -44,25 +62,24 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.commons.lang.time.DateUtils; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.ReportHandler; -import org.openecomp.portalsdk.analytics.model.base.ChartSeqComparator; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.HtmlStripper; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.view.ReportData; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.ReportHandler; +import org.onap.portalsdk.analytics.model.base.ChartSeqComparator; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.HtmlStripper; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.view.ReportData; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.web.support.UserUtils; public class ChartD3Helper { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ChartD3Helper.class); - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ChartD3Helper.class); private ReportRuntime reportRuntime; private String chartType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSON.java index 66bce17a..194d84e5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSON.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.util.ArrayList; import java.util.Map; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; +import org.onap.portalsdk.analytics.view.ColumnHeader; class Row { private String displayValue; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSONHelper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java index 94671cf0..eedaa6bd 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSONHelper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.io.UnsupportedEncodingException; import java.text.ParsePosition; @@ -38,28 +56,26 @@ import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.ReportHandler; -import org.openecomp.portalsdk.analytics.model.base.ChartSeqComparator; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.ReportHandler; +import org.onap.portalsdk.analytics.model.base.ChartSeqComparator; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.web.support.UserUtils; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; - - public class ChartJSONHelper { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ChartJSONHelper.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ChartJSONHelper.class); private ReportRuntime reportRuntime; private String chartType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartWebRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartWebRuntime.java index b3e8e678..e023b8c0 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartWebRuntime.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartWebRuntime.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; @@ -33,13 +51,13 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.ReportHandler; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.view.ReportData; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.ReportHandler; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.view.ReportData; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/CommonChartOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/CommonChartOptions.java index 163f818b..35429211 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/CommonChartOptions.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/CommonChartOptions.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; public class CommonChartOptions { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ErrorJSONRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ErrorJSONRuntime.java new file mode 100644 index 00000000..dd1f68d3 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ErrorJSONRuntime.java @@ -0,0 +1,76 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.runtime; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Map; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; + +import org.json.JSONObject; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.view.ColumnHeader; +import org.onap.portalsdk.analytics.view.DataValue; +import org.onap.portalsdk.analytics.xmlobj.ColFilterList; +import org.onap.portalsdk.analytics.xmlobj.DataColumnList; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; + +public class ErrorJSONRuntime { + + private String errormessage; + private String stacktrace; + + public String getErrormessage() { + return errormessage; + } + public void setErrormessage(String errormessage) { + this.errormessage = errormessage; + } + public String getStacktrace() { + return stacktrace; + } + public void setStacktrace(String stacktrace) { + this.stacktrace = stacktrace; + } + + + + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/FlexTimeSeriesChartOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/FlexTimeSeriesChartOptions.java new file mode 100644 index 00000000..d0329c91 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/FlexTimeSeriesChartOptions.java @@ -0,0 +1,56 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.runtime; + +public class FlexTimeSeriesChartOptions { + private int zoomIn = 25; + private String timeAxisType = ""; + public int getZoomIn() { + return zoomIn; + } + public void setZoomIn(int zoomIn) { + this.zoomIn = zoomIn; + } + public String getTimeAxisType() { + return timeAxisType; + } + public void setTimeAxisType(String timeAxisType) { + this.timeAxisType = timeAxisType; + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/FormField.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/FormField.java index 8f063081..f38bceae 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/FormField.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/FormField.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ /* =========================================================================================== * This class is part of <I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I> @@ -39,7 +57,7 @@ * 08-Jun-2009 : Version 8.3 (RS); Hidden formfields now is displayed even when the sql is not provided. * */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.io.Serializable; import java.io.UnsupportedEncodingException; @@ -51,15 +69,15 @@ import java.util.regex.Pattern; import javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.error.UserDefinedException; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.analytics.xmlobj.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.error.UserDefinedException; +import org.onap.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.xmlobj.*; -public class FormField extends org.openecomp.portalsdk.analytics.RaptorObject implements Serializable { +public class FormField extends org.onap.portalsdk.analytics.RaptorObject implements Serializable { private static final String HTML_FORM = "formd"; private String fieldName = null; @@ -1869,7 +1887,7 @@ public class FormField extends org.openecomp.portalsdk.analytics.RaptorObject im sb.append(" "); return sb.toString(); } else - throw new org.openecomp.portalsdk.analytics.error.RaptorRuntimeException("FormField.getHtml: Unsupported form field type"); + throw new org.onap.portalsdk.analytics.error.RaptorRuntimeException("FormField.getHtml: Unsupported form field type"); } // getHtml public String getValidateJavaScript() { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/FormatProcessor.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/FormatProcessor.java index b08feb1b..4633b255 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/FormatProcessor.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/FormatProcessor.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.util.*; -import org.openecomp.portalsdk.analytics.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.analytics.view.*; -import org.openecomp.portalsdk.analytics.xmlobj.*; +import org.onap.portalsdk.analytics.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.view.*; +import org.onap.portalsdk.analytics.xmlobj.*; public class FormatProcessor extends RaptorObject { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/Item.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/Item.java new file mode 100644 index 00000000..90b90340 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/Item.java @@ -0,0 +1,72 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.model.runtime; + +public class Item { + private String _id; + private String _name; + + public Item() { + } + + public Item(String id, String name) { + this._id = id; + this._name = name; + } + + public String getId() { + return _id; + } + + public void setId(String id) { + this._id = id; + } + + public String getName() { + return _name; + } + + public void setName(String name) { + this._name = name; + } + + public String toString() { + return _name; + } +} + diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/LookupDBInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/LookupDBInfo.java index e733e84b..65e4ba1f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/LookupDBInfo.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/LookupDBInfo.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class LookupDBInfo extends RaptorObject { private String tableName = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/RangeAxisJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/RangeAxisJSON.java index 9660e7fe..719a2c89 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/RangeAxisJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/RangeAxisJSON.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; class RangeColorJSON extends IndexValueJSON {} class RangeAxisLabelJSON extends IndexValueJSON {} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportFormFields.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportFormFields.java index fd2dc70d..056c518b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportFormFields.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportFormFields.java @@ -1,34 +1,52 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.util.*; import javax.servlet.http.*; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.*; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.model.definition.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.analytics.xmlobj.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.*; +import org.onap.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.model.definition.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.xmlobj.*; public class ReportFormFields extends Vector { private int nextElemIdx = 0; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportJSONRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportJSONRuntime.java index 0239147e..8c245625 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportJSONRuntime.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportJSONRuntime.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.util.ArrayList; import java.util.Calendar; @@ -27,12 +45,12 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import org.json.JSONObject; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; -import org.openecomp.portalsdk.analytics.view.DataValue; -import org.openecomp.portalsdk.analytics.xmlobj.ColFilterList; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnList; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.view.ColumnHeader; +import org.onap.portalsdk.analytics.view.DataValue; +import org.onap.portalsdk.analytics.xmlobj.ColFilterList; +import org.onap.portalsdk.analytics.xmlobj.DataColumnList; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; /*class MetaColumn { private String tableId; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportParamDateValueParser.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportParamDateValueParser.java index 5ebf34bc..8eb6c06d 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportParamDateValueParser.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportParamDateValueParser.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.text.DateFormat; import java.text.ParseException; @@ -25,10 +43,10 @@ import java.text.SimpleDateFormat; import java.util.*; import javax.servlet.http.*; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.analytics.xmlobj.*; +import org.onap.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.xmlobj.*; public class ReportParamDateValueParser { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportParamValues.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportParamValues.java index 8cdd30a2..d0a3f613 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportParamValues.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportParamValues.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.util.Enumeration; import java.util.Hashtable; @@ -25,18 +43,19 @@ import java.util.Iterator; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.util.XSSFilter; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.util.XSSFilter; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class ReportParamValues extends Hashtable { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportParamValues.class); + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportParamValues.class); private Hashtable paramIsMultiValue = null; private Hashtable paramIsTextAreaValue = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportParamValuesForPDFExcel.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportParamValuesForPDFExcel.java index b1c54fa3..20e0e4dc 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportParamValuesForPDFExcel.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportParamValuesForPDFExcel.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.util.Enumeration; import java.util.Hashtable; @@ -25,19 +43,19 @@ import java.util.Iterator; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class ReportParamValuesForPDFExcel extends Hashtable { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportParamValuesForPDFExcel.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportParamValuesForPDFExcel.class); private Hashtable paramIsMultiValue = null; private Hashtable paramIsTextAreaValue = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java index bd780859..3be0b8cd 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ReportRuntime.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.io.Serializable; import java.sql.Connection; @@ -38,35 +56,35 @@ import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.DataCache; -import org.openecomp.portalsdk.analytics.model.ReportHandler; -import org.openecomp.portalsdk.analytics.model.ReportLoader; -import org.openecomp.portalsdk.analytics.model.base.IdNameList; -import org.openecomp.portalsdk.analytics.model.base.IdNameSql; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.model.base.ReportWrapper; -import org.openecomp.portalsdk.analytics.model.definition.Marker; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; -import org.openecomp.portalsdk.analytics.view.ColumnHeaderRow; -import org.openecomp.portalsdk.analytics.view.CrossTabOrderManager; -import org.openecomp.portalsdk.analytics.view.CrossTabTotalValue; -import org.openecomp.portalsdk.analytics.view.DataRow; -import org.openecomp.portalsdk.analytics.view.DataValue; -import org.openecomp.portalsdk.analytics.view.ReportData; -import org.openecomp.portalsdk.analytics.view.RowHeaderCol; -import org.openecomp.portalsdk.analytics.xmlobj.CustomReportType; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.analytics.xmlobj.ObjectFactory; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.DataCache; +import org.onap.portalsdk.analytics.model.ReportHandler; +import org.onap.portalsdk.analytics.model.ReportLoader; +import org.onap.portalsdk.analytics.model.base.IdNameList; +import org.onap.portalsdk.analytics.model.base.IdNameSql; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.model.base.ReportWrapper; +import org.onap.portalsdk.analytics.model.definition.Marker; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.view.ColumnHeader; +import org.onap.portalsdk.analytics.view.ColumnHeaderRow; +import org.onap.portalsdk.analytics.view.CrossTabOrderManager; +import org.onap.portalsdk.analytics.view.CrossTabTotalValue; +import org.onap.portalsdk.analytics.view.DataRow; +import org.onap.portalsdk.analytics.view.DataValue; +import org.onap.portalsdk.analytics.view.ReportData; +import org.onap.portalsdk.analytics.view.RowHeaderCol; +import org.onap.portalsdk.analytics.xmlobj.CustomReportType; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.analytics.xmlobj.ObjectFactory; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import com.fasterxml.jackson.databind.ObjectMapper; @@ -90,9 +108,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; public class ReportRuntime extends ReportWrapper implements Cloneable, Serializable { - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportRuntime.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ReportRuntime.class); - //TODO DELETE IF PARSE SQL is not working private int curSQLParsePos = 0; @@ -1131,7 +1148,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); if (dbType.equals("DAYTONA") && reportSQL.trim().toUpperCase().startsWith("SELECT")) { Pattern re1 = Pattern.compile("order(.*?[^\r\n]*)by", Pattern.DOTALL); @@ -1664,7 +1681,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa String dbType = ""; if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); @@ -2140,7 +2157,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa boolean isCYMBALScript = false; if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo(); + org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); String dbType = remDbInfo.getDBType(dbInfo); if (dbType.equals("DAYTONA") && !(nextToken.toUpperCase().equals("SELECT"))) { isCYMBALScript = true; @@ -2158,7 +2175,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa if (nextToken.toUpperCase().equals("SELECT")) parsedSQL.append("SELECT "); else - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "The SQL must start with the SELECT keyword."); } else if (nextToken.toUpperCase().equals("DISTINCT") && parsedSQL.toString().equals("SELECT ")) { @@ -2166,7 +2183,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa } else if (nextToken.equals("*") && (parsedSQL.toString().equals("SELECT ") || parsedSQL.toString().equals( "SELECT DISTINCT "))) { - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "You cannot use \"SELECT *\". Please specify select columns/expressions."); } else if (nextToken.toUpperCase().equals("FROM")) { if (lastToken != null) { @@ -2211,7 +2228,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa String token = getNextSQLParseToken(sql, false); //System.out.println(" ********** " + token + " " + lastToken); if (!token.toUpperCase().equals("FROM")) - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "|FROM keyword or a comma expected after [" + nextToken + "]."); //System.out.println("Next Token " + nextToken); @@ -2259,7 +2276,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa } if (updatedReportCols.size() == 0) - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "The SQL statement must have at least one column in the SELECT clause."); @@ -2322,7 +2339,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa if (colId != null) { if (!isParseSQLColID(colId)) - throw new org.openecomp.portalsdk.analytics.error.ValidationException( + throw new org.onap.portalsdk.analytics.error.ValidationException( "[" + colId + "] must either be a valid column id consisting only of letters, numbers, and underscores, or there must be a comma in front of it."); @@ -2445,7 +2462,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa return sql; } -public List getMapMarkers(ReportData rd, org.openecomp.portalsdk.analytics.xmlobj.ReportMap xmlmap){ +public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.ReportMap xmlmap){ ArrayList markers = new ArrayList(); int rNum = 0; @@ -2460,7 +2477,7 @@ public List getMapMarkers(ReportData rd, org.openecomp.portalsdk.analytics.xmlob for (int i = 0; i < xmlmap.getMarkers().size(); i ++){ Marker marker = new Marker("", "", ""); - org.openecomp.portalsdk.analytics.xmlobj.Marker m = (org.openecomp.portalsdk.analytics.xmlobj.Marker) xmlmap.getMarkers().get(i); + org.onap.portalsdk.analytics.xmlobj.Marker m = (org.onap.portalsdk.analytics.xmlobj.Marker) xmlmap.getMarkers().get(i); String address = (String) colHash.get(m.getAddressColumn()); String data = (String) colHash.get(m.getDataColumn()); marker.setAddress(address); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/TimeSeriesChartOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/TimeSeriesChartOptions.java index b1cdedfa..3702cb38 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/TimeSeriesChartOptions.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/TimeSeriesChartOptions.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; public class TimeSeriesChartOptions { private String lineChartRenderer; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/VisualManager.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/VisualManager.java index 7b5ed449..521dced8 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/VisualManager.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/VisualManager.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.runtime; +package org.onap.portalsdk.analytics.model.runtime; import java.util.*; -import org.openecomp.portalsdk.analytics.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; public class VisualManager extends RaptorObject { private HashMap hiddenCols = new HashMap(); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/ReportSearchResult.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/ReportSearchResult.java index 91e8e9db..a686d8aa 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/ReportSearchResult.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/ReportSearchResult.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.search; +package org.onap.portalsdk.analytics.model.search; import java.util.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; public class ReportSearchResult extends SearchResult { private static final String HTML_FORM = "forma"; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/ReportSearchResultJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/ReportSearchResultJSON.java index 379a0cd2..2174383c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/ReportSearchResultJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/ReportSearchResultJSON.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.search; +package org.onap.portalsdk.analytics.model.search; import java.util.*; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResult.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResult.java index a8dfba7a..680e8696 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResult.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResult.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.search; +package org.onap.portalsdk.analytics.model.search; import java.util.*; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; public class SearchResult{ private int pageNo = -1; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResultColumn.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultColumn.java index 1afe5ec9..d39ad4a9 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResultColumn.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultColumn.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.search; +package org.onap.portalsdk.analytics.model.search; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.util.*; -public class SearchResultColumn extends org.openecomp.portalsdk.analytics.RaptorObject { +public class SearchResultColumn extends org.onap.portalsdk.analytics.RaptorObject { private String columnId = ""; private String columnTitle = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResultField.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultField.java index 152ef3a8..4b6dfdef 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResultField.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultField.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.search; +package org.onap.portalsdk.analytics.model.search; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.util.*; -public class SearchResultField extends org.openecomp.portalsdk.analytics.RaptorObject { +public class SearchResultField extends org.onap.portalsdk.analytics.RaptorObject { private String columnId; private String displayValue = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResultJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java index c0d635d7..eb2cbb9d 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResultJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.search; +package org.onap.portalsdk.analytics.model.search; import java.util.*; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; public class SearchResultJSON{ diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResultRow.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultRow.java index f6696ccd..f725857b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/search/SearchResultRow.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultRow.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.model.search; +package org.onap.portalsdk.analytics.model.search; import java.util.*; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/scheduler/SchedulerUtil.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SchedulerUtil.java index 0ff6b2d9..56328b31 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/scheduler/SchedulerUtil.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SchedulerUtil.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.scheduler; +package org.onap.portalsdk.analytics.scheduler; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -36,8 +54,8 @@ import java.util.Date; import java.util.List; import java.util.Locale; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.system.DbUtils; //import oracle.jdbc.*; //import oracle.sql.BLOB; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/scheduler/SendEmail.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendEmail.java index 1ace58d2..57d80054 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/scheduler/SendEmail.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendEmail.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.scheduler; +package org.onap.portalsdk.analytics.scheduler; import java.io.File; import java.io.FileInputStream; @@ -35,9 +53,9 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.List; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.scheduler.SchedulerUtil.Executor; -import org.openecomp.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.scheduler.SchedulerUtil.Executor; +import org.onap.portalsdk.analytics.system.Globals; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/scheduler/SendNotifications.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendNotifications.java index bb0e14a0..246e97b9 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/scheduler/SendNotifications.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/scheduler/SendNotifications.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.scheduler; +package org.onap.portalsdk.analytics.scheduler; import java.math.BigDecimal; import java.sql.Connection; @@ -29,11 +47,11 @@ import java.util.Calendar; import java.util.Date; import java.util.UUID; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.scheduler.SchedulerUtil.Executor; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.Log; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.scheduler.SchedulerUtil.Executor; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.Log; public class SendNotifications { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/AppUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/AppUtils.java index 6da2fef6..ed1cc6e7 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/AppUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/AppUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system; +package org.onap.portalsdk.analytics.system; import java.io.File; import java.text.SimpleDateFormat; @@ -25,8 +43,8 @@ import java.util.*; import javax.servlet.http.*; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.util.*; public class AppUtils /* implements IAppUtils */{ private static String baseURL = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/ConnectionUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/ConnectionUtils.java index 8c824ead..79bbaaa5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/ConnectionUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/ConnectionUtils.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system; +package org.onap.portalsdk.analytics.system; import java.sql.Connection; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; public class ConnectionUtils { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/DbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/DbUtils.java index 1eb3a2c8..68269bc9 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/DbUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/DbUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system; +package org.onap.portalsdk.analytics.system; import java.sql.CallableStatement; import java.sql.Connection; @@ -29,18 +47,18 @@ import java.sql.Types; import javax.sql.DataSource; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.web.support.AppUtils; import org.springframework.beans.factory.annotation.Autowired; -public class DbUtils /* implements IDbUtils */{ +public class DbUtils { - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DbUtils.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DbUtils.class); private static DataSource dataSource; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/ExecuteQuery.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/ExecuteQuery.java index a111a816..54631d47 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/ExecuteQuery.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/ExecuteQuery.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system; +package org.onap.portalsdk.analytics.system; import java.sql.Connection; import java.sql.ResultSet; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/Globals.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java index 008789fc..a394b30f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/Globals.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/Globals.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ /* =========================================================================================== @@ -40,7 +58,7 @@ * </UL> * */ -package org.openecomp.portalsdk.analytics.system; +package org.onap.portalsdk.analytics.system; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -57,22 +75,21 @@ import java.util.StringTokenizer; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.config.ConfigLoader; -import org.openecomp.portalsdk.analytics.controller.ActionMapping; -import org.openecomp.portalsdk.analytics.model.runtime.FormField; -import org.openecomp.portalsdk.analytics.model.runtime.ReportFormFields; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.ExcelColorDef; -import org.openecomp.portalsdk.analytics.util.Scheduler; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.config.ConfigLoader; +import org.onap.portalsdk.analytics.controller.ActionMapping; +import org.onap.portalsdk.analytics.model.runtime.FormField; +import org.onap.portalsdk.analytics.model.runtime.ReportFormFields; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.ExcelColorDef; +import org.onap.portalsdk.analytics.util.Scheduler; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; -public class Globals extends org.openecomp.portalsdk.analytics.RaptorObject { +public class Globals extends org.onap.portalsdk.analytics.RaptorObject { - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Globals.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Globals.class); - private static boolean systemInitialized = false; private static ActionMapping raptorActionMapping = null; @@ -337,18 +354,18 @@ public class Globals extends org.openecomp.portalsdk.analytics.RaptorObject { try { appUtils = (IAppUtils) Class.forName( - "org.openecomp.portalsdk.analytics.system." + systemType.toLowerCase() + ".AppUtils") + "org.onap.portalsdk.analytics.system." + systemType.toLowerCase() + ".AppUtils") .newInstance(); appUtils.initializeAppUtils(servletContext); dbUtils = (IDbUtils) Class.forName( - "org.openecomp.portalsdk.analytics.system." + systemType.toLowerCase() + ".DbUtils") + "org.onap.portalsdk.analytics.system." + systemType.toLowerCase() + ".DbUtils") .newInstance(); dbUtils.initializeDbUtils(servletContext); if(!Globals.getSystemType().equals(Globals.ST_GENERIC)) { rdbUtils = (RDbUtils) Class.forName( - "org.openecomp.portalsdk.analytics.system." + systemType.toLowerCase() + ".RemoteDbUtils") + "org.onap.portalsdk.analytics.system." + systemType.toLowerCase() + ".RemoteDbUtils") .newInstance(); rdbUtils.initializeDbUtils(servletContext); } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/IAppUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/IAppUtils.java index 1cbdf4af..ba967e8b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/IAppUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/IAppUtils.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system; +package org.onap.portalsdk.analytics.system; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.ReportSQLException; public interface IAppUtils { void initializeAppUtils(ServletContext servletContext); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/IDbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/IDbUtils.java new file mode 100644 index 00000000..6d5daeaf --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/IDbUtils.java @@ -0,0 +1,54 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system; + +import java.sql.*; +import java.util.*; +import javax.servlet.*; + +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.error.ReportSQLException; + +public interface IDbUtils { + void initializeDbUtils(ServletContext servletContext); + + Connection getConnection() throws ReportSQLException ; + + void clearConnection(Connection con) throws ReportSQLException ; + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/RDbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/RDbUtils.java new file mode 100644 index 00000000..8f624a31 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/RDbUtils.java @@ -0,0 +1,53 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system; + +import java.sql.*; +import javax.servlet.*; + +import org.onap.portalsdk.analytics.error.ReportSQLException; + +public interface RDbUtils { + + void initializeDbUtils(ServletContext servletContext); + + Connection getRemoteConnection(String dbKey)throws ReportSQLException; + + void clearConnection(Connection con)throws ReportSQLException; + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/RemDbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/RemDbUtils.java index b29760a0..cab90879 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/RemDbUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/RemDbUtils.java @@ -1,40 +1,56 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system; +package org.onap.portalsdk.analytics.system; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class RemDbUtils /* implements IDbUtils */{ - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RemDbUtils.class); - - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RemDbUtils.class); public RemDbUtils() { } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/AntBuild.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AntBuild.java index 27c09b50..6451a961 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/AntBuild.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AntBuild.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion; +package org.onap.portalsdk.analytics.system.fusion; import java.io.IOException; import java.util.Iterator; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/AppUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AppUtils.java index 8916c5ed..e3bd0f7e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/AppUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AppUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion; +package org.onap.portalsdk.analytics.system.fusion; import java.util.Iterator; import java.util.Map; @@ -29,18 +47,17 @@ import java.util.Vector; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.config.ConfigLoader; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.system.IAppUtils; -import org.openecomp.portalsdk.analytics.system.fusion.adapter.RaptorAdapter; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;; +import org.onap.portalsdk.analytics.config.ConfigLoader; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.system.IAppUtils; +import org.onap.portalsdk.analytics.system.fusion.adapter.RaptorAdapter; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;; -public class AppUtils extends org.openecomp.portalsdk.analytics.RaptorObject implements IAppUtils { +public class AppUtils extends org.onap.portalsdk.analytics.RaptorObject implements IAppUtils { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppUtils.class); - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppUtils.class); private static String tempFolderPath = "/artemis/PROJECT1/MSA/databank/WEB-INF/temp/"; private static String uploadFolderPath = "/artemis/PROJECT1/MSA/databank/WEB-INF/upload/"; @@ -127,13 +144,13 @@ public class AppUtils extends org.openecomp.portalsdk.analytics.RaptorObject imp } } public String getUserID(HttpServletRequest request) { - String pdfAttachmentKey = org.openecomp.portalsdk.analytics.system.AppUtils.getRequestValue(request, "pdfAttachmentKey"); - String report_email_sent_log_id = org.openecomp.portalsdk.analytics.system.AppUtils.getRequestValue(request, "log_id"); + String pdfAttachmentKey = org.onap.portalsdk.analytics.system.AppUtils.getRequestValue(request, "pdfAttachmentKey"); + String report_email_sent_log_id = org.onap.portalsdk.analytics.system.AppUtils.getRequestValue(request, "log_id"); boolean isEmailAttachment = false; if(pdfAttachmentKey != null && report_email_sent_log_id !=null) isEmailAttachment = true; if(isEmailAttachment) { - return RaptorAdapter.getUserID(org.openecomp.portalsdk.analytics.system.AppUtils.getRequestValue(request, "user_id")); + return RaptorAdapter.getUserID(org.onap.portalsdk.analytics.system.AppUtils.getRequestValue(request, "user_id")); } else return RaptorAdapter.getUserID(request); } // getUserID @@ -191,13 +208,13 @@ public class AppUtils extends org.openecomp.portalsdk.analytics.RaptorObject imp } // getUserLoginId public String getUserBackdoorLoginId(HttpServletRequest request) { - String pdfAttachmentKey = org.openecomp.portalsdk.analytics.system.AppUtils.getRequestValue(request, "pdfAttachmentKey"); - String report_email_sent_log_id = org.openecomp.portalsdk.analytics.system.AppUtils.getRequestValue(request, "log_id"); + String pdfAttachmentKey = org.onap.portalsdk.analytics.system.AppUtils.getRequestValue(request, "pdfAttachmentKey"); + String report_email_sent_log_id = org.onap.portalsdk.analytics.system.AppUtils.getRequestValue(request, "log_id"); boolean isEmailAttachment = false; if(pdfAttachmentKey != null && report_email_sent_log_id !=null) isEmailAttachment = true; if(isEmailAttachment) { - return RaptorAdapter.getUserBackdoorLoginId(org.openecomp.portalsdk.analytics.system.AppUtils.getRequestValue(request, "user_id")); + return RaptorAdapter.getUserBackdoorLoginId(org.onap.portalsdk.analytics.system.AppUtils.getRequestValue(request, "user_id")); } else return RaptorAdapter.getUserBackdoorLoginId(request); } // getUserBackdoorLoginId @@ -235,7 +252,6 @@ public class AppUtils extends org.openecomp.portalsdk.analytics.RaptorObject imp } // getUserRoles public void resetUserCache() { - //org.openecomp.portalsdk.core.web.support.AppUtils.removeObjectFromCache(RaptorAdapter.KEY_USER_ROLES_CACHE); } // resetUserCache public String getSuperRoleID(){ diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/DbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/DbUtils.java new file mode 100644 index 00000000..b33995b2 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/DbUtils.java @@ -0,0 +1,96 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system.fusion; + +import java.sql.*; +import java.util.*; + +import javax.servlet.*; + +import org.onap.portalsdk.analytics.config.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.system.fusion.adapter.FusionAdapter; +import org.onap.portalsdk.analytics.system.fusion.adapter.RaptorAdapter; +import org.onap.portalsdk.analytics.system.fusion.adapter.SpringContext; +import org.onap.portalsdk.analytics.util.*; +import org.springframework.beans.factory.annotation.Autowired; + + + +public class DbUtils implements IDbUtils { + + @Autowired + public RaptorAdapter raptorAdapter; + @Autowired + public FusionAdapter fusionAdapter; + + public DbUtils() {} + + public void initializeDbUtils(ServletContext servletContext) { + raptorAdapter = (RaptorAdapter)SpringContext.getApplicationContext().getBean("raptorAdapter"); + } // initializeDbUtils + + public Connection getConnection() { + return raptorAdapter.getConnection(); + } // getConnection + + public void clearConnection(Connection con) { + raptorAdapter.releaseConnection(con); + } // clearConnection + + public RaptorAdapter getRaptorAdapter() { + return raptorAdapter; + } + + public void setRaptorAdapter(RaptorAdapter raptorAdapter) { + this.raptorAdapter = raptorAdapter; + } + + public FusionAdapter getFusionAdapter() { + return fusionAdapter; + } + + public void setFusionAdapter(FusionAdapter fusionAdapter) { + this.fusionAdapter = fusionAdapter; + } + + + + + +} // DbUtils diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/RemoteDbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/RemoteDbUtils.java new file mode 100644 index 00000000..a6abfb7d --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/RemoteDbUtils.java @@ -0,0 +1,75 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system.fusion; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +import javax.servlet.ServletContext; + +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.system.RDbUtils; +import org.onap.portalsdk.analytics.system.fusion.adapter.RaptorAdapter; +import org.onap.portalsdk.analytics.system.fusion.adapter.SpringContext; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Log; +import org.springframework.beans.factory.annotation.Autowired; + + + +public class RemoteDbUtils implements RDbUtils{ + + private RaptorAdapter raptorAdapter; + + + public void initializeDbUtils(ServletContext servletContext) { + raptorAdapter = (RaptorAdapter)SpringContext.getApplicationContext().getBean("raptorAdapter"); + } // initializeDbUtils + + + public Connection getRemoteConnection(String dbKey) { + return raptorAdapter.getConnection(dbKey); + } + + public void clearConnection(Connection conn) { + raptorAdapter.releaseConnection(conn); + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/AdapterSessionFactoryContainer.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/AdapterSessionFactoryContainer.java new file mode 100644 index 00000000..e95b0ec6 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/AdapterSessionFactoryContainer.java @@ -0,0 +1,57 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system.fusion.adapter; + +import java.util.*; + +public class AdapterSessionFactoryContainer { + + private LinkedHashMap sessionFactories; + + public AdapterSessionFactoryContainer() { + } + + public LinkedHashMap getSessionFactories() { + return sessionFactories; + } + + public void setSessionFactories(LinkedHashMap sessionFactories) { + this.sessionFactories = sessionFactories; + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/DateUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/DateUtils.java index a4113d3b..d5939764 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/DateUtils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/DateUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.adapter; +package org.onap.portalsdk.analytics.system.fusion.adapter; import java.io.Serializable; @@ -27,11 +45,11 @@ import java.util.Date; import java.util.List; import java.util.TimeZone; -import org.openecomp.portalsdk.core.FusionObject; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.FusionObject; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; public class DateUtils implements Serializable, FusionObject{ diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/FusionAdapter.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/FusionAdapter.java index 68f94715..c4732207 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/FusionAdapter.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/FusionAdapter.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.adapter; +package org.onap.portalsdk.analytics.system.fusion.adapter; import java.sql.*; import java.util.*; @@ -32,9 +50,9 @@ import org.hibernate.SessionFactory; import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionImplementor; -import org.openecomp.portalsdk.core.FusionObject; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.FusionObject; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/IdName.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/IdName.java new file mode 100644 index 00000000..ac068614 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/IdName.java @@ -0,0 +1,85 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system.fusion.adapter; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; + +import org.onap.portalsdk.core.domain.support.DomainVo; + +/** + * <p>IdName.java</p> + * <p>Represents a id/name data object.</p> +*/ +@Entity +public class IdName extends DomainVo { + + private String name; + private Long id; + + public IdName() {} + + @Id + @GeneratedValue + @Column(name = "ID", unique = true, nullable = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int compareTo(Object obj){ + String c1 = getName(); + String c2 = ((IdName)obj).getName(); + + return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2); + } + +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/Item.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/Item.java new file mode 100644 index 00000000..97e8a219 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/Item.java @@ -0,0 +1,73 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system.fusion.adapter; + + +public class Item { + private String _id; + private String _name; + + public Item() { + } + + public Item(String id, String name) { + this._id = id; + this._name = name; + } + + public String getId() { + return _id; + } + + public void setId(String id) { + this._id = id; + } + + public String getName() { + return _name; + } + + public void setName(String name) { + this._name = name; + } + + public String toString() { + return _name; + } +} + diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/Lookup.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/Lookup.java index f6525fc4..a2952242 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/Lookup.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/Lookup.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.adapter; +package org.onap.portalsdk.analytics.system.fusion.adapter; import java.io.*; -import org.openecomp.portalsdk.core.domain.FusionVo; -import org.openecomp.portalsdk.core.domain.support.NameValueId; +import org.onap.portalsdk.core.domain.FusionVo; +import org.onap.portalsdk.core.domain.support.NameValueId; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java index 3f13de79..9e7a6134 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/RaptorAdapter.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.adapter; +package org.onap.portalsdk.analytics.system.fusion.adapter; import java.util.HashMap; import java.util.HashSet; @@ -31,35 +49,34 @@ import java.util.TreeSet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.core.domain.Menu; -import org.openecomp.portalsdk.core.domain.MenuData; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.core.domain.Menu; +import org.onap.portalsdk.core.domain.MenuData; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service("raptorAdapter") public class RaptorAdapter extends FusionAdapter { + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RaptorAdapter.class); + @Autowired private static DataAccessService dataAccessService; - - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RaptorAdapter.class); - public static final int RAPTOR_USER_ID = 20000; // RAPTOR system user id (for auditing purposes) - public static final String RAPTOR_CONTROLLER_CLASSNAME = "org.openecomp.portalsdk.analytics.controller.Controller"; + public static final String RAPTOR_CONTROLLER_CLASSNAME = "org.onap.portalsdk.analytics.controller.Controller"; public static final String KEY_USER_ROLES_CACHE = "userRoles"; public void initializeRaptor() { - org.openecomp.portalsdk.analytics.config.ConfigLoader.setConfigFilesPath(SystemProperties.getProperty(SystemProperties.RAPTOR_CONFIG_FILE_PATH)); - org.openecomp.portalsdk.analytics.system.Globals.initializeSystem(getServletContext()); + org.onap.portalsdk.analytics.config.ConfigLoader.setConfigFilesPath(SystemProperties.getProperty(SystemProperties.RAPTOR_CONFIG_FILE_PATH)); + org.onap.portalsdk.analytics.system.Globals.initializeSystem(getServletContext()); } @@ -267,10 +284,6 @@ public class RaptorAdapter extends FusionAdapter { else return false; } - - // public static void processErrorNotification(HttpServletRequest request, Exception e) { - //org.openecomp.portalsdk.core.web.support.AppUtils.processError(e, logger, request); - //} /** Obtains menu label by ID */ public static String getMenuLabel(String menuId) { @@ -354,7 +367,7 @@ public class RaptorAdapter extends FusionAdapter { public static DataAccessService getDataAccessService() { - return org.openecomp.portalsdk.core.web.support.AppUtils.getDataAccessService(); + return org.onap.portalsdk.core.web.support.AppUtils.getDataAccessService(); } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/SpringContext.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/SpringContext.java new file mode 100644 index 00000000..d6d6c966 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/adapter/SpringContext.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system.fusion.adapter; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +@Component("springContext") +public class SpringContext implements ApplicationContextAware { + private static ApplicationContext context; + + public void setApplicationContext(ApplicationContext context) throws BeansException { + this.context = context; + } + public static ApplicationContext getApplicationContext() { + return context; + } +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/controller/FileServletController.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java index 78e3ca50..d3d095b3 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/controller/FileServletController.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/controller/FileServletController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.controller; +package org.onap.portalsdk.analytics.system.fusion.controller; /** * Raptor Blob Extract Servlet * @@ -38,17 +56,16 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.DataAccessService; import org.springframework.web.servlet.ModelAndView;; public class FileServletController { - private DataAccessService dataAccessService; - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FileServletController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FileServletController.class); + private DataAccessService dataAccessService; public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/CR_Report.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/CR_Report.java index 4ec7a546..e30d9cad 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/CR_Report.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/CR_Report.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.domain; +package org.onap.portalsdk.analytics.system.fusion.domain; import java.util.*; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.domain.support.DomainVo;; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.support.DomainVo;; /** * <p>CR_Report.java</p> diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/QuickLink.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/QuickLink.java new file mode 100644 index 00000000..32f03f32 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/QuickLink.java @@ -0,0 +1,79 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.system.fusion.domain; + +public class QuickLink { + + private String reportURL; + private String reportName; + private String reportDescr; + private Boolean showDescr; + + public String getReportURL() { + return reportURL; + } + + public void setReportURL(String reportURL) { + this.reportURL = reportURL; + } + + public String getReportName() { + return reportName; + } + + public void setReportName(String reportName) { + this.reportName = reportName; + } + + public String getReportDescr() { + return reportDescr; + } + + public void setReportDescr(String reportDescr) { + this.reportDescr = reportDescr; + } + + public Boolean getShowDescr() { + return showDescr; + } + + public void setShowDescr(Boolean showDescr) { + this.showDescr = showDescr; + } + +} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/RaptorSearch.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/RaptorSearch.java index 08191fe6..a9a9aa3c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/RaptorSearch.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/RaptorSearch.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.domain; +package org.onap.portalsdk.analytics.system.fusion.domain; import java.util.Date; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.core.domain.support.DomainVo;; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.core.domain.support.DomainVo;; public class RaptorSearch extends DomainVo { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/ReportInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/ReportInfo.java index 2511989f..02d49eca 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/ReportInfo.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/domain/ReportInfo.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.domain; +package org.onap.portalsdk.analytics.system.fusion.domain; import java.util.Date; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/service/RaptorService.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/service/RaptorService.java index 36bbcf9a..675b0606 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/service/RaptorService.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/service/RaptorService.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.service; +package org.onap.portalsdk.analytics.system.fusion.service; import java.util.*; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/service/RaptorServiceImpl.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/service/RaptorServiceImpl.java index 0f66b401..f7bb1327 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/service/RaptorServiceImpl.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/service/RaptorServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.service; +package org.onap.portalsdk.analytics.system.fusion.service; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -36,12 +54,12 @@ import javax.sql.DataSource; import org.hibernate.Query; import org.hibernate.Session; -import org.openecomp.portalsdk.analytics.system.fusion.domain.CR_Report; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.service.support.FusionService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.analytics.system.fusion.domain.CR_Report; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.service.support.FusionService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.context.ApplicationContext; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.orm.hibernate3.SessionFactoryUtils; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/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 17052f4a..668431d5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/web/RaptorController.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.web; +package org.onap.portalsdk.analytics.system.fusion.web; import java.io.IOException; import java.io.PrintWriter; @@ -29,15 +47,15 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.analytics.controller.Action; -import org.openecomp.portalsdk.analytics.controller.ErrorHandler; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.model.runtime.ErrorJSONRuntime; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.analytics.controller.Action; +import org.onap.portalsdk.analytics.controller.ErrorHandler; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.model.runtime.ErrorJSONRuntime; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +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.RequestMethod; @@ -51,7 +69,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; @RequestMapping("/") public class RaptorController extends RestrictedBaseController { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RaptorController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RaptorController.class); @RequestMapping(value = { "/report" }, method = RequestMethod.GET) public ModelAndView report(HttpServletRequest request) { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/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 1613e4e2..03a0c6cc 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.web; +package org.onap.portalsdk.analytics.system.fusion.web; import java.io.IOException; import java.io.OutputStreamWriter; @@ -40,68 +58,62 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.controller.Action; -import org.openecomp.portalsdk.analytics.controller.ErrorHandler; -import org.openecomp.portalsdk.analytics.controller.WizardSequence; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.model.DataCache; -import org.openecomp.portalsdk.analytics.model.ReportHandler; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.model.base.ReportUserRole; -import org.openecomp.portalsdk.analytics.model.definition.ReportDefinition; -import org.openecomp.portalsdk.analytics.model.definition.SecurityEntry; -import org.openecomp.portalsdk.analytics.model.definition.wizard.ColumnEditJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.ColumnJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.DefinitionJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.FormEditJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.IdNameBooleanJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.ImportJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.MessageJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.NameBooleanJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.QueryJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.QueryResultJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.RaptorResponse; -import org.openecomp.portalsdk.analytics.model.definition.wizard.SearchFieldJSON; -import org.openecomp.portalsdk.analytics.model.definition.wizard.WizardJSON; -import org.openecomp.portalsdk.analytics.model.pdf.PdfReportHandler; -import org.openecomp.portalsdk.analytics.model.runtime.CategoryAxisJSON; -import org.openecomp.portalsdk.analytics.model.runtime.ChartJSON; -import org.openecomp.portalsdk.analytics.model.runtime.ErrorJSONRuntime; -import org.openecomp.portalsdk.analytics.model.runtime.FormField; -import org.openecomp.portalsdk.analytics.model.runtime.RangeAxisJSON; -import org.openecomp.portalsdk.analytics.model.runtime.ReportFormFields; -import org.openecomp.portalsdk.analytics.model.runtime.ReportRuntime; -import org.openecomp.portalsdk.analytics.system.AppUtils; -import org.openecomp.portalsdk.analytics.system.ConnectionUtils; -import org.openecomp.portalsdk.analytics.system.Globals; -import org.openecomp.portalsdk.analytics.system.fusion.adapter.Item; -import org.openecomp.portalsdk.analytics.util.AppConstants; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Utils; -import org.openecomp.portalsdk.analytics.util.XSSFilter; -import org.openecomp.portalsdk.analytics.view.ReportData; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; -import org.openecomp.portalsdk.analytics.xmlobj.FormFieldType; -import org.openecomp.portalsdk.analytics.xmlobj.ObjectFactory; -import org.openecomp.portalsdk.analytics.xmlobj.PredefinedValueList; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.analytics.controller.Action; +import org.onap.portalsdk.analytics.controller.ErrorHandler; +import org.onap.portalsdk.analytics.controller.WizardSequence; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.error.RaptorRuntimeException; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.model.DataCache; +import org.onap.portalsdk.analytics.model.ReportHandler; +import org.onap.portalsdk.analytics.model.base.IdNameValue; +import org.onap.portalsdk.analytics.model.base.ReportUserRole; +import org.onap.portalsdk.analytics.model.definition.ReportDefinition; +import org.onap.portalsdk.analytics.model.definition.SecurityEntry; +import org.onap.portalsdk.analytics.model.definition.wizard.ColumnEditJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.ColumnJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.DefinitionJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.FormEditJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.IdNameBooleanJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.ImportJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.MessageJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.NameBooleanJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.QueryJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.QueryResultJSON; +import org.onap.portalsdk.analytics.model.definition.wizard.RaptorResponse; +import org.onap.portalsdk.analytics.model.definition.wizard.SearchFieldJSON; +import org.onap.portalsdk.analytics.model.pdf.PdfReportHandler; +import org.onap.portalsdk.analytics.model.runtime.CategoryAxisJSON; +import org.onap.portalsdk.analytics.model.runtime.ChartJSON; +import org.onap.portalsdk.analytics.model.runtime.ErrorJSONRuntime; +import org.onap.portalsdk.analytics.model.runtime.FormField; +import org.onap.portalsdk.analytics.model.runtime.RangeAxisJSON; +import org.onap.portalsdk.analytics.model.runtime.ReportFormFields; +import org.onap.portalsdk.analytics.model.runtime.ReportRuntime; +import org.onap.portalsdk.analytics.system.AppUtils; +import org.onap.portalsdk.analytics.system.ConnectionUtils; +import org.onap.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.util.AppConstants; +import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.Utils; +import org.onap.portalsdk.analytics.util.XSSFilter; +import org.onap.portalsdk.analytics.view.ReportData; +import org.onap.portalsdk.analytics.xmlobj.DataColumnType; +import org.onap.portalsdk.analytics.xmlobj.FormFieldType; +import org.onap.portalsdk.analytics.xmlobj.ObjectFactory; +import org.onap.portalsdk.analytics.xmlobj.PredefinedValueList; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.stereotype.Controller; 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.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.context.request.async.DeferredResult; -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @@ -109,7 +121,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; @RequestMapping("/") public class RaptorControllerAsync extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RaptorControllerAsync.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RaptorControllerAsync.class); private String viewName; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/web/ReportsSearchListController.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/ReportsSearchListController.java index 79aa0051..489ca232 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/web/ReportsSearchListController.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/web/ReportsSearchListController.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.system.fusion.web; +package org.onap.portalsdk.analytics.system.fusion.web; import java.util.*; import javax.servlet.http.*; -import org.openecomp.portalsdk.analytics.system.fusion.domain.CR_Report; -import org.openecomp.portalsdk.analytics.system.fusion.service.RaptorService; +import org.onap.portalsdk.analytics.system.fusion.domain.CR_Report; +import org.onap.portalsdk.analytics.system.fusion.service.RaptorService; import org.springframework.web.bind.*; import org.springframework.web.servlet.*; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/AppConstants.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/AppConstants.java index f37d6fb7..ea94153e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/AppConstants.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/AppConstants.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; import java.awt.Color; -import org.openecomp.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.model.base.*; /**<HR/> * This class is part of <B><I>RAPTOR (Rapid Application Programming Tool for OLAP Reporting)</I></B><BR/> diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/DataSet.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/DataSet.java index ff0b1d9a..306c7834 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/DataSet.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/DataSet.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; import java.io.Serializable; import java.sql.*; import java.util.*; -import org.openecomp.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.system.Globals; public class DataSet extends Vector implements Serializable { private Vector columnNames = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/ExcelColorDef.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/ExcelColorDef.java index f26a5716..eb87537c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/ExcelColorDef.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/ExcelColorDef.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; import java.util.HashMap; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/HtmlStripper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/HtmlStripper.java index 946eb242..00b65671 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/HtmlStripper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/HtmlStripper.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; import java.io.*; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class HtmlStripper extends RaptorObject// this function can be accessed publicly { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Log.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Log.java new file mode 100644 index 00000000..ba12485d --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Log.java @@ -0,0 +1,58 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.util; + +public class Log { + + public Log() { + } + + public static void write(String info) { + System.out.println(info); + } // write + + public static void write(String info, int debugLevel) { + if (debugLevel <= org.onap.portalsdk.analytics.system.Globals.getDebugLevel()) + write(info); + } // write + + public static void writeError(String info) { + System.err.println(info); + } // writeError + +} // Log diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/RemDbInfo.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/RemDbInfo.java index 78f3b822..c2a51f4d 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/RemDbInfo.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/RemDbInfo.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; import java.util.HashMap; -import org.openecomp.portalsdk.analytics.system.DbUtils; -import org.openecomp.portalsdk.analytics.system.Globals; +import org.onap.portalsdk.analytics.system.DbUtils; +import org.onap.portalsdk.analytics.system.Globals; public class RemDbInfo { private HashMap remDbMap = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/SQLCorrector.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/SQLCorrector.java index 531ea2f8..325ecf14 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/SQLCorrector.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/SQLCorrector.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -26,12 +44,11 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class SQLCorrector { - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SQLCorrector.class); - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SQLCorrector.class); public String fixSQL(StringBuffer sql) { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/Scheduler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Scheduler.java index a0cc7ae0..a075ed4b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/Scheduler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Scheduler.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; import java.sql.SQLException; import java.util.*; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.scheduler.SendNotifications; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.error.ReportSQLException; +import org.onap.portalsdk.analytics.scheduler.SendNotifications; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; public class Scheduler extends TimerTask { private Timer timer = new Timer(true); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/Utils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Utils.java index ebd2b4b6..91fca2c7 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/Utils.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Utils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; import java.util.*; import java.util.regex.Pattern; @@ -27,13 +45,13 @@ import java.text.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.analytics.error.RaptorException; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.system.fusion.adapter.Item; +import org.onap.portalsdk.analytics.error.RaptorException; +import org.onap.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.system.fusion.adapter.Item; -public class Utils extends org.openecomp.portalsdk.analytics.RaptorObject { +public class Utils extends org.onap.portalsdk.analytics.RaptorObject { public Utils() { } @@ -288,7 +306,7 @@ public class Utils extends org.openecomp.portalsdk.analytics.RaptorObject { */ public static void _assert(boolean condition, String errMsg) { - if (org.openecomp.portalsdk.analytics.system.Globals.getDebugLevel() > 0) + if (org.onap.portalsdk.analytics.system.Globals.getDebugLevel() > 0) if (!condition) throw new RuntimeException(errMsg); } // _assert diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/XSSFilter.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/XSSFilter.java index a8d74f2a..7d986c25 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/XSSFilter.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/XSSFilter.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util; +package org.onap.portalsdk.analytics.util; /** * diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/jar/ExtractJar.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/jar/ExtractJar.java index 7be6d0a4..d3f443b8 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/jar/ExtractJar.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/jar/ExtractJar.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util.jar; +package org.onap.portalsdk.analytics.util.jar; import java.io.File; import java.io.FileInputStream; @@ -59,7 +77,7 @@ public class ExtractJar { JarEntry je; while ((je = in.getNextJarEntry()) != null) { if (je.isDirectory() == false) { - if (je.getName().startsWith("org/openecomp/portalsdk/analytics/config/")) { + if (je.getName().startsWith("org/onap/portalsdk/analytics/config/")) { System.out.println(je.getName() + " " + je.getTime()); } @@ -108,10 +126,10 @@ public class ExtractJar { entryStream.closeEntry(); } entryStream.close(); - System.out.println("/WEB-INF/classes/org/openecomp/portalsdk/analytics"); + System.out.println("/WEB-INF/classes/org/onap/portalsdk/analytics"); System.out.println("Delete .... "); - File file1 = new File(directory, "/WEB-INF/classes/org/openecomp/portalsdk/analytics"); + File file1 = new File(directory, "/WEB-INF/classes/org/onap/portalsdk/analytics"); deleteDir(file1); System.out.println("Deleted ...."); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/upgrade/SystemUpgrade.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/upgrade/SystemUpgrade.java index 999c4f46..d8a6635e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/upgrade/SystemUpgrade.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/upgrade/SystemUpgrade.java @@ -1,41 +1,59 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.util.upgrade; +package org.onap.portalsdk.analytics.util.upgrade; import java.io.*; import java.sql.*; import java.util.*; import javax.servlet.http.*; -import org.openecomp.portalsdk.analytics.controller.*; -import org.openecomp.portalsdk.analytics.error.*; -import org.openecomp.portalsdk.analytics.model.*; -import org.openecomp.portalsdk.analytics.model.base.*; -import org.openecomp.portalsdk.analytics.model.definition.*; -import org.openecomp.portalsdk.analytics.model.runtime.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.analytics.view.*; -import org.openecomp.portalsdk.analytics.xmlobj.*; +import org.onap.portalsdk.analytics.controller.*; +import org.onap.portalsdk.analytics.error.*; +import org.onap.portalsdk.analytics.model.*; +import org.onap.portalsdk.analytics.model.base.*; +import org.onap.portalsdk.analytics.model.definition.*; +import org.onap.portalsdk.analytics.model.runtime.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.view.*; +import org.onap.portalsdk.analytics.xmlobj.*; -public class SystemUpgrade extends org.openecomp.portalsdk.analytics.RaptorObject { +public class SystemUpgrade extends org.onap.portalsdk.analytics.RaptorObject { private static final String upgradeFromVersion = "1.x"; private static final String upgradeToVersion = "2.0"; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ColumnHeader.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeader.java index 7285927f..ef78c5fb 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ColumnHeader.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeader.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.util.*; -public class ColumnHeader extends org.openecomp.portalsdk.analytics.RaptorObject { +public class ColumnHeader extends org.onap.portalsdk.analytics.RaptorObject { private String columnTitle = ""; private String columnWidth = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ColumnHeaderRow.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeaderRow.java index 12041e82..f3ecbea2 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ColumnHeaderRow.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeaderRow.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.util.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.util.*; public class ColumnHeaderRow extends Vector { private String rowHeight = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ColumnVisual.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnVisual.java index 1ba07f47..10494636 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ColumnVisual.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnVisual.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class ColumnVisual extends RaptorObject { private String colId = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/CrossTabColumnValues.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/CrossTabColumnValues.java index 83df0bd2..4cc5bc9d 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/CrossTabColumnValues.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/CrossTabColumnValues.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.util.*; -import org.openecomp.portalsdk.analytics.error.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.error.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; -public class CrossTabColumnValues extends org.openecomp.portalsdk.analytics.RaptorObject { +public class CrossTabColumnValues extends org.onap.portalsdk.analytics.RaptorObject { private String colId = null; private Vector columnValues = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/CrossTabOrderManager.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/CrossTabOrderManager.java index 288d66df..4f5d8bf8 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/CrossTabOrderManager.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/CrossTabOrderManager.java @@ -1,34 +1,52 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.util.*; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.analytics.RaptorObject; -import org.openecomp.portalsdk.analytics.error.*; -import org.openecomp.portalsdk.analytics.model.runtime.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.analytics.xmlobj.*; +import org.onap.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.error.*; +import org.onap.portalsdk.analytics.model.runtime.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.xmlobj.*; public class CrossTabOrderManager extends RaptorObject { private Vector colHeaderValues = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/CrossTabTotalValue.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/CrossTabTotalValue.java new file mode 100644 index 00000000..4a450912 --- /dev/null +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/CrossTabTotalValue.java @@ -0,0 +1,74 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.analytics.view; + +import java.util.*; + +public class CrossTabTotalValue extends org.onap.portalsdk.analytics.RaptorObject { + private Vector headerValues = null; + + private String totalValue = null; + + public CrossTabTotalValue() { + super(); + } + + public CrossTabTotalValue(Vector headerValues, String totalValue) { + this(); + + setHeaderValues(headerValues); + setTotalValue(totalValue); + } // CrossTabTotalValue + + public Vector getHeaderValues() { + return headerValues; + } + + public String getTotalValue() { + return totalValue; + } + + public void setHeaderValues(Vector headerValues) { + this.headerValues = headerValues; + } + + public void setTotalValue(String totalValue) { + this.totalValue = totalValue; + } + +} // CrossTabTotalValue diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/DataRow.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/DataRow.java index d9d78cfb..105ecd8f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/DataRow.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/DataRow.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.util.*; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/DataValue.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/DataValue.java index af018cf7..5c83877e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/DataValue.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/DataValue.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.util.*; -public class DataValue extends org.openecomp.portalsdk.analytics.RaptorObject { +public class DataValue extends org.onap.portalsdk.analytics.RaptorObject { private String displayValue = ""; private String displayCalculatedValue = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/HtmlFormatter.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/HtmlFormatter.java index 92a3d738..9569049a 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/HtmlFormatter.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/HtmlFormatter.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; -import org.openecomp.portalsdk.analytics.RaptorObject; +import org.onap.portalsdk.analytics.RaptorObject; public class HtmlFormatter extends RaptorObject { private boolean bold = false; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ReportColumnHeaderRows.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportColumnHeaderRows.java index 886c35fa..fd8a1354 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ReportColumnHeaderRows.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportColumnHeaderRows.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.util.*; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ReportData.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportData.java index 4a8a6210..a46456ec 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ReportData.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportData.java @@ -1,33 +1,51 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.io.Serializable; import java.util.*; -import org.openecomp.portalsdk.analytics.model.runtime.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; -import org.openecomp.portalsdk.analytics.xmlobj.*; +import org.onap.portalsdk.analytics.model.runtime.*; +import org.onap.portalsdk.analytics.system.*; +import org.onap.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.xmlobj.*; -public class ReportData extends org.openecomp.portalsdk.analytics.RaptorObject implements Serializable { +public class ReportData extends org.onap.portalsdk.analytics.RaptorObject implements Serializable { // private static final boolean sortData = true; // sort cross-tab data by // row/col name while being added private static final int MAX_NUM_COLS = 150; // -1 => no restriction diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ReportDataRows.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportDataRows.java index e941c123..39cc9925 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ReportDataRows.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportDataRows.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.util.*; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ReportRowHeaderCols.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportRowHeaderCols.java index ae6ee767..82ae0f7d 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/ReportRowHeaderCols.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportRowHeaderCols.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.util.*; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/RowHeader.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/RowHeader.java index c02b39b2..d7de647c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/RowHeader.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/RowHeader.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.util.*; -public class RowHeader extends org.openecomp.portalsdk.analytics.RaptorObject { +public class RowHeader extends org.onap.portalsdk.analytics.RaptorObject { private String rowTitle = ""; private String rowHeight = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/RowHeaderCol.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/RowHeaderCol.java index 439f2f46..31233e42 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/RowHeaderCol.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/RowHeaderCol.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.analytics.view; +package org.onap.portalsdk.analytics.view; import java.util.*; -import org.openecomp.portalsdk.analytics.util.*; +import org.onap.portalsdk.analytics.util.*; public class RowHeaderCol extends Vector { private String columnWidth = ""; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ChartAdditionalOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartAdditionalOptions.java index be1c0ad3..f18314c8 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ChartAdditionalOptions.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartAdditionalOptions.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ChartDrillFormfield.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillFormfield.java index ae750647..e0b3d9cc 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ChartDrillFormfield.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillFormfield.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ChartDrillOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillOptions.java index e7ce059e..c1090a06 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ChartDrillOptions.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillOptions.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ColFilterList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterList.java index 5d17d38a..b05f17d8 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ColFilterList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ColFilterType.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterType.java index eb38fb86..47b4c46f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ColFilterType.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterType.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/CustomReportType.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/CustomReportType.java index f86e1991..465c63be 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/CustomReportType.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/CustomReportType.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DashboardEditorList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorList.java index d344845a..36c39a7f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DashboardEditorList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DashboardEditorReport.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorReport.java index ad68a4bf..2442d0bb 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DashboardEditorReport.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorReport.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DashboardReports.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReports.java index 99cb986d..3ab80e93 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DashboardReports.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReports.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DashboardReportsNew.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReportsNew.java index 341eb434..db0a25e1 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DashboardReportsNew.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReportsNew.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataColumnList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnList.java index 7068a3ed..554c6b87 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataColumnList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataColumnType.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnType.java index 66a32175..10433d31 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataColumnType.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnType.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataSourceList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataSourceList.java index 38e0103b..5d863ccc 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataSourceList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataSourceList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataSourceType.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataSourceType.java index 3857a4f9..6156353b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataSourceType.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataSourceType.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataminingOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataminingOptions.java index 3df9dc8b..61a474c6 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/DataminingOptions.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataminingOptions.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/FormFieldList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/FormFieldList.java index 373657cb..a329888b 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/FormFieldList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/FormFieldList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/FormFieldType.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/FormFieldType.java index d7be2206..f998f8c5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/FormFieldType.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/FormFieldType.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/FormatList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/FormatList.java index f97ff50e..110e0392 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/FormatList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/FormatList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/FormatType.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/FormatType.java index 4388b869..bc21f9c1 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/FormatType.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/FormatType.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/JavascriptItemType.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/JavascriptItemType.java index 7d52a9b6..d0697a74 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/JavascriptItemType.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/JavascriptItemType.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/JavascriptList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/JavascriptList.java index 3bf8d8aa..876a78ae 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/JavascriptList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/JavascriptList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/Marker.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/Marker.java index e57824d7..7eaca274 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/Marker.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/Marker.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ObjectFactory.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ObjectFactory.java index 35cbe8c8..ce79171e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ObjectFactory.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ObjectFactory.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlElementDecl; @@ -36,7 +54,7 @@ import javax.xml.namespace.QName; /** * This object contains factory methods for each * Java content interface and Java element interface - * generated in the org.openecomp.portalsdk.analytics.xmlobj package. + * generated in the org.onap.portalsdk.analytics.xmlobj package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML @@ -54,7 +72,7 @@ public class ObjectFactory { private final static QName _Comment_QNAME = new QName("", "comment"); /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.portalsdk.analytics.xmlobj + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.onap.portalsdk.analytics.xmlobj * */ public ObjectFactory() { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/PDFAdditionalOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/PDFAdditionalOptions.java index 36fce125..f12cbada 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/PDFAdditionalOptions.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/PDFAdditionalOptions.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/PredefinedValueList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/PredefinedValueList.java index 2f656d02..2136c219 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/PredefinedValueList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/PredefinedValueList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ReportMap.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ReportMap.java index b1ac30d4..b222acc0 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/ReportMap.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ReportMap.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/Reports.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/Reports.java index be1bc395..305dd8f7 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/Reports.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/Reports.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/SemaphoreList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/SemaphoreList.java index 54ffa7ac..3fdbd65e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/SemaphoreList.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/SemaphoreList.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/SemaphoreType.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/SemaphoreType.java index ec371a51..de48436e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/xmlobj/SemaphoreType.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/SemaphoreType.java @@ -1,21 +1,39 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 @@ -25,7 +43,7 @@ // -package org.openecomp.portalsdk.analytics.xmlobj; +package org.onap.portalsdk.analytics.xmlobj; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/RaptorObject.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/RaptorObject.java deleted file mode 100644 index 111409fe..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/RaptorObject.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics; - -public class RaptorObject extends java.lang.Object { - - protected String nvl(String s) { - return (s == null) ? "" : s; - } - - protected String nvl(String s, String sDefault) { - return nvl(s).equals("") ? sDefault : s; - } - - protected static String nvls(String s) { - return (s == null) ? "" : s; - } - - protected static String nvls(String s, String sDefault) { - return nvls(s).equals("") ? sDefault : s; - } - - protected boolean getFlagInBoolean(String s) { - return nvl(s).toUpperCase().startsWith("Y") || nvl(s).toLowerCase().equals("true"); - } - -} // RaptorObject diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/config/ConfigLoader.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/config/ConfigLoader.java deleted file mode 100644 index edbd396d..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/config/ConfigLoader.java +++ /dev/null @@ -1,193 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.config; - -import java.io.*; -import java.util.*; -import javax.servlet.*; - -import org.openecomp.portalsdk.analytics.controller.*; -import org.openecomp.portalsdk.analytics.util.*; - -public class ConfigLoader { - // public static final String RAPTOR_ACTION_MAP = - // "raptor_action_map.properties"; - - private static final String P_FILE_EXTENSION = ".properties"; - - public static final String RAPTOR_PROPERTIES = "raptor"; - - public static final String SQL_PROPERTIES = "sql"; - - public static final String APP_PROPERTIES = "raptor_app"; - - public static final String DB_PROPERTIES = "raptor_db"; - - private static String configFilesPath = "/WEB-INF/conf/"; - - public static final String RAPTOR_PDF_PROPERTIES = "raptor_pdf"; - - // private static String internalFilesPath = - // "/WEB-INF/classes/org/openecomp/portalsdk/analytics/config"; // Used for internal files that - // are not supposed to be modified by the user; may be unavailable in some - // cases - so defaults are expected - - private static String raptorActionMapString = - "report.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_run.jsp \n" - + "mobile.report.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |mobile_report_run.jsp \n" - + "report.dashrep1.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportDashRep1 |report_run_dashrep1.jsp \n" - + "report.dashrep2.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportDashRep2 |report_run_dashrep2.jsp \n" - + "report.dashrep3.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportDashRep3 |report_run_dashrep3.jsp \n" - + "report.dashrep4.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportDashRep4 |report_run_dashrep4.jsp \n" - + "report.download |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_xls.jsp \n" - + "report.download.excel2007 |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_xlsx.jsp \n" - + "report.download.page |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_page_xls.jsp \n" - + "report.csv.download |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_csv.jsp \n" - + "report.text.download |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_txt.jsp \n" - + "report.search |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportSearch |report_search.jsp \n" - + "report.search.execute |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportSearchExecute |report_search \n" - + "report.search.user |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportSearchUser |report_search.jsp \n" - + "report.search.public |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportSearchPublic |report_search.jsp \n" - + "report.search.favorite |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportSearchFavorites |report_search.jsp \n" - + "report.wizard |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportWizard |report_wizard \n" - + "report.create |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportCreate |report_wizard \n" - + "report.import |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_import \n" - + "report.import.save |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportImportSave |report_wizard \n" - + "report.copy |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportCopy |report_wizard \n" - + "report.copy.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportCopy |raptor_wizard_container.jsp \n" - + "report.edit |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportEdit |report_wizard \n" - + "report.delete |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportDelete |report_search \n" - + "report.popup.field |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportFormFieldPopup |popup_field.jsp \n" - + "report.popup.map |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportValuesMapDefPopup |popup_map.jsp \n" - + "report.popup.drilldown.table |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_drill_down_table.jsp \n" - + "report.popup.drilldown.report|org.openecomp.portalsdk.analytics.controller.ActionHandler|reportDrillDownToReportDefPopup|popup_drill_down_report \n" - + "report.popup.import.semaphore|org.openecomp.portalsdk.analytics.controller.ActionHandler|importSemaphorePopup |popup_import_semaphore \n" - + "report.popup.semaphore |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_semaphore \n" - + "report.popup.semaphore.save |org.openecomp.portalsdk.analytics.controller.ActionHandler|saveSemaphorePopup |popup_semaphore \n" - + "report.popup.filter.col |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_filter_col.jsp \n" - + "report.popup.filter.data |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportFilterDataPopup |popup_filter_data.jsp \n" - + "report.popup.sql |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportShowSQLPopup |popup_sql \n " - + "report.run.popup |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_run_popup.jsp \n" - + "report.popup.test.cond |org.openecomp.portalsdk.analytics.controller.ActionHandler|testSchedCondPopup |popup_sql \n" - + "report.popup.testrun.sql |org.openecomp.portalsdk.analytics.controller.ActionHandler|testRunSQLPopup |popup_testrun_sql \n" - + "report.test.jsp |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |test_run_sql \n" - + "report.field.testrun.jsp |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |test_field_run_sql \n" - + "report.field.default.testrun.jsp |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |default_field_run_sql \n" - + "report.field.date.start.testrun.jsp |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |date_start_field_run_sql \n" - + "report.field.date.end.testrun.jsp |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |date_end_field_run_sql \n" - + "report.popup.table.cols |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_table_cols \n" - + "refresh.cache |org.openecomp.portalsdk.analytics.controller.ActionHandler|refreshCache |message.jsp \n" - + "report.message |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |message.jsp \n" - + "report.download.pdf |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_pdf.jsp \n" - + "report.popup.pdfconfig |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_pdf_config.jsp \n" - + "download.all |org.openecomp.portalsdk.analytics.controller.ActionHandler|downloadAll |close.jsp \n" - + "download.all.jsp |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |popup_download_flat_file.jsp \n" - + "download.data.file |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |download_data_file.jsp \n" - + "popup.calendar |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |gtm_calendar.jsp \n" - + "report.folderlist |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |folder_report_list.jsp \n" - + "report.folderlist_iframe |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |folder_report_list_iframe.jsp \n" - + "report.childDropDown |org.openecomp.portalsdk.analytics.controller.ActionHandler|getChildDropDown |raptor_childdropdown.jsp \n" - + "report.create.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_create_container.jsp \n" - + "report.search.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_container.jsp \n" - + "report.search.execute.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_execute_container.jsp \n" - + "report.search.user.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_user_container.jsp \n" - + "report.search.public.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_public_container.jsp \n" - + "report.search.favorite.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_search_favorite_container.jsp \n" - + "report.run.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_run_container.jsp \n" - + "report.formfields.run.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|formFieldRun |report_run_container.jsp \n" - + "report.run.jsp |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_run.jsp \n" - + "report.schedule.multiple |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |wizard_schedule_multiple.jsp \n" - + "report.schedule.submit |org.openecomp.portalsdk.analytics.controller.ActionHandler|processSchedule |wizard_schedule_only.jsp \n" - + "report.schedule.report.submit |org.openecomp.portalsdk.analytics.controller.ActionHandler|processScheduleReportList |wizard_schedule_only.jsp \n" - + "report.schedule.report.submit_wmenu |org.openecomp.portalsdk.analytics.controller.ActionHandler|processScheduleReportList |wizard_schedule_only_from_search.jsp \n" - + "report.schedule_only |org.openecomp.portalsdk.analytics.controller.ActionHandler|processSchedule |wizard_schedule_only \n" - + "report.schedule_only_from_search |org.openecomp.portalsdk.analytics.controller.ActionHandler|processSchedule |wizard_schedule_only_from_search.jsp \n" - + "report.schedule_delete |org.openecomp.portalsdk.analytics.controller.ActionHandler|processScheduleDelete |report_run_container.jsp \n" - + "report.schedule.submit_from_search |org.openecomp.portalsdk.analytics.controller.ActionHandler|processSchedule |wizard_schedule_only_from_search.jsp \n" - + "report.dashboard.detail |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |dashboard_report_run_detail.jsp \n" - + "report.csv.download.direct |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_csv.jsp \n" - + "report.csv.download.direct |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportRun |report_download_csv.jsp \n" - + "report.download.csv.session |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_csv \n" - + "report.download.excel2007.session |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_xlsx.jsp \n" - + "report.download.excel.session |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_xls.jsp \n" - + "report.download.pdf.session |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_pdf.jsp \n" - + "report.download.page.session |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_download_page_xls.jsp \n" - + "report.data.remove.session |org.openecomp.portalsdk.analytics.controller.ActionHandler|removeReportDataFromSession |report_run_container.jsp \n" - + "report.dashboard.run.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_dashboard_run_container.jsp \n" - + "chart.force.cluster |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |force_cluster.jsp \n" - + "chart.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportChartRun |report_run_container.jsp \n" - + "chart.json |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportChartRun |report_run_container.jsp \n" - + "chart.data.json |org.openecomp.portalsdk.analytics.controller.ActionHandler|reportChartDataRun |report_run_container.jsp \n" - + "quicklinks.json |org.openecomp.portalsdk.analytics.controller.ActionHandler|getQuickLinksJSON |report_run_container.jsp \n" - + "embed.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_embed_run_container.zul \n" - + "schedule.edit |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |wizard_adhoc_schedule.zul \n" - + "chart.annotations.run |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |plugin_chart_annotation.jsp \n" - + "chart.annotations.exec |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |chart_annotations.jsp \n" - + "chart.mini |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |chart_minified.jsp \n" - + "report.olap.run.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_olap_run_container.jsp \n" - + "report.hive.run.container |org.openecomp.portalsdk.analytics.controller.ActionHandler|gotoJsp |report_hive_run_container.jsp \n" - - ; - - private ConfigLoader() { - } - - public static void setConfigFilesPath(String path) { - configFilesPath = path; - } // setConfigFilesPath - - public static Properties getProperties(ServletContext servletContext, String propertiesFile) - throws IOException { - return getProperties(servletContext, propertiesFile, null); - } // getProperties - - public static Properties getProperties(ServletContext servletContext, - String propertiesFile, String systemTypeExtension) throws IOException { - Properties p = new Properties(); - p.load(servletContext.getResourceAsStream(configFilesPath + propertiesFile - + ((systemTypeExtension == null) ? "" : "_" + systemTypeExtension) - + P_FILE_EXTENSION)); - return p; - } // getProperties - - public static ActionMapping loadRaptorActionMapping(ServletContext servletContext) - throws IOException { - ActionMapping actionMapping = new ActionMapping(); - - String pLine = null; - // BufferedReader pFile = new BufferedReader(new - // InputStreamReader(servletContext.getResourceAsStream(internalFilesPath+RAPTOR_ACTION_MAP))); - BufferedReader pFile = new BufferedReader(new StringReader(raptorActionMapString)); - while ((pLine = pFile.readLine()) != null) - if (pLine.trim().length() > 0) - try { - actionMapping.addAction(Action.parse(pLine)); - } catch (Exception e) { - Log - .write("[ConfigLoader.loadRaptorActionMapping] Error - unable to parse action [" - + pLine + "]"); - } - pFile.close(); - - return actionMapping; - } // loadRaptorActionMapping - -} // ConfigLoader - diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/ActionMapping.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/ActionMapping.java deleted file mode 100644 index 4664141a..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/ActionMapping.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; - -public class ActionMapping extends HashMap { - - public void addAction(Action action) { - put(action.getAction(), action); - } // addAction - - public Action getAction(String actionKey) { - return (Action) get(actionKey); - } // getAction - -} // ActionMapping diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceCrossTab.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceCrossTab.java deleted file mode 100644 index bd0d2fbe..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceCrossTab.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; - -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; - -public class WizardSequenceCrossTab extends WizardSequence { - - public WizardSequenceCrossTab(boolean userIsAuthorizedToSeeLog) { - super(); - - add(AppConstants.WS_TABLES); - add(AppConstants.WS_COLUMNS); - add(AppConstants.WS_FORM_FIELDS); - add(AppConstants.WS_FILTERS); - add(AppConstants.WS_JAVASCRIPT); - add(AppConstants.WS_USER_ACCESS); - //add(AppConstants.WS_SCHEDULE); - if (userIsAuthorizedToSeeLog) - if (Globals.getEnableReportLog()) - add(AppConstants.WS_REPORT_LOG); - add(AppConstants.WS_RUN); - } // WizardSequenceCrossTab - -} // WizardSequenceCrossTab diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceDashboard.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceDashboard.java deleted file mode 100644 index a70659f4..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceDashboard.java +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; - -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; - -public class WizardSequenceDashboard extends WizardSequence { - - public WizardSequenceDashboard(boolean userIsAuthorizedToSeeLog) { - super(); - - add(AppConstants.WS_USER_ACCESS); - //add(AppConstants.WS_SCHEDULE); - if (userIsAuthorizedToSeeLog) - if (Globals.getEnableReportLog()) - add(AppConstants.WS_REPORT_LOG); - add(AppConstants.WS_RUN); - } // WizardSequenceDashboard - -} // WizardSequenceDashboard diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceLinear.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceLinear.java deleted file mode 100644 index f0c912b5..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceLinear.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; - -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; - -public class WizardSequenceLinear extends WizardSequence { - - public WizardSequenceLinear(boolean userIsAuthorizedToSeeLog) { - super(); - - add(AppConstants.WS_TABLES); - add(AppConstants.WS_COLUMNS); - add(AppConstants.WS_FORM_FIELDS); - add(AppConstants.WS_FILTERS); - add(AppConstants.WS_SORTING); - //add(AppConstants.WS_JAVASCRIPT); - //add(AppConstants.WS_CHART); - add(AppConstants.WS_USER_ACCESS); - //add(AppConstants.WS_SCHEDULE); - if (userIsAuthorizedToSeeLog) - if (Globals.getEnableReportLog()) - add(AppConstants.WS_REPORT_LOG); - add(AppConstants.WS_RUN); - } // WizardSequenceLinear - -} // WizardSequenceLinear diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedCrossTab.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedCrossTab.java deleted file mode 100644 index 1ea0d836..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedCrossTab.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; - -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; - -public class WizardSequenceSQLBasedCrossTab extends WizardSequence { - - public WizardSequenceSQLBasedCrossTab(boolean userIsAuthorizedToSeeLog) { - super(); - - add(AppConstants.WS_SQL); - add(AppConstants.WS_COLUMNS); - add(AppConstants.WS_FORM_FIELDS); - add(AppConstants.WS_JAVASCRIPT); - add(AppConstants.WS_USER_ACCESS); - //add(AppConstants.WS_SCHEDULE); - if (userIsAuthorizedToSeeLog) - if (Globals.getEnableReportLog()) - add(AppConstants.WS_REPORT_LOG); - add(AppConstants.WS_RUN); - } // WizardSequenceSQLBasedCrossTab - -} // WizardSequenceSQLBasedCrossTab diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedHive.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedHive.java deleted file mode 100644 index 7bf6bab0..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedHive.java +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; - -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; - -public class WizardSequenceSQLBasedHive extends WizardSequence { - - public WizardSequenceSQLBasedHive(boolean userIsAuthorizedToSeeLog) { - super(); - - add(AppConstants.WS_SQL); - add(AppConstants.WS_COLUMNS); - add(AppConstants.WS_FORM_FIELDS); - add(AppConstants.WS_JAVASCRIPT); - add(AppConstants.WS_CHART); - add(AppConstants.WS_USER_ACCESS); - //add(AppConstants.WS_MAP); - //add(AppConstants.WS_SCHEDULE); - if (userIsAuthorizedToSeeLog) - if (Globals.getEnableReportLog()) - add(AppConstants.WS_REPORT_LOG); - add(AppConstants.WS_RUN); - } // WizardSequenceSQLBasedHive - -} // WizardSequenceSQLBasedHive diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedLinear.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedLinear.java deleted file mode 100644 index a885d13c..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedLinear.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; - -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; - -public class WizardSequenceSQLBasedLinear extends WizardSequence { - - public WizardSequenceSQLBasedLinear(boolean userIsAuthorizedToSeeLog) { - super(); - - add(AppConstants.WS_SQL); - add(AppConstants.WS_COLUMNS); - add(AppConstants.WS_FORM_FIELDS); - //add(AppConstants.WS_JAVASCRIPT); - //if(!Globals.showAnimatedChartOnly()) - //add(AppConstants.WS_CHART); - add(AppConstants.WS_USER_ACCESS); - //add(AppConstants.WS_MAP); - //add(AppConstants.WS_SCHEDULE); - if (userIsAuthorizedToSeeLog) - if (Globals.getEnableReportLog()) - add(AppConstants.WS_REPORT_LOG); - add(AppConstants.WS_RUN); - } // WizardSequenceSQLBasedLinear - -} // WizardSequenceSQLBasedLinear diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedLinearDatamining.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedLinearDatamining.java deleted file mode 100644 index e3106051..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/controller/WizardSequenceSQLBasedLinearDatamining.java +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.controller; - -import java.util.*; - -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.util.*; - -public class WizardSequenceSQLBasedLinearDatamining extends WizardSequence { - - public WizardSequenceSQLBasedLinearDatamining(boolean userIsAuthorizedToSeeLog) { - super(); - - add(AppConstants.WS_SQL); - add(AppConstants.WS_COLUMNS); - add(AppConstants.WS_FORM_FIELDS); - add(AppConstants.WS_DATA_FORECASTING); - add(AppConstants.WS_JAVASCRIPT); - add(AppConstants.WS_CHART); - add(AppConstants.WS_USER_ACCESS); - //add(AppConstants.WS_SCHEDULE); - if (userIsAuthorizedToSeeLog) - if (Globals.getEnableReportLog()) - add(AppConstants.WS_REPORT_LOG); - add(AppConstants.WS_RUN); - } // WizardSequenceSQLBasedLinear - -} // WizardSequenceSQLBasedLinear diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorException.java deleted file mode 100644 index be30afa6..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorException.java +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.error; - -public class RaptorException extends Exception { - - public RaptorException(String message) { - super(message); - } - - public RaptorException(String message, Throwable ex) { - super(message, ex); - } - - public RaptorException(Throwable ex) { - super(ex); - } -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorRuntimeException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorRuntimeException.java deleted file mode 100644 index 6a0c8fbd..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorRuntimeException.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.error; - -public class RaptorRuntimeException extends RaptorException { - - public RaptorRuntimeException (String message) { - super(message); - } - - public RaptorRuntimeException (String message, Throwable ex) { - super(message, ex); - } - - public RaptorRuntimeException (Throwable ex) { - super(ex); - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorSchedularException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorSchedularException.java deleted file mode 100644 index a8496449..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/RaptorSchedularException.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.error; - -public class RaptorSchedularException extends RaptorException { - - public RaptorSchedularException (String message) { - super(message); - } - - public RaptorSchedularException (String message, Throwable ex) { - super(message, ex); - } - - public RaptorSchedularException (Throwable ex) { - super(ex); - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/ReportSQLException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/ReportSQLException.java deleted file mode 100644 index 56688c5a..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/ReportSQLException.java +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.error; - -public class ReportSQLException extends RaptorException { - private String reportSQL = null; - - public ReportSQLException(String message, String reportSQL) { - super(message); - - this.reportSQL = reportSQL; - } // ReportSQLException - - public ReportSQLException(String message, String reportSQL, Throwable ex) { - super(message, ex); - - this.reportSQL = reportSQL; - } // ReportSQLException - - public ReportSQLException(String message) { - super(message); - this.reportSQL = ""; - } // ReportSQLException - - public ReportSQLException(String message, Throwable ex) { - super(message, ex); - this.reportSQL = ""; - } // ReportSQLException - - public String getReportSQL() { - return reportSQL; - } // getReportSQL - -} // ReportSQLException diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/UserAccessException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/UserAccessException.java deleted file mode 100644 index 4df29054..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/UserAccessException.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.error; - -public class UserAccessException extends RaptorRuntimeException { - - public UserAccessException(Throwable ex) { - super(ex); - } // UserAccessException - - public UserAccessException(String reportID, String userName, String accessType) { - //super("User " + userName + " does NOT have " + accessType + " permission for report " - // + reportID); - super("Access denied. Please contact Administrator"); - } // UserAccessException - -} // UserAccessException diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/UserDefinedException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/UserDefinedException.java deleted file mode 100644 index e05c31bd..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/UserDefinedException.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -/** - * - */ -package org.openecomp.portalsdk.analytics.error; - -/** - * @author sundar - * This class is exclusively used to print error messages to user. - * - */ -public class UserDefinedException extends RaptorRuntimeException { - - public UserDefinedException(String message) { - super(message); - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/ValidationException.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/ValidationException.java deleted file mode 100644 index c7aabc53..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/error/ValidationException.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.error; - -public class ValidationException extends RaptorRuntimeException { - private String fieldID = null; - - public ValidationException(String message) { - super(message); - } - - public ValidationException(String message, Throwable ex) { - super(message, ex); - } - - public ValidationException(String fieldID, String message) { - super(message); - this.fieldID = fieldID; - } - - public String getFieldID() { - return fieldID; - } - -} // ValidationException diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/GMapProperties.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/GMapProperties.java deleted file mode 100644 index 2818d99d..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/GMapProperties.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.gmap.map; - -import java.io.InputStream; -import java.util.Properties; - -import org.openecomp.portalsdk.analytics.system.Globals; - -public class GMapProperties { - - public static String getProjectFolder() { - return Globals.getProjectFolder(); - } - - public static String getMarketShapefileFolder() { - return Globals.getMarketShapefileFolder(); - } - - public static String getTileSize() { - return Globals.getTileSize(); - } - - public static String getOutputFolder() { - return Globals.getOutputFolder(); - } - - public static String getTempFolderURL() { - return Globals.getTempFolderURL(); - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/GeoCoordinate.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/GeoCoordinate.java deleted file mode 100644 index 00c694d0..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/gmap/map/GeoCoordinate.java +++ /dev/null @@ -1,25 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.gmap.map; - -public class GeoCoordinate { - public double longitude; - public double latitude; -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ChartSeqComparator.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ChartSeqComparator.java deleted file mode 100644 index 5ec6edfa..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/ChartSeqComparator.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.base; - -import java.util.Comparator; - -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; - -public class ChartSeqComparator implements Comparator { - - public int compare(Object o1, Object o2) { - DataColumnType dct1 = (DataColumnType) o1; - DataColumnType dct2 = (DataColumnType) o2; - - int dct1ChartSeq = (dct1.getChartSeq()!=null ? dct1.getChartSeq().intValue(): -1); - int dct2ChartSeq = (dct2.getChartSeq()!=null ? dct2.getChartSeq().intValue(): -1); - - if (dct1ChartSeq == dct2ChartSeq) - return 0; - else if (dct1ChartSeq < 0) // Position columns - // with seq -1 at - // the end - return 1; - else if (dct2ChartSeq < 0) - return -1; - else if (dct1ChartSeq < dct2ChartSeq) - return -1; - else - return 1; - } // compare - -} // ChartSeqComparator diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameColLookup.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameColLookup.java deleted file mode 100644 index 0c149a45..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/IdNameColLookup.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.base; - -import java.util.*; - -public class IdNameColLookup extends IdNameLookup { - private String colId = null; - - public IdNameColLookup(String colId, String dbTableName, String dbIdField, - String dbNameField, String dbSortByField) { - super(dbTableName, dbIdField, dbNameField, dbSortByField, false); - this.colId = colId; - } // IdNameColLookup - - public String getColId() { - return colId; - } - -} // IdNameColLookup diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/NameComparator.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/NameComparator.java deleted file mode 100644 index 84be8bed..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/NameComparator.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.base; - -import java.util.Comparator; - -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; - -public class NameComparator implements Comparator { - - public int compare(Object o1, Object o2) { - return ((IdNameValue) o1).getName() - .compareToIgnoreCase((((IdNameValue) o2).getName())); - } // compare - -} // NameComparator - diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/OrderBySeqComparator.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/OrderBySeqComparator.java deleted file mode 100644 index 7ea43c98..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/OrderBySeqComparator.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.base; - -import java.util.Comparator; - -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; - -public class OrderBySeqComparator implements Comparator { - - public int compare(Object o1, Object o2) { - if (((DataColumnType) o1).getOrderBySeq() == ((DataColumnType) o2).getOrderBySeq()) - return 0; - else if (((DataColumnType) o1).getOrderBySeq() < ((DataColumnType) o2).getOrderBySeq()) - return -1; - else - return 1; - } // compare - -} // OrderSeqComparator diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/OrderSeqComparator.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/OrderSeqComparator.java deleted file mode 100644 index e1f6d523..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/base/OrderSeqComparator.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.base; - -import java.util.Comparator; - -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; - -public class OrderSeqComparator implements Comparator { - - public int compare(Object o1, Object o2) { - if (((DataColumnType) o1).getOrderSeq() == ((DataColumnType) o2).getOrderSeq()) - return 0; - else if (((DataColumnType) o1).getOrderSeq() < ((DataColumnType) o2).getOrderSeq()) - return -1; - else - return 1; - } // compare - -} // OrderSeqComparator diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/SecurityEntry.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/SecurityEntry.java deleted file mode 100644 index 4e4b758d..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/SecurityEntry.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition; - -import org.openecomp.portalsdk.analytics.model.base.*; - -public class SecurityEntry extends IdNameValue { - private boolean readOnly = true; - - public SecurityEntry() { - super(); - } - - public SecurityEntry(String id, String name, boolean readOnly) { - super(id, name); - setReadOnly(readOnly); - } // SecurityEntry - - public boolean isReadOnly() { - return readOnly; - } - - public void setReadOnly(boolean readOnly) { - this.readOnly = readOnly; - } - -} // SecurityEntry diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/TableJoin.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/TableJoin.java deleted file mode 100644 index e50c9b9d..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/TableJoin.java +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition; - -import org.openecomp.portalsdk.analytics.RaptorObject; - -public class TableJoin extends RaptorObject { - private String srcTableName = null; - - private String destTableName = null; - - private String joinExpr = null; - - public TableJoin() { - super(); - } - - public TableJoin(String srcTableName, String destTableName, String joinExpr) { - this(); - - setSrcTableName(srcTableName); - setDestTableName(destTableName); - setJoinExpr(joinExpr); - } // TableJoin - - public String getSrcTableName() { - return srcTableName; - } - - public String getDestTableName() { - return destTableName; - } - - public String getJoinExpr() { - return joinExpr; - } - - public void setSrcTableName(String srcTableName) { - this.srcTableName = srcTableName; - } - - public void setDestTableName(String destTableName) { - this.destTableName = destTableName; - } - - public void setJoinExpr(String joinExpr) { - this.joinExpr = joinExpr; - } - -} // TableJoin diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ColumnJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ColumnJSON.java deleted file mode 100644 index 185b2c11..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ColumnJSON.java +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -public class ColumnJSON implements ElementJSON { - - private String id; - private String name; - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ElementJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ElementJSON.java deleted file mode 100644 index bf9d34b6..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ElementJSON.java +++ /dev/null @@ -1,33 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -import java.util.ArrayList; -import java.util.Map; - -import org.openecomp.portalsdk.analytics.view.ColumnHeader; - -public interface ElementJSON { - - // To be defined by child class - public String getId(); - public String getName(); - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/IdNameBooleanJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/IdNameBooleanJSON.java deleted file mode 100644 index eddf77dc..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/IdNameBooleanJSON.java +++ /dev/null @@ -1,48 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -public class IdNameBooleanJSON { - - private String id; - private String name; - private boolean selected; - - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - public boolean isSelected() { - return selected; - } - public void setSelected(boolean selected) { - this.selected = selected; - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ImportJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ImportJSON.java deleted file mode 100644 index dcc8a5df..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ImportJSON.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -import java.util.List; - -public class ImportJSON implements WizardJSON { - - private String tabId; - private String tabName; - - private String reportXML; - - - public String getTabId() { - return tabId; - } - public void setTabId(String tabId) { - this.tabId = tabId; - } - public String getTabName() { - return tabName; - } - public void setTabName(String tabName) { - this.tabName = tabName; - } - public String getReportXML() { - return reportXML; - } - public void setReportXML(String reportXML) { - this.reportXML = reportXML; - } - - - - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ListJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ListJSON.java deleted file mode 100644 index a21df969..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/ListJSON.java +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -import java.util.ArrayList; -import java.util.Map; - -import org.openecomp.portalsdk.analytics.view.ColumnHeader; - -public class ListJSON { - - private ArrayList<ElementJSON> elements; - - public ArrayList<ElementJSON> getElements() { - return elements; - } - - public void setElements(ArrayList<ElementJSON> elements) { - this.elements = elements; - } - - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/MessageJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/MessageJSON.java deleted file mode 100644 index 5c81ddfe..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/MessageJSON.java +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; - -import org.json.JSONObject; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; -import org.openecomp.portalsdk.analytics.view.DataValue; -import org.openecomp.portalsdk.analytics.xmlobj.ColFilterList; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnList; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; - -public class MessageJSON { - - private String message; - private String anyStacktrace; - public String getMessage() { - return message; - } - public void setMessage(String message) { - this.message = message; - } - public String getAnyStacktrace() { - return anyStacktrace; - } - public void setAnyStacktrace(String anyStacktrace) { - this.anyStacktrace = anyStacktrace; - } - - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/NameBooleanJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/NameBooleanJSON.java deleted file mode 100644 index 5b9270b2..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/NameBooleanJSON.java +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -public class NameBooleanJSON { - - private String name; - private boolean selected; - - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - public boolean isSelected() { - return selected; - } - public void setSelected(boolean selected) { - this.selected = selected; - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/QueryJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/QueryJSON.java deleted file mode 100644 index 7011935f..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/QueryJSON.java +++ /dev/null @@ -1,60 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -import java.util.ArrayList; -import java.util.Map; - -import org.openecomp.portalsdk.analytics.model.definition.wizard.WizardJSON; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; - -public class QueryJSON implements WizardJSON { - - private String query; - private String tabName; - private String tabId; - - - public String getTabName() { - return tabName; - } - - public void setTabName(String tabName) { - this.tabName = tabName; - } - - public String getTabId() { - return tabId; - } - - public void setTabId(String tabId) { - this.tabId = tabId; - } - - public String getQuery() { - return query; - } - - public void setQuery(String query) { - this.query = query; - } - - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/RaptorError.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/RaptorError.java deleted file mode 100644 index 44b8d5e7..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/RaptorError.java +++ /dev/null @@ -1,31 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -public class RaptorError extends RaptorResponse{ - public RaptorError(String theMessage) { - error().put("message", theMessage); - } - - public RaptorError(String theMessage, Throwable theError) { - error().put("message", theMessage) - .put("exception", theError.toString()); - } -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/RaptorResponse.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/RaptorResponse.java deleted file mode 100644 index f2e94ad3..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/RaptorResponse.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -import org.json.JSONObject; - -import com.fasterxml.jackson.annotation.JsonRawValue; - -public class RaptorResponse { - private JSONObject data = new JSONObject(), - error = new JSONObject(); - - public RaptorResponse() { - } - - public JSONObject data() { - return this.data; - } - - @JsonRawValue - public String getData() { - return this.data.toString(); - } - - public JSONObject error() { - return this.error; - } - - @JsonRawValue - public String getError() { - return this.error.toString(); - } -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/SearchFieldJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/SearchFieldJSON.java deleted file mode 100644 index c8ab09a4..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/SearchFieldJSON.java +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -public class SearchFieldJSON implements ElementJSON { - - private String id; - private String name; - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/WizardJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/WizardJSON.java deleted file mode 100644 index d2142e92..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/definition/wizard/WizardJSON.java +++ /dev/null @@ -1,29 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.definition.wizard; - -public interface WizardJSON { - - public String getTabName(); - public void setTabName(String tabName); - public String getTabId(); - public void setTabId(String tabId); - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/CategoryAxisJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/CategoryAxisJSON.java deleted file mode 100644 index 868a154d..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/CategoryAxisJSON.java +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.runtime; - -public class CategoryAxisJSON extends IndexValueJSON { - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ErrorJSONRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ErrorJSONRuntime.java deleted file mode 100644 index 189a9fb5..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ErrorJSONRuntime.java +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.runtime; - -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; - -import org.json.JSONObject; -import org.openecomp.portalsdk.analytics.model.base.IdNameValue; -import org.openecomp.portalsdk.analytics.view.ColumnHeader; -import org.openecomp.portalsdk.analytics.view.DataValue; -import org.openecomp.portalsdk.analytics.xmlobj.ColFilterList; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnList; -import org.openecomp.portalsdk.analytics.xmlobj.DataColumnType; - -public class ErrorJSONRuntime { - - private String errormessage; - private String stacktrace; - - public String getErrormessage() { - return errormessage; - } - public void setErrormessage(String errormessage) { - this.errormessage = errormessage; - } - public String getStacktrace() { - return stacktrace; - } - public void setStacktrace(String stacktrace) { - this.stacktrace = stacktrace; - } - - - - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/FlexTimeSeriesChartOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/FlexTimeSeriesChartOptions.java deleted file mode 100644 index 0669bb7a..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/FlexTimeSeriesChartOptions.java +++ /dev/null @@ -1,38 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.runtime; - -public class FlexTimeSeriesChartOptions { - private int zoomIn = 25; - private String timeAxisType = ""; - public int getZoomIn() { - return zoomIn; - } - public void setZoomIn(int zoomIn) { - this.zoomIn = zoomIn; - } - public String getTimeAxisType() { - return timeAxisType; - } - public void setTimeAxisType(String timeAxisType) { - this.timeAxisType = timeAxisType; - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/Item.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/Item.java deleted file mode 100644 index 7ffaa3f6..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/Item.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.model.runtime; - -public class Item { - private String _id; - private String _name; - - public Item() { - } - - public Item(String id, String name) { - this._id = id; - this._name = name; - } - - public String getId() { - return _id; - } - - public void setId(String id) { - this._id = id; - } - - public String getName() { - return _name; - } - - public void setName(String name) { - this._name = name; - } - - public String toString() { - return _name; - } -} - diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/IDbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/IDbUtils.java deleted file mode 100644 index 367f6be9..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/IDbUtils.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system; - -import java.sql.*; -import java.util.*; -import javax.servlet.*; - -import org.openecomp.portalsdk.analytics.error.RaptorRuntimeException; -import org.openecomp.portalsdk.analytics.error.ReportSQLException; - -public interface IDbUtils { - void initializeDbUtils(ServletContext servletContext); - - Connection getConnection() throws ReportSQLException ; - - void clearConnection(Connection con) throws ReportSQLException ; - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/RDbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/RDbUtils.java deleted file mode 100644 index d6fd7207..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/RDbUtils.java +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system; - -import java.sql.*; -import javax.servlet.*; - -import org.openecomp.portalsdk.analytics.error.ReportSQLException; - -public interface RDbUtils { - - void initializeDbUtils(ServletContext servletContext); - - Connection getRemoteConnection(String dbKey)throws ReportSQLException; - - void clearConnection(Connection con)throws ReportSQLException; - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/DbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/DbUtils.java deleted file mode 100644 index fc52e0d6..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/DbUtils.java +++ /dev/null @@ -1,78 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system.fusion; - -import java.sql.*; -import java.util.*; - -import javax.servlet.*; - -import org.openecomp.portalsdk.analytics.config.*; -import org.openecomp.portalsdk.analytics.system.*; -import org.openecomp.portalsdk.analytics.system.fusion.adapter.FusionAdapter; -import org.openecomp.portalsdk.analytics.system.fusion.adapter.RaptorAdapter; -import org.openecomp.portalsdk.analytics.system.fusion.adapter.SpringContext; -import org.openecomp.portalsdk.analytics.util.*; -import org.springframework.beans.factory.annotation.Autowired; - - - -public class DbUtils implements IDbUtils { - - @Autowired - public RaptorAdapter raptorAdapter; - @Autowired - public FusionAdapter fusionAdapter; - - public DbUtils() {} - - public void initializeDbUtils(ServletContext servletContext) { - raptorAdapter = (RaptorAdapter)SpringContext.getApplicationContext().getBean("raptorAdapter"); - } // initializeDbUtils - - public Connection getConnection() { - return raptorAdapter.getConnection(); - } // getConnection - - public void clearConnection(Connection con) { - raptorAdapter.releaseConnection(con); - } // clearConnection - - public RaptorAdapter getRaptorAdapter() { - return raptorAdapter; - } - - public void setRaptorAdapter(RaptorAdapter raptorAdapter) { - this.raptorAdapter = raptorAdapter; - } - - public FusionAdapter getFusionAdapter() { - return fusionAdapter; - } - - public void setFusionAdapter(FusionAdapter fusionAdapter) { - this.fusionAdapter = fusionAdapter; - } - - - - - -} // DbUtils diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/RemoteDbUtils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/RemoteDbUtils.java deleted file mode 100644 index afebbc85..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/RemoteDbUtils.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system.fusion; - -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -import javax.servlet.ServletContext; - -import org.openecomp.portalsdk.analytics.error.ReportSQLException; -import org.openecomp.portalsdk.analytics.system.RDbUtils; -import org.openecomp.portalsdk.analytics.system.fusion.adapter.RaptorAdapter; -import org.openecomp.portalsdk.analytics.system.fusion.adapter.SpringContext; -import org.openecomp.portalsdk.analytics.util.DataSet; -import org.openecomp.portalsdk.analytics.util.Log; -import org.springframework.beans.factory.annotation.Autowired; - - - -public class RemoteDbUtils implements RDbUtils{ - - private RaptorAdapter raptorAdapter; - - - public void initializeDbUtils(ServletContext servletContext) { - raptorAdapter = (RaptorAdapter)SpringContext.getApplicationContext().getBean("raptorAdapter"); - } // initializeDbUtils - - - public Connection getRemoteConnection(String dbKey) { - return raptorAdapter.getConnection(dbKey); - } - - public void clearConnection(Connection conn) { - raptorAdapter.releaseConnection(conn); - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/AdapterSessionFactoryContainer.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/AdapterSessionFactoryContainer.java deleted file mode 100644 index e9323e67..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/AdapterSessionFactoryContainer.java +++ /dev/null @@ -1,39 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system.fusion.adapter; - -import java.util.*; - -public class AdapterSessionFactoryContainer { - - private LinkedHashMap sessionFactories; - - public AdapterSessionFactoryContainer() { - } - - public LinkedHashMap getSessionFactories() { - return sessionFactories; - } - - public void setSessionFactories(LinkedHashMap sessionFactories) { - this.sessionFactories = sessionFactories; - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/IdName.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/IdName.java deleted file mode 100644 index 17264dd7..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/IdName.java +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system.fusion.adapter; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; - -import org.openecomp.portalsdk.core.domain.support.DomainVo; - -/** - * <p>IdName.java</p> - * <p>Represents a id/name data object.</p> -*/ -@Entity -public class IdName extends DomainVo { - - private String name; - private Long id; - - public IdName() {} - - @Id - @GeneratedValue - @Column(name = "ID", unique = true, nullable = false) - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int compareTo(Object obj){ - String c1 = getName(); - String c2 = ((IdName)obj).getName(); - - return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2); - } - -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/Item.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/Item.java deleted file mode 100644 index 5d307746..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/Item.java +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system.fusion.adapter; - - -public class Item { - private String _id; - private String _name; - - public Item() { - } - - public Item(String id, String name) { - this._id = id; - this._name = name; - } - - public String getId() { - return _id; - } - - public void setId(String id) { - this._id = id; - } - - public String getName() { - return _name; - } - - public void setName(String name) { - this._name = name; - } - - public String toString() { - return _name; - } -} - diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/SpringContext.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/SpringContext.java deleted file mode 100644 index df53c164..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/adapter/SpringContext.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system.fusion.adapter; - -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; - -@Component("springContext") -public class SpringContext implements ApplicationContextAware { - private static ApplicationContext context; - - public void setApplicationContext(ApplicationContext context) throws BeansException { - this.context = context; - } - public static ApplicationContext getApplicationContext() { - return context; - } -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/QuickLink.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/QuickLink.java deleted file mode 100644 index e595e91e..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/domain/QuickLink.java +++ /dev/null @@ -1,61 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.system.fusion.domain; - -public class QuickLink { - - private String reportURL; - private String reportName; - private String reportDescr; - private Boolean showDescr; - - public String getReportURL() { - return reportURL; - } - - public void setReportURL(String reportURL) { - this.reportURL = reportURL; - } - - public String getReportName() { - return reportName; - } - - public void setReportName(String reportName) { - this.reportName = reportName; - } - - public String getReportDescr() { - return reportDescr; - } - - public void setReportDescr(String reportDescr) { - this.reportDescr = reportDescr; - } - - public Boolean getShowDescr() { - return showDescr; - } - - public void setShowDescr(Boolean showDescr) { - this.showDescr = showDescr; - } - -} diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/Log.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/Log.java deleted file mode 100644 index 0d21a78c..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/util/Log.java +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.util; - -public class Log { - - public Log() { - } - - public static void write(String info) { - System.out.println(info); - } // write - - public static void write(String info, int debugLevel) { - if (debugLevel <= org.openecomp.portalsdk.analytics.system.Globals.getDebugLevel()) - write(info); - } // write - - public static void writeError(String info) { - System.err.println(info); - } // writeError - -} // Log diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/CrossTabTotalValue.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/CrossTabTotalValue.java deleted file mode 100644 index 3abe55c0..00000000 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/view/CrossTabTotalValue.java +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.analytics.view; - -import java.util.*; - -public class CrossTabTotalValue extends org.openecomp.portalsdk.analytics.RaptorObject { - private Vector headerValues = null; - - private String totalValue = null; - - public CrossTabTotalValue() { - super(); - } - - public CrossTabTotalValue(Vector headerValues, String totalValue) { - this(); - - setHeaderValues(headerValues); - setTotalValue(totalValue); - } // CrossTabTotalValue - - public Vector getHeaderValues() { - return headerValues; - } - - public String getTotalValue() { - return totalValue; - } - - public void setHeaderValues(Vector headerValues) { - this.headerValues = headerValues; - } - - public void setTotalValue(String totalValue) { - this.totalValue = totalValue; - } - -} // CrossTabTotalValue diff --git a/ecomp-sdk/epsdk-app-common/README.md b/ecomp-sdk/epsdk-app-common/README.md index e05192fa..e3cb67c0 100644 --- a/ecomp-sdk/epsdk-app-common/README.md +++ b/ecomp-sdk/epsdk-app-common/README.md @@ -24,11 +24,17 @@ AngularJS version 1.5.0. ### ONAP Distributions -Version 1.3.0 -- [Portal-19] Renaming the Group Id in the POM file to org.onap.portal.sdk +Version 1.4.0 +- PORTAL-19 Rename Java package base to org.onap +- PORTAL-42 Use OParent as parent POM +- PORTAL-72 Address Sonar Scan code issues +- PORTAL-90 Use approved ONAP license text + +Version 1.3.0, 28 August 2017 +- Portal-19 Renaming the Group Id in the POM file to org.onap.portal.sdk Version 1.1.0 -- [Portal-7] Improvements added as part of the rebasing process +- Portal-7 Improvements added as part of the rebasing process Version 1.0.0 - Initial release diff --git a/ecomp-sdk/epsdk-app-common/pom.xml b/ecomp-sdk/epsdk-app-common/pom.xml index 40f9dfb7..089fd092 100644 --- a/ecomp-sdk/epsdk-app-common/pom.xml +++ b/ecomp-sdk/epsdk-app-common/pom.xml @@ -5,71 +5,22 @@ <parent> <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-project</artifactId> - <version>1.3.0-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> </parent> <!-- GroupId is inherited from parent --> <artifactId>epsdk-app-common</artifactId> <!-- Version is inherited from parent --> <packaging>jar</packaging> - <name>ECOMP Portal SDK Webapp Common Classes</name> - <description>ECOMP Portal SDK Web Application common classes</description> + <name>ONAP Portal SDK Webapp Common Classes</name> + <description>ONAP Portal SDK Web Application common classes</description> <url>https://wiki.onap.org/display/DW/Portal</url> - <properties> - <encoding>UTF-8</encoding> - <springframework.version>4.2.0.RELEASE</springframework.version> - <hibernate.version>4.3.11.Final</hibernate.version> - <!-- Skip assembling the zip; assemble via mvn -Dskipassembly=false .. --> - <skipassembly>true</skipassembly> - <!-- Tests usually require some setup that maven cannot do, so skip. --> - <skiptests>true</skiptests> - <nexusproxy>https://nexus.onap.org</nexusproxy> - <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath> - <releaseNexusPath>/content/repositories/releases/</releaseNexusPath> - </properties> + <!-- properties inherited from parent --> - <repositories> - <repository> - <!-- Releases repository has ECOMP release artifacts --> - <id>ecomp-releases</id> - <name>OpenECOMP - Release Repository</name> - <url>${nexusproxy}/${releaseNexusPath}</url> - </repository> - <repository> - <!-- Snapshots repository has ECOMP snapshot artifacts --> - <id>ecomp-snapshots</id> - <name>OpenECOMP - Snapshot Repository</name> - <url>${nexusproxy}/${snapshotNexusPath}</url> - </repository> - <repository> - <id>oss-snapshots</id> - <name>oss Central - Snapshots</name> - <url>https://oss.sonatype.org/service/local/repositories/releases/content/</url> - </repository> - </repositories> + <!-- repositories inherited from parent --> - <profiles> - <!-- disable doclint, a new feature in Java 8, when generating javadoc --> - <profile> - <id>doclint-java8-disable</id> - <activation> - <jdk>[1.8,)</jdk> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration> - <additionalparam>-Xdoclint:none</additionalparam> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> + <!-- profiles inherited from parent --> <build> diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AdminController.java index c0904704..a1383fb0 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AdminController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AdminController.java @@ -1,30 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AngularAdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AngularAdminController.java index 7441106f..71729c0d 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AngularAdminController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/AngularAdminController.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/BootstrapSampleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/BootstrapSampleController.java new file mode 100644 index 00000000..12602235 --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/BootstrapSampleController.java @@ -0,0 +1,61 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.controller.core; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +/** + * Controller for welcome view. The view is restricted to authenticated users. + * The view name defaults to the request name with no suffix, "bootstrap_sample", which + * resolves to page welcome.jsp. + */ +@Controller +@RequestMapping("/") +public class BootstrapSampleController extends RestrictedBaseController { + @RequestMapping(value = { "/bootstrap_sample" }, method = RequestMethod.GET) + public ModelAndView welcome(HttpServletRequest request) { + final String defaultViewName = null; + return new ModelAndView(defaultViewName); + } +} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/CacheAdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/CacheAdminController.java index 81d35f3d..79866f6c 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/CacheAdminController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/CacheAdminController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.PrintWriter; import java.util.HashMap; @@ -34,9 +52,9 @@ import org.apache.jcs.admin.JCSAdminBean; import org.apache.jcs.engine.behavior.ICacheElement; import org.json.JSONArray; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -50,7 +68,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; @RequestMapping("/") public class CacheAdminController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CacheAdminController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CacheAdminController.class); private JCSAdminBean jcsAdminBean = new JCSAdminBean(); @@ -126,24 +144,18 @@ public class CacheAdminController extends RestrictedBaseController { @RequestMapping(value = { "/jcs_admin/showRegionDetails" }, method = RequestMethod.GET) public void showRegionDetails(HttpServletRequest request, HttpServletResponse response) throws Exception { String cacheName = (String) request.getParameter("cacheName"); - String details = null; ObjectMapper mapper = new ObjectMapper(); - JSONObject j = null; try { - details = getRegionStats(cacheName); + String details = getRegionStats(cacheName); JsonMessage msg = new JsonMessage(mapper.writeValueAsString(details)); - j = new JSONObject(msg); - + JSONObject j = new JSONObject(msg); + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + out.write(j.toString()); } catch (Exception e) { - details = "There was an error retrieving the region details. Please try again."; logger.error(EELFLoggerDelegate.errorLogger, "showRegionDetailed failed for cache name " + cacheName, e); + return; } - - response.setContentType("application/json"); - - PrintWriter out = response.getWriter(); - // out.write(details); - out.write(j.toString()); } @SuppressWarnings("unchecked") diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FavoritesController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FavoritesController.java index 023f8d7b..016c3b87 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FavoritesController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FavoritesController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID; @@ -27,16 +45,16 @@ import javax.servlet.http.HttpSession; import org.json.JSONArray; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.App; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.aspect.AuditLog; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.rest.FavoritesClient; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.service.AppService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.App; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.aspect.AuditLog; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +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.service.AppService; +import org.onap.portalsdk.core.util.SystemProperties; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; @@ -51,7 +69,7 @@ import org.springframework.web.bind.annotation.RequestMethod; @AuditLog public class FavoritesController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FavoritesController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FavoritesController.class); @Autowired private AppService appService; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FnMenuController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FnMenuController.java index 78c1440d..e364fd45 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FnMenuController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FnMenuController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.PrintWriter; import java.util.ArrayList; @@ -29,14 +47,14 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.Menu; -import org.openecomp.portalsdk.core.domain.MenuData; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.FnMenuService; -import org.openecomp.portalsdk.core.service.FunctionalMenuListService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.Menu; +import org.onap.portalsdk.core.domain.MenuData; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.FnMenuService; +import org.onap.portalsdk.core.service.FunctionalMenuListService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -55,7 +73,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class FnMenuController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnMenuController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnMenuController.class); @Autowired FnMenuService service; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FuncMenuController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FuncMenuController.java index 8e17eaae..aef83c49 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FuncMenuController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/FuncMenuController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID; @@ -28,23 +46,23 @@ import javax.servlet.http.HttpServletResponse; import org.json.JSONArray; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.App; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.aspect.AuditLog; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.rest.FunctionalMenuClient; -import org.openecomp.portalsdk.core.onboarding.ueb.UebException; -import org.openecomp.portalsdk.core.onboarding.ueb.UebManager; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsgTypes; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.openecomp.portalsdk.core.service.AppService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.App; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.aspect.AuditLog; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.rest.FunctionalMenuClient; +import org.onap.portalsdk.core.onboarding.ueb.UebException; +import org.onap.portalsdk.core.onboarding.ueb.UebManager; +import org.onap.portalsdk.core.onboarding.ueb.UebMsg; +import org.onap.portalsdk.core.onboarding.ueb.UebMsgTypes; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.service.AppService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.UserUtils; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; @@ -58,10 +76,10 @@ import org.springframework.web.bind.annotation.RequestMethod; @EnableAspectJAutoProxy public class FuncMenuController extends RestrictedBaseController{ - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FuncMenuController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FuncMenuController.class); @Autowired - AppService appService; + private AppService appService; @AuditLog @RequestMapping(value = {"/get_functional_menu" }, method = RequestMethod.GET) diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/LogoutController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/LogoutController.java index 467bd3c9..4fc7e188 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/LogoutController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/LogoutController.java @@ -1,34 +1,52 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -40,7 +58,7 @@ import org.springframework.web.servlet.ModelAndView; @RequestMapping("/") public class LogoutController extends UnRestrictedBaseController{ - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LogoutController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LogoutController.class); private User user; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ManifestController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ManifestController.java index ae212b50..885ab994 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ManifestController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ManifestController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.IOException; import java.io.InputStream; @@ -29,8 +47,8 @@ import java.util.jar.Manifest; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -48,7 +66,7 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("/") public class ManifestController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ManifestController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ManifestController.class); /** * Required to obtain the webapp manifest. diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/MenuListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/MenuListController.java index ce5ec975..2300cf46 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/MenuListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/MenuListController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.util.ArrayList; import java.util.HashMap; @@ -31,17 +49,17 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.MenuData; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.openecomp.portalsdk.core.restful.client.SharedContextRestClient; -import org.openecomp.portalsdk.core.restful.domain.SharedContext; -import org.openecomp.portalsdk.core.service.FnMenuService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.MenuData; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.restful.client.SharedContextRestClient; +import org.onap.portalsdk.core.restful.domain.SharedContext; +import org.onap.portalsdk.core.service.FnMenuService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; @@ -54,7 +72,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class MenuListController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MenuListController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MenuListController.class); @Autowired private FnMenuService fnMenuService; @@ -205,7 +223,8 @@ public class MenuListController extends RestrictedBaseController { */ @RequestMapping(value = { "/get_topMenuInfo" }, method = RequestMethod.GET) public void getTopMenu(HttpServletRequest request, HttpServletResponse response) { - + @SuppressWarnings("unused") + boolean isAppCentralized = false; HttpSession session = request.getSession(); try { String userName = (String) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_NAME)); @@ -225,7 +244,11 @@ public class MenuListController extends RestrictedBaseController { map.put("lastName", lastName); map.put("userid", user.getOrgUserId()); map.put("email", user.getEmail()); - map.put("getAccessUrl", getAccessUrl); + map.put("getAccessUrl", getAccessUrl); + String roleAccessCentralized = PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED); + if (roleAccessCentralized != null && "remote".equals(roleAccessCentralized)) + isAppCentralized = true; + map.put("isAppCentralized", Boolean.toString(isAppCentralized)); JSONObject j = new JSONObject(map); response.setContentType("application/json"); response.getWriter().write(j.toString()); diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/PostSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/PostSearchController.java index 39fae4f5..d1ced9b5 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/PostSearchController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/PostSearchController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.PrintWriter; import java.util.ArrayList; @@ -30,17 +48,17 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.command.PostSearchBean; -import org.openecomp.portalsdk.core.command.support.SearchResult; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.Lookup; -import org.openecomp.portalsdk.core.domain.Profile; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.LdapService; -import org.openecomp.portalsdk.core.service.PostSearchService; -import org.openecomp.portalsdk.core.service.ProfileService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.command.PostSearchBean; +import org.onap.portalsdk.core.command.support.SearchResult; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.Lookup; +import org.onap.portalsdk.core.domain.Profile; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.LdapService; +import org.onap.portalsdk.core.service.PostSearchService; +import org.onap.portalsdk.core.service.ProfileService; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; @@ -56,7 +74,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class PostSearchController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostSearchController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostSearchController.class); @SuppressWarnings("rawtypes") private static List sortByList = null; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileController.java index 2f17ac68..e1f70c2a 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.IOException; import java.io.PrintWriter; @@ -31,17 +49,17 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.RoleService; -import org.openecomp.portalsdk.core.service.UserProfileService; -import org.openecomp.portalsdk.core.service.UserService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.RoleService; +import org.onap.portalsdk.core.service.UserProfileService; +import org.onap.portalsdk.core.service.UserService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -56,7 +74,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class ProfileController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ProfileController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ProfileController.class); @Autowired UserProfileService service; @@ -183,7 +201,6 @@ public class ProfileController extends RestrictedBaseController { public ModelAndView saveProfile(HttpServletRequest request, HttpServletResponse response) { logger.info(EELFLoggerDelegate.debugLogger, "ProfileController.save"); try { - ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); JsonNode root = mapper.readTree(request.getReader()); @@ -210,30 +227,19 @@ public class ProfileController extends RestrictedBaseController { } service.saveUser(user); logger.info(EELFLoggerDelegate.auditLogger, "Save user's profile for user " + profileId); - response.setCharacterEncoding("UTF-8"); response.setContentType("application / json"); - request.setCharacterEncoding("UTF-8"); - PrintWriter out = response.getWriter(); out.write("" + profileId); return null; } catch (Exception e) { - response.setCharacterEncoding("UTF-8"); + response.setCharacterEncoding("UTF-8"); try { - request.setCharacterEncoding("UTF-8"); - } catch (UnsupportedEncodingException e1) { - - e1.printStackTrace(); - - } - PrintWriter out = null; - try { - out = response.getWriter(); + PrintWriter out = response.getWriter(); + out.write(e.getMessage()); } catch (IOException e1) { - logger.error(EELFLoggerDelegate.errorLogger, "saveProfile: failed to get writer" + e1.getMessage()); + logger.error(EELFLoggerDelegate.errorLogger, "saveProfile: failed to write", e1); } - out.write(e.getMessage()); return null; } } diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java index 1e600a30..3f933af8 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileSearchController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/ProfileSearchController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.IOException; import java.io.PrintWriter; @@ -32,15 +50,15 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.MenuData; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.FnMenuService; -import org.openecomp.portalsdk.core.service.UserProfileService; -import org.openecomp.portalsdk.core.service.UserService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.MenuData; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.FnMenuService; +import org.onap.portalsdk.core.service.UserProfileService; +import org.onap.portalsdk.core.service.UserService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -53,7 +71,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class ProfileSearchController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ProfileSearchController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ProfileSearchController.class); @Autowired private UserProfileService service; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java index 5d12f4aa..56cea604 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.IOException; import java.io.PrintWriter; @@ -29,16 +47,16 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.aspect.EELFLoggerAdvice; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.RoleService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.aspect.EELFLoggerAdvice; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.RoleService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -56,12 +74,12 @@ import com.fasterxml.jackson.databind.type.TypeFactory; @RequestMapping("/") public class RoleController extends RestrictedBaseController { + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleController.class); + @Autowired - RoleService roleService; + private RoleService roleService; private String viewName; - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleController.class); - @RequestMapping(value = { "/role" }, method = RequestMethod.GET) public ModelAndView role(HttpServletRequest request) throws Exception { diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleFunctionListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleFunctionListController.java index 0b8fb8c8..e1e3e132 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleFunctionListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleFunctionListController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.util.HashMap; import java.util.List; @@ -27,13 +45,13 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.RoleService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.RoleService; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; @@ -47,11 +65,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class RoleFunctionListController extends RestrictedBaseController { - - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleFunctionListController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleFunctionListController.class); @Autowired - RoleService service; + private RoleService service; private String viewName; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleListController.java index 9ccff764..13310b07 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleListController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.PrintWriter; import java.util.HashMap; @@ -27,13 +45,13 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.RoleService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.RoleService; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -48,10 +66,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class RoleListController extends RestrictedBaseController { - - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleListController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleListController.class); + @Autowired - RoleService service; + private RoleService service; private String viewName; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SDKLoginController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SDKLoginController.java index 10d2b95a..fe24f3c3 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SDKLoginController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SDKLoginController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.util.HashMap; import java.util.Map; @@ -25,12 +43,12 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler; -import org.openecomp.portalsdk.core.service.LoginService; -import org.openecomp.portalsdk.core.service.ProfileService; -import org.openecomp.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; +import org.onap.portalsdk.core.service.LoginService; +import org.onap.portalsdk.core.service.ProfileService; +import org.onap.portalsdk.core.web.support.AppUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SingleSignOnController.java index 766d9eb9..80fd67d9 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/SingleSignOnController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.net.URLDecoder; import java.net.URLEncoder; @@ -29,21 +47,21 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.command.LoginBean; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.menu.MenuProperties; -import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.openecomp.portalsdk.core.service.LoginService; -import org.openecomp.portalsdk.core.service.RoleService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.command.LoginBean; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.menu.MenuProperties; +import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.service.LoginService; +import org.onap.portalsdk.core.service.RoleService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -55,7 +73,7 @@ import org.springframework.web.util.WebUtils; @RequestMapping("/") public class SingleSignOnController extends UnRestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SingleSignOnController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SingleSignOnController.class); @Autowired private LoginService loginService; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UsageListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/UsageListController.java index d7dfbaa5..13a59f12 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UsageListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/UsageListController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.io.PrintWriter; import java.util.ArrayList; @@ -30,11 +48,11 @@ import javax.servlet.http.HttpSession; import org.json.JSONArray; import org.json.JSONObject; -import org.openecomp.portalsdk.core.command.UserRowBean; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.UsageUtils; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.command.UserRowBean; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.UsageUtils; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -44,7 +62,7 @@ import org.springframework.web.servlet.ModelAndView; @RequestMapping("/") public class UsageListController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UsageListController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UsageListController.class); @SuppressWarnings({ "unchecked", "rawtypes" }) @RequestMapping(value = { "/usage_list" }, method = RequestMethod.GET) diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UserProfileController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/UserProfileController.java index cb67c93d..99493266 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UserProfileController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/UserProfileController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; import java.util.HashMap; import java.util.List; @@ -25,10 +43,10 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.Profile; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.ProfileService; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.Profile; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.ProfileService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -46,10 +64,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class UserProfileController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserProfileController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserProfileController.class); @Autowired - ProfileService service; + private ProfileService service; @RequestMapping(value = { "/user_profile" }, method = RequestMethod.GET) public ModelAndView userProfile(HttpServletRequest request) throws Exception { diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/WelcomeController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/WelcomeController.java new file mode 100644 index 00000000..77a9b20e --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/WelcomeController.java @@ -0,0 +1,61 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.controller.core; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +/** + * Controller for welcome view. The view is restricted to authenticated users. + * The view name defaults to the request name with no suffix, "welcome", which + * resolves to page welcome.jsp. + */ +@Controller +@RequestMapping("/") +public class WelcomeController extends RestrictedBaseController { + @RequestMapping(value = { "/welcome" }, method = RequestMethod.GET) + public ModelAndView welcome(HttpServletRequest request) { + final String defaultViewName = null; + return new ModelAndView(defaultViewName); + } +} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/package-info.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/package-info.java index 0930ab3f..3cbcb3ba 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/package-info.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/package-info.java @@ -1,4 +1,4 @@ -package org.openecomp.portalapp.controller.core; +package org.onap.portalapp.controller.core; /** * Provides controllers for EPSDK application core functionality such as logging diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/AngularSinglePageController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/AngularSinglePageController.java new file mode 100644 index 00000000..2caabf21 --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/AngularSinglePageController.java @@ -0,0 +1,66 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.controller.sample; + +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +/** + * Controller for a single-page application sample. The view is restricted to + * authenticated users. The named view resolves to page singlePageSample.html, + * which uses Angular. + */ +@Controller +@RequestMapping("/") +public class AngularSinglePageController extends RestrictedBaseController { + + @RequestMapping(value = { "/singlePageSample" }, method = RequestMethod.GET) + public ModelAndView view(HttpServletRequest request) { + Map<String, Object> model = new HashMap<String, Object>(); + return new ModelAndView("single_page_sample", "model", model); + } + +} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/BroadcastController.java index 9c04ce89..5182a398 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/BroadcastController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.io.PrintWriter; import java.util.HashMap; @@ -27,12 +45,12 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.BroadcastMessage; -import org.openecomp.portalsdk.core.service.BroadcastService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.BroadcastMessage; +import org.onap.portalsdk.core.service.BroadcastService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/BroadcastListController.java index 41603460..d567c008 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/BroadcastListController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.io.PrintWriter; import java.util.HashMap; @@ -27,10 +45,10 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.BroadcastMessage; -import org.openecomp.portalsdk.core.service.BroadcastService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.BroadcastMessage; +import org.onap.portalsdk.core.service.BroadcastService; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CallflowController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CallflowController.java new file mode 100644 index 00000000..27a3003c --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CallflowController.java @@ -0,0 +1,63 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.controller.sample; + +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + + +/** + * Controller for a message sequence chart view. The view is restricted to + * authenticated users. The view name defaults to the request name with no + * suffix, "callflow", which resolves to page details.jsp. That page is an + * iframe around page details.html. + */ +@Controller +@RequestMapping("/") +public class CallflowController extends RestrictedBaseController { + + @RequestMapping(value = { "/callflow" }, method = RequestMethod.GET) + public ModelAndView plot() { + final String defaultViewName = null; + return new ModelAndView(defaultViewName); + } + +} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CamundaCockpitController.java index e5cfb3f2..a1ab6a52 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CamundaCockpitController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.util.HashMap; import java.util.Map; @@ -25,8 +43,8 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CollaborateListController.java index 03aaab5f..3dad8312 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CollaborateListController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.util.HashMap; import java.util.List; @@ -27,12 +45,12 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.UserProfileService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.UserProfileService; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -43,10 +61,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; @Controller @RequestMapping("/") -public class CollaborateListController extends RestrictedBaseController{ +public class CollaborateListController extends RestrictedBaseController { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CollaborateListController.class); + @Autowired - UserProfileService service; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CollaborateListController.class); + private UserProfileService service; @RequestMapping(value = {"/collaborate_list" }, method = RequestMethod.GET) public ModelAndView ProfileSearch(HttpServletRequest request) { diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CollaborationController.java index 55920bb8..4a358555 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CollaborationController.java @@ -1,32 +1,50 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/DS2SampleController.java index 17f33c77..02547c35 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/DS2SampleController.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.service.ProfileService; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.service.ProfileService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ElasticSearchController.java index 69e5051f..758d8ab3 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ElasticSearchController.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.io.IOException; import org.json.JSONObject; -import org.openecomp.portalapp.model.Result; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalapp.model.Result; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ElementModelController.java index e36458fd..a6afd2d6 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ElementModelController.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.ElementLinkService; -import org.openecomp.portalsdk.core.service.ElementMapService; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.ElementLinkService; +import org.onap.portalsdk.core.service.ElementMapService; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @@ -34,7 +52,7 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("/") public class ElementModelController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ElementModelController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ElementModelController.class); @RequestMapping(value = { "/elementMapLayout" }, method = RequestMethod.GET, produces = "text/plain") public String layout(HttpServletRequest request, HttpServletResponse response) throws Exception { diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/LeafletMapContoller.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/LeafletMapContoller.java new file mode 100644 index 00000000..a22be15e --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/LeafletMapContoller.java @@ -0,0 +1,61 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.controller.sample; + +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +/** + * Controller for geographic map view. The view is restricted to authenticated + * users. The view name defaults to the request name with no suffix, + * "leafletMap", which resolves to page leafletMap.jsp. + */ +@Controller +@RequestMapping("/") +public class LeafletMapContoller extends RestrictedBaseController { + + @RequestMapping(value = { "/leafletMap" }, method = RequestMethod.GET) + public ModelAndView plot() { + final String defaultViewName = null; + return new ModelAndView(defaultViewName); + } + +} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/NetMapController.java index 1961edf8..3b758207 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/NetMapController.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java index 5a0719ee..aea008ab 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.io.PrintWriter; import java.util.List; @@ -26,11 +44,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.command.PostDroolsBean; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.PostDroolsService; -import org.openecomp.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.command.PostDroolsBean; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.PostDroolsService; +import org.onap.portalsdk.core.web.support.JsonMessage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -45,7 +63,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping("/") public class PostDroolsController extends RestrictedBaseController { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostDroolsController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostDroolsController.class); @Autowired private PostDroolsService postDroolsService; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ReportDashboardController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ReportDashboardController.java new file mode 100644 index 00000000..7245d027 --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ReportDashboardController.java @@ -0,0 +1,64 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.controller.sample; + +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +/** + * Report dashboard + * + */ + +@Controller +@RequestMapping("/") +public class ReportDashboardController extends RestrictedBaseController { + @RequestMapping(value = {"/report_dashboard" }, method = RequestMethod.GET) + public ModelAndView adminView(HttpServletRequest request) { + Map<String, Object> model = new HashMap<String, Object>(); + return new ModelAndView(getViewName(),"model", model); + } +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/SamplePageController.java index e01bb8c3..41ac23b9 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/SamplePageController.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/package-info.java index 8c04d60f..57b7d4a4 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/package-info.java @@ -1,4 +1,4 @@ -package org.openecomp.portalapp.controller.sample; +package org.onap.portalapp.controller.sample; /** * Provides controllers for EPSDK application sample pages such as call flow etc. diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/model/Result.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/model/Result.java new file mode 100644 index 00000000..c59479bb --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/model/Result.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.model; + +public class Result { + private String result; + + public Result(String result) { + this.result = result; + } + + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result; + } + +} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/scheduler/LogJob.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/scheduler/LogJob.java new file mode 100644 index 00000000..3f560312 --- /dev/null +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/scheduler/LogJob.java @@ -0,0 +1,63 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.scheduler; + +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.quartz.DisallowConcurrentExecution; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.quartz.PersistJobDataAfterExecution; +import org.springframework.scheduling.quartz.QuartzJobBean; + +@PersistJobDataAfterExecution +@DisallowConcurrentExecution +public class LogJob extends QuartzJobBean { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LogJob.class); + + @Override + protected void executeInternal(JobExecutionContext ctx) + throws JobExecutionException { + // JobDataMap dataMap = ctx.getJobDetail().getJobDataMap(); + //int cnt = dataMap.getInt(""); + // JobKey jobKey = ctx.getJobDetail().getKey(); + logger.info(EELFLoggerDelegate.debugLogger, (Runtime.getRuntime().maxMemory() + " " + Runtime.getRuntime().maxMemory())); + + } + +} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/scheduler/LogRegistry.java index bffc3d00..1e0bdc2d 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/scheduler/LogRegistry.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.text.ParseException; import java.util.HashMap; import java.util.Map; -import org.openecomp.portalsdk.core.scheduler.CronRegistry; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.scheduler.CronRegistry; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.context.annotation.DependsOn; import org.springframework.scheduling.quartz.CronTriggerFactoryBean; import org.springframework.scheduling.quartz.JobDetailFactoryBean; diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/IAdminAuthExtension.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/IAdminAuthExtension.java index c670c2ba..fbdd8aa4 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/IAdminAuthExtension.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/IAdminAuthExtension.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.service; +package org.onap.portalapp.service; import java.util.Set; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; /** * Defines methods that can be used to extend the features of the user/role diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/OnBoardingApiServiceImpl.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java index 7303cfc4..3aa7de59 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/OnBoardingApiServiceImpl.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/service/OnBoardingApiServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.service; +package org.onap.portalapp.service; import java.util.ArrayList; import java.util.Iterator; @@ -28,23 +46,23 @@ import java.util.TreeSet; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.domain.UserApp; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.client.AppContextManager; -import org.openecomp.portalsdk.core.onboarding.crossapi.IPortalRestAPIService; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler; -import org.openecomp.portalsdk.core.restful.domain.EcompRole; -import org.openecomp.portalsdk.core.restful.domain.EcompUser; -import org.openecomp.portalsdk.core.service.RoleService; -import org.openecomp.portalsdk.core.service.UserProfileService; -import org.openecomp.portalsdk.core.service.WebServiceCallService; -import org.openecomp.portalsdk.core.util.JSONUtil; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.domain.Role; +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.client.AppContextManager; +import org.onap.portalsdk.core.onboarding.crossapi.IPortalRestAPIService; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; +import org.onap.portalsdk.core.restful.domain.EcompRole; +import org.onap.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.core.service.RoleService; +import org.onap.portalsdk.core.service.UserProfileService; +import org.onap.portalsdk.core.service.WebServiceCallService; +import org.onap.portalsdk.core.util.JSONUtil; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.UserUtils; import org.slf4j.MDC; import org.springframework.context.ApplicationContext; @@ -55,20 +73,18 @@ import org.springframework.context.ApplicationContext; * Since an instance of this class will be instantiated by the OnBoarding * servlet from the ecompFW library, we cannot use Spring injections here. This * 'injection' is done indirectly using AppContextManager class. - * - * @author Ikram Ikramullah * */ public class OnBoardingApiServiceImpl implements IPortalRestAPIService { + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(OnBoardingApiServiceImpl.class); + private RoleService roleService; private UserProfileService userProfileService; private IAdminAuthExtension adminAuthExtensionServiceImpl; private LoginStrategy loginStrategy; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(OnBoardingApiServiceImpl.class); - public OnBoardingApiServiceImpl() { // Defend against null-pointer exception during server startup // that was caused by a spurious Spring annotation on this class. diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/util/CustomLoggingFilter.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/util/CustomLoggingFilter.java index 00c1d869..e47f7342 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/util/CustomLoggingFilter.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/util/CustomLoggingFilter.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.util; +package org.onap.portalapp.util; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.spi.ILoggingEvent; @@ -33,7 +51,7 @@ import ch.qos.logback.core.spi.FilterReply; public class CustomLoggingFilter extends Filter<ILoggingEvent> { /** - * Custom Filter is added to strip out the continuous U-EB logging messages + * Custom Filter is added to strip out the continuous U-EB logging messages. * But make sure we log the ERROR & WARNING Level messages. */ @Override diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/BootstrapSampleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/BootstrapSampleController.java deleted file mode 100644 index 794af760..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/BootstrapSampleController.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.controller.core; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -/** - * Controller for welcome view. The view is restricted to authenticated users. - * The view name defaults to the request name with no suffix, "bootstrap_sample", which - * resolves to page welcome.jsp. - */ -@Controller -@RequestMapping("/") -public class BootstrapSampleController extends RestrictedBaseController { - @RequestMapping(value = { "/bootstrap_sample" }, method = RequestMethod.GET) - public ModelAndView welcome(HttpServletRequest request) { - final String defaultViewName = null; - return new ModelAndView(defaultViewName); - } -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/WelcomeController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/WelcomeController.java deleted file mode 100644 index 5ebe907f..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/WelcomeController.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.controller.core; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -/** - * Controller for welcome view. The view is restricted to authenticated users. - * The view name defaults to the request name with no suffix, "welcome", which - * resolves to page welcome.jsp. - */ -@Controller -@RequestMapping("/") -public class WelcomeController extends RestrictedBaseController { - @RequestMapping(value = { "/welcome" }, method = RequestMethod.GET) - public ModelAndView welcome(HttpServletRequest request) { - final String defaultViewName = null; - return new ModelAndView(defaultViewName); - } -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java deleted file mode 100644 index efcd4291..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - -/** - * Controller for a single-page application sample. The view is restricted to - * authenticated users. The named view resolves to page singlePageSample.html, - * which uses Angular. - */ -@Controller -@RequestMapping("/") -public class AngularSinglePageController extends RestrictedBaseController { - - @RequestMapping(value = { "/singlePageSample" }, method = RequestMethod.GET) - public ModelAndView view(HttpServletRequest request) { - Map<String, Object> model = new HashMap<String, Object>(); - return new ModelAndView("single_page_sample", "model", model); - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java deleted file mode 100644 index b25cbef4..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.controller.sample; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - - -/** - * Controller for a message sequence chart view. The view is restricted to - * authenticated users. The view name defaults to the request name with no - * suffix, "callflow", which resolves to page details.jsp. That page is an - * iframe around page details.html. - */ -@Controller -@RequestMapping("/") -public class CallflowController extends RestrictedBaseController { - - @RequestMapping(value = { "/callflow" }, method = RequestMethod.GET) - public ModelAndView plot() { - final String defaultViewName = null; - return new ModelAndView(defaultViewName); - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java deleted file mode 100644 index bda3c0aa..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.controller.sample; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -/** - * Controller for geographic map view. The view is restricted to authenticated - * users. The view name defaults to the request name with no suffix, - * "leafletMap", which resolves to page leafletMap.jsp. - */ -@Controller -@RequestMapping("/") -public class LeafletMapContoller extends RestrictedBaseController { - - @RequestMapping(value = { "/leafletMap" }, method = RequestMethod.GET) - public ModelAndView plot() { - final String defaultViewName = null; - return new ModelAndView(defaultViewName); - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java deleted file mode 100644 index 9cc44c86..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.controller.sample; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -/** - * Report dashboard - * - */ - -@Controller -@RequestMapping("/") -public class ReportDashboardController extends RestrictedBaseController { - @RequestMapping(value = {"/report_dashboard" }, method = RequestMethod.GET) - public ModelAndView adminView(HttpServletRequest request) { - Map<String, Object> model = new HashMap<String, Object>(); - return new ModelAndView(getViewName(),"model", model); - } -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/model/Result.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/model/Result.java deleted file mode 100644 index ba07bd32..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/model/Result.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.model; - -public class Result { - private String result; - - public Result(String result) { - this.result = result; - } - - public String getResult() { - return result; - } - - public void setResult(String result) { - this.result = result; - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java deleted file mode 100644 index f6206187..00000000 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.scheduler; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.quartz.DisallowConcurrentExecution; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.quartz.PersistJobDataAfterExecution; -import org.springframework.scheduling.quartz.QuartzJobBean; - -@PersistJobDataAfterExecution -@DisallowConcurrentExecution -public class LogJob extends QuartzJobBean { - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LogJob.class); - - @Override - protected void executeInternal(JobExecutionContext ctx) - throws JobExecutionException { - // JobDataMap dataMap = ctx.getJobDetail().getJobDataMap(); - //int cnt = dataMap.getInt(""); - // JobKey jobKey = ctx.getJobDetail().getKey(); - logger.info(EELFLoggerDelegate.debugLogger, (Runtime.getRuntime().maxMemory() + " " + Runtime.getRuntime().maxMemory())); - - } - -} diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/SanityTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/SanityTest.java index 96d6b0fc..259aecd4 100644 --- a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/SanityTest.java +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/SanityTest.java @@ -1,8 +1,8 @@ -package org.openecomp.portalapp; +package org.onap.portalapp; import org.junit.Assert; import org.junit.Test; -import org.openecomp.portalapp.core.MockApplicationContextTestSuite; +import org.onap.portalapp.core.MockApplicationContextTestSuite; import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/CollaborationControllerTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/CollaborationControllerTest.java index 2751a66d..97786046 100644 --- a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/CollaborationControllerTest.java +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/CollaborationControllerTest.java @@ -1,10 +1,10 @@ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import org.junit.Assert; import org.junit.Test; -import org.openecomp.portalapp.core.MockApplicationContextTestSuite; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.core.MockApplicationContextTestSuite; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/NetMapTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/NetMapTest.java index 0f06ea7f..0ab09291 100644 --- a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/NetMapTest.java +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/controller/NetMapTest.java @@ -1,8 +1,8 @@ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import org.junit.Assert; import org.junit.Test; -import org.openecomp.portalapp.core.MockApplicationContextTestSuite; +import org.onap.portalapp.core.MockApplicationContextTestSuite; import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/core/MockApplicationContextTestSuite.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/core/MockApplicationContextTestSuite.java index 8a86cd57..cede7e0c 100644 --- a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/core/MockApplicationContextTestSuite.java +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/core/MockApplicationContextTestSuite.java @@ -1,13 +1,13 @@ -package org.openecomp.portalapp.core; +package org.onap.portalapp.core; import java.io.IOException; import org.junit.Before; import org.junit.runner.RunWith; -import org.openecomp.portalsdk.core.conf.AppConfig; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.util.CacheManager; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.conf.AppConfig; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.util.CacheManager; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -81,7 +81,7 @@ public class MockApplicationContextTestSuite { @Configuration - @ComponentScan(basePackages = "org.openecomp", + @ComponentScan(basePackages = "org.onap", excludeFilters = { } ) diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/service/ProfileServiceTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/ProfileServiceTest.java index 2b8ca99d..0e90c501 100644 --- a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/service/ProfileServiceTest.java +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/ProfileServiceTest.java @@ -1,14 +1,14 @@ -package org.openecomp.portalapp.service; +package org.onap.portalapp.service; import java.util.List; import org.junit.Assert; import org.junit.Test; -import org.openecomp.portalapp.core.MockApplicationContextTestSuite; -import org.openecomp.portalsdk.core.domain.Profile; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.service.ProfileService; -import org.openecomp.portalsdk.core.service.UserProfileService; +import org.onap.portalapp.core.MockApplicationContextTestSuite; +import org.onap.portalsdk.core.domain.Profile; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.service.ProfileService; +import org.onap.portalsdk.core.service.UserProfileService; import org.springframework.beans.factory.annotation.Autowired; diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/workflow/services/WorkflowScheduleServiceTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/workflow/services/WorkflowScheduleServiceTest.java index c390a84c..c59619d2 100644 --- a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/workflow/services/WorkflowScheduleServiceTest.java +++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/workflow/services/WorkflowScheduleServiceTest.java @@ -1,12 +1,12 @@ -package org.openecomp.portalapp.workflow.services; +package org.onap.portalapp.workflow.services; import java.util.Calendar; import org.junit.Assert; import org.junit.Test; -import org.openecomp.portalapp.core.MockApplicationContextTestSuite; -import org.openecomp.portalsdk.workflow.domain.WorkflowSchedule; -import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService; +import org.onap.portalapp.core.MockApplicationContextTestSuite; +import org.onap.portalsdk.workflow.domain.WorkflowSchedule; +import org.onap.portalsdk.workflow.services.WorkflowScheduleService; import org.springframework.beans.factory.annotation.Autowired; diff --git a/ecomp-sdk/epsdk-app-os/README.md b/ecomp-sdk/epsdk-app-os/README.md index a2db1da1..00282253 100644 --- a/ecomp-sdk/epsdk-app-os/README.md +++ b/ecomp-sdk/epsdk-app-os/README.md @@ -13,7 +13,15 @@ https://www.eclipse.org/m2e-wtp/ ## Release Notes -Version 1.3.0 +Version 1.4.0, <?day> <?month> 2017 +- PORTAL-19 Rename Java package base to org.onap +- PORTAL-42 Use OParent as parent POM +- PORTAL-72 Address Sonar Scan code issues +- PORTAL-79 remove unwanted SDK left menu under Report-sample dashboard +- PORTAL-90 Use approved ONAP license text +* Put new entries here * + +Version 1.3.0, 28 August 2017 - PORTAL-17 removing eye.js and utils.js - PORTAL-19 Renaming the Group Id in the POM file to org.onap.portal.sdk - PORTAL-34 Restore required properties in fusion.properties file diff --git a/ecomp-sdk/epsdk-app-os/db-scripts/EcompSdkDMLMySql_1710_OS.sql b/ecomp-sdk/epsdk-app-os/db-scripts/EcompSdkDMLMySql_1710_OS.sql index 1c4a926a..460da4b2 100644 --- a/ecomp-sdk/epsdk-app-os/db-scripts/EcompSdkDMLMySql_1710_OS.sql +++ b/ecomp-sdk/epsdk-app-os/db-scripts/EcompSdkDMLMySql_1710_OS.sql @@ -15,7 +15,7 @@ INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (10, 'Admin', 1, 110, 'role_list.htm', 'menu_admin', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', 'icon-content-star'); INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (84, 'All Reports', 8, 50, 'report', 'menu_reports', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/reports.png'); INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) values (87, 'Create Reports', 8, 120, 'report#/report_wizard', 'menu_reports', 'Y', NULL, 'r_action=report.create', NULL, NULL, 'APP', 'N', NULL); -INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) values (88, 'Sample Dashboard', 8, 130, 'report_dashboard', 'menu_reports', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', NULL); +INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) values (88, 'Sample Dashboard', 8, 130, 'report_dashboard', 'menu_reports', 'N', NULL, NULL, NULL, NULL, 'APP', 'N', NULL); INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (89, 'Import', 8, 140, 'report#/report_import', 'menu_reports', 'N', null, null, null, null, 'APP', 'N', null); INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (94, 'Self', 9, 40,'userProfile#/self_profile', 'menu_profile', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/profile.png'); INSERT INTO fn_menu (MENU_ID, LABEL, PARENT_ID, SORT_ORDER, ACTION, FUNCTION_CD, ACTIVE_YN, SERVLET, QUERY_STRING, EXTERNAL_URL, TARGET, MENU_SET_CD, SEPARATOR_YN, IMAGE_SRC) VALUES (101, 'Roles', 10, 20, 'admin#/admin', 'menu_admin', 'Y', NULL, NULL, NULL, NULL, 'APP', 'N', '/static/fusion/images/users.png'); diff --git a/ecomp-sdk/epsdk-app-os/pom.xml b/ecomp-sdk/epsdk-app-os/pom.xml index 108cd4c9..54bb65eb 100644 --- a/ecomp-sdk/epsdk-app-os/pom.xml +++ b/ecomp-sdk/epsdk-app-os/pom.xml @@ -6,42 +6,71 @@ This is NOT the Portal - but it is developed and supported by the Portal team. --> <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-app-os</artifactId> - <version>1.3.0-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> <packaging>war</packaging> - <name>ECOMP SDK Webapp for OpenSource</name> - <description>ECOMP SDK Web Application for public release</description> + <name>ONAP Portal SDK Webapp for OpenSource</name> + <description>ONAP Portal SDK Web Application for public release</description> + + <!-- OParent provides license audit, code audit, distribution management, + etc. But jenkins build fails, so comment out for now. + <parent> + <groupId>org.onap.oparent</groupId> + <artifactId>oparent</artifactId> + <version>0.1.0</version> + <relativePath/> + </parent> + --> <properties> <encoding>UTF-8</encoding> - <epsdk.version>1.3.0-SNAPSHOT</epsdk.version> + <epsdk.version>1.4.0-SNAPSHOT</epsdk.version> <springframework.version>4.2.0.RELEASE</springframework.version> <hibernate.version>4.3.11.Final</hibernate.version> <!-- Skip assembling the zip; assemble via mvn -Dskipassembly=false .. --> <skipassembly>true</skipassembly> <!-- Tests usually require some setup that maven cannot do, so skip. --> <skiptests>true</skiptests> - <nexusproxy>https://nexus.onap.org</nexusproxy> - <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath> - <releaseNexusPath>content/repositories/releases/</releaseNexusPath> </properties> <repositories> <repository> - <id>ecomp-releases</id> - <name>OpenECOMP - Release Repository</name> - <url>${nexusproxy}/${releaseNexusPath}</url> + <id>onap-releases</id> + <name>ONAP - Release Repository</name> + <url>https://nexus.onap.org/content/repositories/releases</url> + </repository> + <repository> + <id>onap-staging</id> + <name>ONAP - Staging Repository</name> + <url>https://nexus.onap.org/content/repositories/staging</url> </repository> <repository> - <id>ecomp-snapshots</id> - <name>OpenECOMP - Snapshot Repository</name> - <url>${nexusproxy}/${snapshotNexusPath}</url> + <id>onap-snapshots</id> + <name>ONAP - Snapshot Repository</name> + <url>https://nexus.onap.org/content/repositories/snapshots</url> </repository> <repository> - <id>ecomp-public</id> - <name>ecomp onap public Repository</name> + <id>onap-public</id> + <name>ONAP public Repository</name> <url>https://nexus.onap.org/content/groups/public</url> </repository> </repositories> + <pluginRepositories> + <pluginRepository> + <id>releases</id> + <name>ONAP - Release Repository</name> + <url>https://nexus.onap.org/content/repositories/releases</url> + </pluginRepository> + <pluginRepository> + <id>staging</id> + <name>ONAP - Staging Repository</name> + <url>https://nexus.onap.org/content/repositories/staging</url> + </pluginRepository> + <pluginRepository> + <id>snapshots</id> + <name>ONAP - Snapshot Repository</name> + <url>https://nexus.onap.org/content/repositories/snapshots</url> + </pluginRepository> + </pluginRepositories> <profiles> <!-- disable doclint, a new feature in Java 8, when generating javadoc --> @@ -69,6 +98,36 @@ <!-- The war file name carries no version number --> <finalName>${project.artifactId}</finalName> + <pluginManagement> + <plugins> + <!-- Silence Eclipse/m2e complaints about checkstyle plugin brought in by OParent --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <versionRange>2.17,)</versionRange> + <goals> + <goal>check</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> <!-- Compile to Java 1.8 class output format --> <plugin> diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java index 9745f968..2c46672f 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java @@ -1,36 +1,54 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.conf; +package org.onap.portalapp.conf; import java.util.ArrayList; import java.util.List; -import org.openecomp.portalapp.login.LoginStrategyImpl; -import org.openecomp.portalapp.scheduler.RegistryAdapter; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.conf.AppConfig; -import org.openecomp.portalsdk.core.conf.Configurable; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.CacheManager; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.login.LoginStrategyImpl; +import org.onap.portalapp.scheduler.RegistryAdapter; +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.conf.AppConfig; +import org.onap.portalsdk.core.conf.Configurable; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.CacheManager; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -47,12 +65,12 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; /** - * ECOMP Portal SDK sample application. ECOMP Portal SDK core AppConfig class to + * ONAP Portal SDK sample application. Extends core AppConfig class to * reuse interceptors, view resolvers and other features defined there. */ @Configuration @EnableWebMvc -@ComponentScan(basePackages = "org.openecomp") +@ComponentScan(basePackages = "org.onap") @PropertySource(value = { "${container.classpath:}/WEB-INF/conf/app/test.properties" }, ignoreResourceNotFound = true) @Profile("src") @EnableAsync @@ -67,14 +85,14 @@ public class ExternalAppConfig extends AppConfig implements Configurable { } /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#viewResolver() + * @see org.onap.portalsdk.core.conf.AppConfig#viewResolver() */ public ViewResolver viewResolver() { return super.viewResolver(); } /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry) + * @see org.onap.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry) * * @param registry */ @@ -83,7 +101,7 @@ public class ExternalAppConfig extends AppConfig implements Configurable { } /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#dataAccessService() + * @see org.onap.portalsdk.core.conf.AppConfig#dataAccessService() */ public DataAccessService dataAccessService() { // Echo the JDBC URL to assist developers when starting the app. diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java new file mode 100644 index 00000000..1665443e --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java @@ -0,0 +1,65 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.conf; + +import org.onap.portalsdk.core.conf.AppInitializer; + +public class ExternalAppInitializer extends AppInitializer { + + @Override + protected Class<?>[] getRootConfigClasses() { + return super.getRootConfigClasses(); + } + + @Override + protected Class<?>[] getServletConfigClasses() { + Class<?> appConfigClass = ExternalAppConfig.class; + // Show something on stdout to indicate the app is starting. + System.out.println("ExternalAppInitializer: servlet configuration class is " + appConfigClass.getName()); + return new Class[] { appConfigClass }; + } + + /* + * URL request will direct to the Spring dispatcher for processing + */ + @Override + protected String[] getServletMappings() { + return super.getServletMappings(); + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java new file mode 100644 index 00000000..d336aa4f --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java @@ -0,0 +1,62 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.conf; + +import org.onap.portalsdk.core.conf.HibernateMappingLocatable; +import org.springframework.context.annotation.Profile; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; + +@Component +@Profile("src") +public class HibernateMappingLocations implements HibernateMappingLocatable { + + @Override + public Resource[] getMappingLocations() { + return new Resource[] { new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), + new ClassPathResource("../fusion/orm/Workflow.hbm.xml"), + new ClassPathResource("../fusion/orm/RNoteBookIntegration.hbm.xml") }; + } + + @Override + public String[] getPackagesToScan() { + return new String[] { "org.onap" }; + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java index 4f7033e9..31c02a9a 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.lm; +package org.onap.portalapp.lm; import java.util.Date; import java.util.List; @@ -25,7 +43,7 @@ import java.util.Map; import javax.servlet.ServletContext; -import org.openecomp.portalsdk.core.lm.FusionLicenseManager; +import org.onap.portalsdk.core.lm.FusionLicenseManager; import org.springframework.stereotype.Component; /* diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java new file mode 100644 index 00000000..08aca3b8 --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java @@ -0,0 +1,80 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.lm; + +import java.io.FileNotFoundException; +import java.io.InputStream; + +import org.onap.portalsdk.core.lm.LicenseableClass; + +/* + * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. + */ + +public class LicenseableClassImpl implements LicenseableClass { + + public String getApplicationName() { + return ""; + } + + public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException { + return null; + } + + public String getAlias() { + return ""; + } + + public String getKeyPasswd() { + return ""; + } + + public String getPublicKeystorePassword() { + return ""; + } + + public String getCipherParamPassword() { + return ""; + } + + @SuppressWarnings("rawtypes") + public Class getClassToLicense() { + return this.getClass(); + } +} + diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java index 270e69ff..61f2cb4d 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java @@ -1,34 +1,52 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.login; +package org.onap.portalapp.login; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.web.servlet.ModelAndView; /** @@ -37,7 +55,7 @@ import org.springframework.web.servlet.ModelAndView; */ public class LoginStrategyImpl extends LoginStrategy { - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginStrategyImpl.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginStrategyImpl.class); /** * login for open source is same as external login in the non-open-source diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/Register.java index e5d30e5b..56f498a2 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/Register.java @@ -1,30 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.util.ArrayList; import java.util.List; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.scheduler.LogRegistry; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.scheduler.Registerable; +import org.onap.portalsdk.core.util.SystemProperties; import org.quartz.Trigger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.DependsOn; @@ -34,7 +53,7 @@ import org.springframework.stereotype.Component; @DependsOn({ "logRegistry", "systemProperties" }) public class Register implements Registerable { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class); private List<Trigger> scheduleTriggers = new ArrayList<Trigger>(); Trigger trigger[] = new Trigger[1]; diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java index b3f6cbeb..158dfcbd 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService; +import org.onap.portalsdk.core.scheduler.Registerable; +import org.onap.portalsdk.workflow.services.WorkflowScheduleService; import org.quartz.Trigger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.quartz.SchedulerFactoryBean; diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java new file mode 100644 index 00000000..b4a5fe59 --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java @@ -0,0 +1,71 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.service; + +import java.util.Set; + +import org.onap.portalapp.service.IAdminAuthExtension; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + + +@Service("adminAuthExtension") +@Transactional +/** + * Provides empty implementations of the methods in IAdminAuthExtension. + */ +public class AdminAuthExtension implements IAdminAuthExtension { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AdminAuthExtension.class); + + public void saveUserExtension(User user) { + logger.debug("saveUserExtension"); + } + + public void editUserExtension(User user) { + logger.debug("editUserExtension"); + } + + public void saveUserRoleExtension(Set<Role> roles, User user) { + logger.debug("saveUserRoleExtension"); + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java deleted file mode 100644 index 6d7c72d1..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.conf; - -import org.openecomp.portalsdk.core.conf.AppInitializer; - -public class ExternalAppInitializer extends AppInitializer { - - @Override - protected Class<?>[] getRootConfigClasses() { - return super.getRootConfigClasses(); - } - - @Override - protected Class<?>[] getServletConfigClasses() { - Class<?> appConfigClass = ExternalAppConfig.class; - // Show something on stdout to indicate the app is starting. - System.out.println("ExternalAppInitializer: servlet configuration class is " + appConfigClass.getName()); - return new Class[] { appConfigClass }; - } - - /* - * URL request will direct to the Spring dispatcher for processing - */ - @Override - protected String[] getServletMappings() { - return super.getServletMappings(); - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java deleted file mode 100644 index cf6ee2f0..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.conf; - -import org.springframework.context.annotation.Profile; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.stereotype.Component; - -import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable; - -@Component -@Profile("src") -public class HibernateMappingLocations implements HibernateMappingLocatable { - - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# - * getMappingLocations() - */ - @Override - public Resource[] getMappingLocations() { - return new Resource[] { new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), - new ClassPathResource("../fusion/orm/Workflow.hbm.xml"), - new ClassPathResource("../fusion/orm/RNoteBookIntegration.hbm.xml") }; - } - - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# - * getPackagesToScan() - */ - @Override - public String[] getPackagesToScan() { - return new String[] { "org.openecomp" }; - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java deleted file mode 100644 index 14f21a81..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.lm; - -import java.io.FileNotFoundException; -import java.io.InputStream; - -import org.openecomp.portalsdk.core.lm.LicenseableClass; - -/* - * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. - */ - -public class LicenseableClassImpl implements LicenseableClass { - - public String getApplicationName() { - return ""; - } - - public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException { - return null; - } - - public String getAlias() { - return ""; - } - - public String getKeyPasswd() { - return ""; - } - - public String getPublicKeystorePassword() { - return ""; - } - - public String getCipherParamPassword() { - return ""; - } - - @SuppressWarnings("rawtypes") - public Class getClassToLicense() { - return this.getClass(); - } -} - diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java deleted file mode 100644 index 2b9b60e4..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.service; - -import java.util.Set; - -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - - -@Service("adminAuthExtension") -@Transactional -/** - * Provides empty implementations of the methods in IAdminAuthExtension. - */ -public class AdminAuthExtension implements IAdminAuthExtension { - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AdminAuthExtension.class); - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#saveUserExtension(org.openecomp.portalsdk.core.domain.User) - */ - public void saveUserExtension(User user) { - logger.debug("saveUserExtension"); - } - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#editUserExtension(org.openecomp.portalsdk.core.domain.User) - */ - public void editUserExtension(User user) { - logger.debug("editUserExtension"); - } - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#saveUserRoleExtension(java.util.Set, org.openecomp.portalsdk.core.domain.User) - */ - public void saveUserRoleExtension(Set<Role> roles, User user) { - logger.debug("saveUserRoleExtension"); - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/resources/logback.xml b/ecomp-sdk/epsdk-app-os/src/main/resources/logback.xml index e0a02022..cc4d0e93 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/resources/logback.xml +++ b/ecomp-sdk/epsdk-app-os/src/main/resources/logback.xml @@ -1,27 +1,45 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - ================================================================================ - ECOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <configuration scan="true" scanPeriod="3 seconds" debug="true"> <!-- - Logback files for the ECOMP Portal SDK Application "epsdk-app-os" + Logback files for the ONAP Portal SDK Application "epsdk-app-os" are created in directory ${catalina.base}/logs/epsdk_app_os; e.g., apache-tomcat-8.0.35/logs/epsdk_app_os/application.log --> @@ -99,7 +117,7 @@ <encoder> <pattern>${applicationLoggerPattern}</pattern> </encoder> - <filter class="org.openecomp.portalapp.util.CustomLoggingFilter" /> + <filter class="org.onap.portalapp.util.CustomLoggingFilter" /> </appender> <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender"> diff --git a/ecomp-sdk/epsdk-app-os/src/main/resources/portal.properties b/ecomp-sdk/epsdk-app-os/src/main/resources/portal.properties index 76c679e5..1a8cd1fe 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/resources/portal.properties +++ b/ecomp-sdk/epsdk-app-os/src/main/resources/portal.properties @@ -1,21 +1,39 @@ ### -# ================================================================================ -# ECOMP Portal SDK -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. +# ============LICENSE_START========================================== +# ONAP Portal SDK +# =================================================================== +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# +# Unless otherwise specified, all software contained herein is licensed +# under the Apache License, Version 2.0 (the “License”); +# you may not use this software except in compliance with the License. # You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# +# http://www.apache.org/licenses/LICENSE-2.0 +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# ================================================================================ +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============LICENSE_END============================================ +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. ### # Properties read by ECOMP Framework library, ecompFW.jar @@ -35,7 +53,7 @@ use_rest_for_functional_menu=true ########################################################################## # Name of java class that implements the OnBoardingApiService interface. -portal.api.impl.class = org.openecomp.portalapp.service.OnBoardingApiServiceImpl +portal.api.impl.class = org.onap.portalapp.service.OnBoardingApiServiceImpl # URL of the Portal where this app is onboarded ecomp_redirect_url = https://portal.openecomp.org/ecompportal/process_csp diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp index cbf7f8ad..48c26313 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp @@ -1,29 +1,47 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ page isELIgnored="false"%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> -<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties"%> -<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants"%> -<%@ page import="org.openecomp.portalsdk.core.domain.MenuData"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiProperties"%> +<%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiConstants"%> +<%@ page import="org.onap.portalsdk.core.domain.MenuData"%> <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/header.css"> <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/portal_ebz_header.css"> <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" > diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml index 6638b4bc..0afc92d5 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml @@ -1,29 +1,47 @@ <?xml version="1.0"?> <!-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> -<hibernate-mapping package="org.openecomp.portalsdk.rnotebookintegration.domain"> +<hibernate-mapping package="org.onap.portalsdk.rnotebookintegration.domain"> <!-- RNotebookIntegration mapping details --> diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/index.jsp b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/index.jsp index f6030c97..de6531c4 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/index.jsp +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/index.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login.jsp b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login.jsp index 09320356..cd6a22f4 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login.jsp @@ -1,23 +1,41 @@ <%-- - ================================================================================ - ECOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> <!DOCTYPE html> <% // Name is defined by app; do not throw if missing diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp index 9d099bf0..15e228ec 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp @@ -1,23 +1,41 @@ <%-- - ================================================================================ - ECOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> <!DOCTYPE html> <% // Name is defined by app; do not throw if missing diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html b/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html index e0709672..25c081a9 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html @@ -17,7 +17,7 @@ <th>User ID</th> <th>Manager User ID</th> <th>Edit</th> - <th>Active?</th> + <th ng-show="(isAppCentralized=='false')">Active?</th> </tr> </thead> <tbody type="body" ng-repeat="rowData in tableData"> @@ -31,7 +31,7 @@ <!-- Include an edit image with respective redirection --> <td><a href="#/profile/{{rowData.id}}" class="icon-misc-pen" style="color: #888; font-size: 20px;"></a></td> - <td> + <td ng-show="(isAppCentralized=='false')"> <div class="form-row"> <label class="btn-switch-label" tabindex="0" role="option"> <input type="checkbox" b2b-switches diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html b/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html index 3b5ef525..845681e3 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html @@ -4,14 +4,15 @@ <div ng-show="showLoader" class="span loader-container"> <i class="icon-primary-spinner" role="img" aria-label="Please wait while we load your content"></i> </div> - <div ng-hide="showLoader" > - <h3 class="heading-small">Please edit the profile details below:</h3> + <div ng-hide="showLoader" > + <h3 class="heading-small" ng-show="isAppCentralized=='true'" style="color:red;">Please use Portal for access management</h3> + <h3 class="heading-small" ng-show="isAppCentralized=='false'">Please edit the profile details below:</h3> <div class="row-nowrap"> <div class="span12"> <div class="form-row"> <label for="textinputID-2a">*First Name</label> <div class="field-group"> - <input id="textinputID-2a" b2b-reset="" class="span12" type="text" data-ng-model="profile.lastName"> + <input id="textinputID-2a" b2b-reset="" class="span12" type="text" data-ng-model="profile.firstName" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> @@ -19,7 +20,7 @@ <div class="form-row"> <label for="textinputID-3a">*Last Name</label> <div class="field-group"> - <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.firstName"> + <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.lastName" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> @@ -62,7 +63,7 @@ <div class="form-row"> <label for="textinputID-3a">*Phone</label> <div class="field-group"> - <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.phone"> + <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.phone" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> @@ -70,7 +71,7 @@ <div class="form-row"> <label for="textinputID-3a">Fax</label> <div class="field-group"> - <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.fax"> + <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.fax" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> @@ -81,7 +82,7 @@ <div class="form-row"> <label for="textinputID-2a">Cellular</label> <div class="field-group"> - <input id="textinputID-2a" b2b-reset="" class="span12" type="text" data-ng-model="profile.cellular"> + <input id="textinputID-2a" b2b-reset="" class="span12" type="text" data-ng-model="profile.cellular" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> @@ -89,7 +90,7 @@ <div class="form-row"> <label for="textinputID-3a">*Email</label> <div class="field-group"> - <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.email"> + <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.email" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> @@ -97,7 +98,7 @@ <div class="form-row"> <label for="textinputID-3a">Address 1</label> <div class="field-group"> - <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.address1"> + <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.address1" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> @@ -105,7 +106,7 @@ <div class="form-row"> <label for="textinputID-3a">Address 2</label> <div class="field-group"> - <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.address2"> + <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.address2" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> @@ -116,14 +117,14 @@ <div class="form-row"> <label for="textinputID-2a">City</label> <div class="field-group"> - <input id="textinputID-2a" b2b-reset="" class="span12" type="text" data-ng-model="profile.city"> + <input id="textinputID-2a" b2b-reset="" class="span12" type="text" data-ng-model="profile.city" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> <div class="span12"> <div class="form-row"> <label for="textinputID-3a">State</label> - <select name="dropdown1" b2b-dropdown ng-model="stateList.selected.value"> + <select name="dropdown1" b2b-dropdown ng-model="stateList.selected.value" ng-disabled="(isAppCentralized == 'true')"> <option b2b-dropdown-list option-repeat="d in stateList.options" value="{{d.value}}" init-value="{{stateList.selected.title}}">{{d.title}}</option> </select> </div> @@ -132,14 +133,14 @@ <div class="form-row"> <label for="textinputID-3a">Zip Code</label> <div class="field-group"> - <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.zipCode"> + <input id="textinputID-3a" b2b-reset="" class="span12" type="text" data-ng-model="profile.zipCode" ng-disabled="(isAppCentralized == 'true')"> </div> </div> </div> <div class="span12"> <div class="form-row"> <label for="textinputID-3a">Country</label> - <select name="dropdown1" b2b-dropdown ng-model="selectedCountry.value"> + <select name="dropdown1" b2b-dropdown ng-model="selectedCountry.value" ng-disabled="(isAppCentralized == 'true')"> <option b2b-dropdown-list option-repeat="d in countries" value="{{d.value}}" init-value="{{selectedCountry.title}}">{{d.title}}</option> </select> </div> @@ -148,17 +149,17 @@ <div class="span3"> <div class="form-row"> <label for="textinputID-3a">Time Zone</label> - <select name="dropdown1" b2b-dropdown ng-model="selectedTimeZone.value"> + <select name="dropdown1" b2b-dropdown ng-model="selectedTimeZone.value" ng-disabled="(isAppCentralized == 'true')"> <option b2b-dropdown-list option-repeat="d in timeZones" value="{{d.value}}" init-value="{{selectedTimeZone.title}}">{{d.title}}</option> </select> </div> </div> <div> - <button class="btn btn-alt btn-small" type="button" ng-click="saveProfile()">Save</button> + <button class="btn btn-alt btn-small" type="button" ng-click="saveProfile()" ng-show="(isAppCentralized=='false')">Save</button> </div> <br> - <div> + <div ng-show="(isAppCentralized=='false')"> Role <a ng-click="addNewRoleFunctionModalPopup(role.roleFunctions,role.name, role);" class="icon-primary-accordion-plus" size="small"></a> </div> @@ -168,14 +169,14 @@ <thead> <tr> <th>Name</th> - <th>Delete</th> + <th ng-show="(isAppCentralized=='false')">Delete</th> </tr> </thead> <tbody type="body" ng-repeat="rowData in profile.roles"> <tr> <td ng-bind="rowData['name']"></td> - <td> + <td ng-show="(isAppCentralized=='false')"> <div style="font-size: 20px;"> <a href="javascript:void(0)" ng-click="removeRole(rowData);" class="icon-misc-trash"></a> </div> diff --git a/ecomp-sdk/epsdk-app-overlay/README.md b/ecomp-sdk/epsdk-app-overlay/README.md index 20025e02..c6a1012f 100644 --- a/ecomp-sdk/epsdk-app-overlay/README.md +++ b/ecomp-sdk/epsdk-app-overlay/README.md @@ -17,7 +17,14 @@ AngularJS version 1.5.0. ### ONAP Distributions -Version 1.3.0 +Version 1.4.0 +- PORTAL-19 Rename Java package base to org.onap +- PORTAL-42 Use OParent as parent POM +- PORTAL-72 Address Sonar Scan code issues +- PORTAL-90 Use approved ONAP license text +* Put new entries here * + +Version 1.3.0, 28 August 2017 - Portal-17 removing eye.js and utils.js - rework - Portal-19 Renaming the Group Id in the POM file to org.onap.portal.sdk - Portal-21 Increased Role name size in UI diff --git a/ecomp-sdk/epsdk-app-overlay/pom.xml b/ecomp-sdk/epsdk-app-overlay/pom.xml index 14f59ae8..6d4f95de 100644 --- a/ecomp-sdk/epsdk-app-overlay/pom.xml +++ b/ecomp-sdk/epsdk-app-overlay/pom.xml @@ -5,20 +5,20 @@ <parent> <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-project</artifactId> - <version>1.3.0-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> </parent> <!-- GroupId is inherited from parent --> <artifactId>epsdk-app-overlay</artifactId> <!-- Version is inherited from parent --> <packaging>war</packaging> - <name>ECOMP Portal SDK Webapp Overlay Files</name> - <description>ECOMP Portal SDK Web Application overlay project</description> + <name>ONAP Portal SDK Webapp Overlay Files</name> + <description>ONAP Portal SDK Web Application overlay project</description> <url>https://wiki.onap.org/display/DW/Portal</url> - <properties> - <encoding>UTF-8</encoding> - </properties> + <!-- properties inherited from parent --> + + <!-- repositories inherited from parent --> <build> <plugins> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/resources/att-rules.drl b/ecomp-sdk/epsdk-app-overlay/src/main/resources/att-rules.drl index e15c3fb1..6b992f55 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/resources/att-rules.drl +++ b/ecomp-sdk/epsdk-app-overlay/src/main/resources/att-rules.drl @@ -1,4 +1,4 @@ -package org.openecomp.portalsdk.core.drools; +package org.onap.portalsdk.core.drools; rule "Drools NJ" diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/resources/mchange-log.properties b/ecomp-sdk/epsdk-app-overlay/src/main/resources/mchange-log.properties index 77e260bb..1b32b969 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/resources/mchange-log.properties +++ b/ecomp-sdk/epsdk-app-overlay/src/main/resources/mchange-log.properties @@ -1,21 +1,39 @@ ### -# ================================================================================ -# eCOMP Portal SDK -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. +# ============LICENSE_START========================================== +# ONAP Portal SDK +# =================================================================== +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# +# Unless otherwise specified, all software contained herein is licensed +# under the Apache License, Version 2.0 (the “License”); +# you may not use this software except in compliance with the License. # You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# +# http://www.apache.org/licenses/LICENSE-2.0 +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# ================================================================================ +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============LICENSE_END============================================ +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. ### # Direct the proprietary logger used by com.mchange.c3p0 to use slf4j diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/resources/state-rules.drl b/ecomp-sdk/epsdk-app-overlay/src/main/resources/state-rules.drl index 586ae6b7..42c6293d 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/resources/state-rules.drl +++ b/ecomp-sdk/epsdk-app-overlay/src/main/resources/state-rules.drl @@ -1,4 +1,4 @@ -package org.openecomp.portalsdk.core.drools; +package org.onap.portalsdk.core.drools; global String age rule "Default" diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/broadcast.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/broadcast.jsp index 0b700867..f3685fac 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/broadcast.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/broadcast.jsp @@ -1,25 +1,43 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> -<%@ page import="org.openecomp.portalsdk.core.web.support.UserUtils" %> -<%@ page import="org.openecomp.portalsdk.core.web.support.ControllerProperties" %> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %> +<%@ page import="org.onap.portalsdk.core.web.support.UserUtils" %> +<%@ page import="org.onap.portalsdk.core.web.support.ControllerProperties" %> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties" %> <%-- <%@ include file="/WEB-INF/fusion/jsp/include.jsp" %> --%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/broadcast_list.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/broadcast_list.jsp index 401f413b..6d0de634 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/broadcast_list.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/broadcast_list.jsp @@ -1,27 +1,45 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ page import="java.util.*" %> <%@ page import="com.fasterxml.jackson.databind.ObjectMapper" %> <%@ page import="org.json.JSONObject" %> <%@ page import="java.io.StringWriter" %> -<%@ page import="org.openecomp.portalsdk.core.web.support.ControllerProperties" %> +<%@ page import="org.onap.portalsdk.core.web.support.ControllerProperties" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/data_out.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/data_out.jsp index f3fb7a74..7138c47d 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/data_out.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/data_out.jsp @@ -1,20 +1,38 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> ${model.output_string} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ds2/template.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ds2/template.jsp index ac210a3f..2916106a 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ds2/template.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ds2/template.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp index bd5206eb..8fcbc9c2 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp index 1d3ba8e7..0c94add3 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp @@ -1,29 +1,47 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ page isELIgnored="false"%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> -<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties"%> -<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants"%> -<%@ page import="org.openecomp.portalsdk.core.domain.MenuData"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiProperties"%> +<%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiConstants"%> +<%@ page import="org.onap.portalsdk.core.domain.MenuData"%> <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/header.css"> <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/portal_ebz_header.css"> <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" > diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/loginSnippet.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/loginSnippet.html index ae5e13ec..c58b88ce 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/loginSnippet.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz/loginSnippet.html @@ -1,21 +1,39 @@ <!-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <script type="text/ng-template" id="loginSnippet.html"> <div style="line-height: normal; right: 167px; min-height: 200px; height: auto; width: auto; " ng-controller="loginSnippetCtrl" > diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template.jsp index 93f96369..cc01584f 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp index a579fdc0..4c5c5974 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> <!DOCTYPE html> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp index 4cdfe51d..e4d2d1ef 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> <!DOCTYPE html> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/es_search_demo.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/es_search_demo.jsp index 61458524..962e86ad 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/es_search_demo.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/es_search_demo.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <!-- <link rel="stylesheet" type="text/css" href="app/fusion/elasticsearch/styles/styles.css" > --> <script> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/es_suggest_demo.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/es_suggest_demo.jsp index abae598b..9217c7b2 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/es_suggest_demo.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/es_suggest_demo.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <!-- <link rel="stylesheet" type="text/css" href="app/fusion/elasticsearch/styles/styles.css" > --> <script> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/frame_insert.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/frame_insert.jsp index ed50b5dd..daf95b10 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/frame_insert.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/frame_insert.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <iframe id="frame_insert" src="${frame_int}"></iframe> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/include.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/include.jsp index cd6a5e09..0b94fde3 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/include.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/include.jsp @@ -1,24 +1,42 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %> -<%@ page import="org.openecomp.portalsdk.core.web.support.AppUtils" %> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties" %> +<%@ page import="org.onap.portalsdk.core.web.support.AppUtils" %> <%@ page import="java.util.LinkedHashMap" %> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/meta.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/meta.jsp index 0a361803..6cb9c398 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/meta.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/meta.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <head> <meta charset="utf-8"> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal.html index 0766cecd..ab3cb56b 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal.html @@ -1,21 +1,39 @@ <!-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <script type="text/ng-template" id="modal_informative.html"> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_role.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_role.html index c163002d..b96fd3f1 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_role.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_role.html @@ -1,21 +1,39 @@ <!-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <script type="text/ng-template" id="role_functions_popup.html"> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_rolefunction.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_rolefunction.html index ee0b5121..46473f6e 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_rolefunction.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_rolefunction.html @@ -1,21 +1,39 @@ <!-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <script type="text/ng-template" id="edit_role_function_popup.html"> <div class="modal__informative font-showcase" style="width:400px;"> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/webrtc/collaboration.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/webrtc/collaboration.jsp index 9bf0ed74..f99712ea 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/webrtc/collaboration.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/jsp/webrtc/collaboration.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml index 098a5857..dc2e5df2 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml @@ -1,29 +1,47 @@ <?xml version="1.0"?> <!-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> -<hibernate-mapping package="org.openecomp.portalsdk.core.domain"> +<hibernate-mapping package="org.onap.portalsdk.core.domain"> <!-- User class mapping details --> <class name="User" table="FN_USER"> @@ -82,12 +100,12 @@ <set name="userApps" table="FN_USER_ROLE" lazy="false" sort="natural" inverse="true" cascade="all-delete-orphan"> <key column="user_id"/> - <one-to-many class="org.openecomp.portalsdk.core.domain.UserApp" /> + <one-to-many class="org.onap.portalsdk.core.domain.UserApp" /> </set> <set name="pseudoRoles" table="FN_USER_PSEUDO_ROLE" lazy="false" sort="natural"> <key column="user_id"/> - <many-to-many column="pseudo_role_id" class="org.openecomp.portalsdk.core.domain.Role" /> + <many-to-many column="pseudo_role_id" class="org.onap.portalsdk.core.domain.Role" /> </set> </class> @@ -110,8 +128,8 @@ <key-property name="userId" type="long"> <column name="user_id" precision="11" scale="0" /> </key-property> - <key-many-to-one name="app" class="org.openecomp.portalsdk.core.domain.App" column="app_id" /> - <key-many-to-one name="role" class="org.openecomp.portalsdk.core.domain.Role" column="role_id" /> + <key-many-to-one name="app" class="org.onap.portalsdk.core.domain.App" column="app_id" /> + <key-many-to-one name="role" class="org.onap.portalsdk.core.domain.Role" column="role_id" /> </composite-id> <property name="priority" type="java.lang.Short"> <column name="priority" precision="4" scale="0" /> @@ -172,17 +190,17 @@ <set name="roleFunctions" table="FN_ROLE_FUNCTION" lazy="false" sort="natural"> <key column="role_id"/> - <many-to-many column="function_cd" class="org.openecomp.portalsdk.core.domain.RoleFunction"/> + <many-to-many column="function_cd" class="org.onap.portalsdk.core.domain.RoleFunction"/> </set> <set name="childRoles" table="FN_ROLE_COMPOSITE" lazy="false" sort="natural"> <key column="parent_role_id"/> - <many-to-many column="child_role_id" class="org.openecomp.portalsdk.core.domain.Role"/> + <many-to-many column="child_role_id" class="org.onap.portalsdk.core.domain.Role"/> </set> <set name="parentRoles" table="FN_ROLE_COMPOSITE" lazy="false" sort="natural"> <key column="child_role_id"/> - <many-to-many column="parent_role_id" class="org.openecomp.portalsdk.core.domain.Role"/> + <many-to-many column="parent_role_id" class="org.onap.portalsdk.core.domain.Role"/> </set> </class> @@ -266,7 +284,7 @@ <property name="siteCd" column="broadcast_site_cd" /> </class> - <class name="org.openecomp.portalsdk.analytics.model.base.ReportUserRole" table="cr_report_access"> + <class name="org.onap.portalsdk.analytics.model.base.ReportUserRole" table="cr_report_access"> <composite-id> <key-property name="repId" column="rep_id" /> <key-property name="orderNo" column="order_no" /> @@ -300,14 +318,14 @@ <!-- Lookup (id/value bean) class mapping details --> <class name="Lookup"> - <composite-id name="nameValueId" class="org.openecomp.portalsdk.core.domain.support.NameValueId"> + <composite-id name="nameValueId" class="org.onap.portalsdk.core.domain.support.NameValueId"> <key-property name="val"/> <key-property name="lab" /> </composite-id> </class> <class name="UrlsAccessible" table="V_URL_ACCESS"> - <composite-id name="urlsAccessibleKey" class="org.openecomp.portalsdk.core.domain.UrlsAccessibleKey"> + <composite-id name="urlsAccessibleKey" class="org.onap.portalsdk.core.domain.UrlsAccessibleKey"> <key-property name="url" column="url"/> <key-property name="functionCd" column="function_cd"/> </composite-id> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml index 3d8852cb..ef996953 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml @@ -1,29 +1,47 @@ <?xml version="1.0"?> <!-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> -<hibernate-mapping package="org.openecomp.portalsdk.workflow.domain"> +<hibernate-mapping package="org.onap.portalsdk.workflow.domain"> <!-- WorkflowSchedule mapping details --> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/error.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/error.jsp index 2a48507c..3f31fe0a 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/error.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/error.jsp @@ -1,20 +1,38 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> ${errMsg} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/leafletMap.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/leafletMap.jsp index e11070d1..c4026617 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/leafletMap.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/leafletMap.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <!DOCTYPE html> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/login_external_ng.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/login_external_ng.jsp index cb6def1e..9e5c5446 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/login_external_ng.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/login_external_ng.jsp @@ -1,26 +1,44 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties" %> <c:set var="title" value="Login" /> <c:set var="isMobileEnabled" value="<%=(SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE)!= null && SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE).trim().equals(\"true\"))%>" /> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/net_map.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/net_map.jsp index 2a341467..543b9e12 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/net_map.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/jsp/net_map.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <!DOCTYPE html> <html> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js index dc59b6c7..0c6105c8 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js @@ -106,7 +106,7 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal var message = msg; $scope.cancel(); if(message.role){ - $rootScope.$broadcast('updateRoleFunctions',{data:message.role}); + $rootScope.$broadcast('updateRoleFunctions',{data:message.role,removedRoleFunc: roleFunction.name}); }else{ $modal.open({ templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html', @@ -718,6 +718,12 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal // updating role functions on roles page after deletion of a role function $rootScope.$on('updateRoleFunctions',function(e,d){ $scope.role = d.data; + if (typeof d.removedRoleFunc != 'undefined' && d.removedRoleFunc!=''){ + for(var i=0;i<$scope.ociavailableRoleFunctions.length;i++){ + if($scope.ociavailableRoleFunctions[i].name==d.removedRoleFunc) + $scope.ociavailableRoleFunctions[i].selected=false; + } + } }) $scope.roleFnInit(); @@ -824,7 +830,6 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html', controller: ModalInstanceCtrl, sizeClass: 'modal-large', - windowClass:"modal-docked", resolve: { items: function () { var message = { diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-directives/ds2Header.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-directives/ds2Header.js index 088fa487..f9f39927 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-directives/ds2Header.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-directives/ds2Header.js @@ -15,6 +15,7 @@ appDS2.directive('ds2Header', function () { $scope.contactUsUrl; $scope.getAccessUrl; $scope.menuItems = []; + $scope.isAppCentralized; $scope.showHeader = ($cookieStore.get("show_app_header") == undefined ? true : $cookies.get("show_app_header") ); @@ -30,6 +31,7 @@ appDS2.directive('ds2Header', function () { $scope.userFirstName = res.firstName; $scope.redirectUrl = res.portalUrl; $scope.getAccessUrl = res.getAccessUrl; + $scope.isAppCentralized = res.isAppCentralized; }); } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html index dbe9d1c6..48044da2 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html @@ -5,25 +5,28 @@ </div> </div> - <div class="b2b-modal-body" tabindex="0" aria-label="Modal header text content" role="region"> - <table class="striped"> - <thead> - <tr> - <th></th> - <th>Role Function</th> - </tr> - </thead> - <tbody type="body" ng-repeat="roleFunction in msg.availableRoleFunctions"> - <tr> - <td> - <label class="btn-switch-label" tabindex="0" role="option"> - <input ng-click="activateRoleConfirmPopUp(roleFunction.selected,roleFunction);" type="checkbox" b2b-switches ng-model="roleFunction.selected" size-class="modal-small modal-alert"> - </label> - </td> - <td>{{roleFunction.name}}</td> - </tr> - </tbody> - </table> + <div class="b2b-modal-body" tabindex="0" aria-label="Modal header text content" role="region" > + <div id="role-double-popup"> + <table class="striped" > + <thead> + <tr> + <th></th> + <th>Role Function</th> + </tr> + </thead> + <tbody type="body" ng-repeat="roleFunction in msg.availableRoleFunctions"> + <tr> + <td> + <label class="btn-switch-label" tabindex="0" role="option"> + <input ng-click="activateRoleConfirmPopUp(roleFunction.selected,roleFunction);" type="checkbox" b2b-switches ng-model="roleFunction.selected" size-class="modal-small modal-alert"> + </label> + </td> + <td>{{roleFunction.name}}</td> + </tr> + </tbody> + </table> + </div> + </div> <div class="b2b-modal-footer"> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/ecomp.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/ecomp.css index dd25f755..4c780f38 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/ecomp.css +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/styles/ecomp.css @@ -175,3 +175,9 @@ p,a{ #role-popup-footer{ height:100px; } + +#role-double-popup{ + max-height:300px; + overflow:auto; + display:block +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/index.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/index.jsp index f6030c97..de6531c4 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/index.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/index.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/manifest.jsp b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/manifest.jsp index b7345adb..cb086fcd 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/manifest.jsp +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/manifest.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> diff --git a/ecomp-sdk/epsdk-core/README.md b/ecomp-sdk/epsdk-core/README.md index 9d46b613..5f1a5a73 100644 --- a/ecomp-sdk/epsdk-core/README.md +++ b/ecomp-sdk/epsdk-core/README.md @@ -1,8 +1,8 @@ -# ECOMP Portal SDK Core +# ONAP Portal SDK Core ## Overview -This is the Maven project for the ECOMP Portal SDK Core library, +This is the Maven project for the ONAP Portal SDK Core library, which is distributed as epsdk-core-N.N.N.jar. This library requires Hibernate and Spring, and provides many features such as data access, session management, logging, on-boarding @@ -13,11 +13,18 @@ ECOMP SDK web application. ### ONAP Distributions -Version 1.3.0 -- [Portal-19] Renaming the Group Id in the POM file to org.onap.portal.sdk +Version 1.4.0 +- PORTAL-19 Rename Java package base to org.onap +- PORTAL-42 Use OParent as parent POM +- PORTAL-72 Address Sonar Scan code issues +- PORTAL-90 Use approved ONAP license text +* Put new entries here * + +Version 1.3.0, 28 August 2017 +- Portal-19 Renaming the Group Id in the POM file to org.onap.portal.sdk Version 1.1.0 -- [Portal-7] Improvements added as part of the rebasing process +- Portal-7 Improvements added as part of the rebasing process Version 1.0.0 - Initial release diff --git a/ecomp-sdk/epsdk-core/pom.xml b/ecomp-sdk/epsdk-core/pom.xml index f15d80c2..0e712f75 100644 --- a/ecomp-sdk/epsdk-core/pom.xml +++ b/ecomp-sdk/epsdk-core/pom.xml @@ -5,14 +5,14 @@ <parent> <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-project</artifactId> - <version>1.3.0-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> </parent> <!-- GroupId is inherited from parent --> <artifactId>epsdk-core</artifactId> <!-- Version is inherited from parent --> <packaging>jar</packaging> - <name>ECOMP Portal SDK Core</name> + <name>ONAP Portal SDK Core</name> <description>Core SDK library with controllers, interceptors, utilities, etc.</description> <url>https://wiki.onap.org/display/DW/Portal</url> @@ -41,52 +41,8 @@ <container.classpath>classpath:</container.classpath> </systemPropertyVariables> </configuration> - - </plugin> - - <!-- - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>license-maven-plugin</artifactId> - <version>1.10</version> - <configuration> - <encoding>UTF-8</encoding> - <licenseName>my_license</licenseName> - <licenseResolver>${project.baseUri}/license</licenseResolver> - <inceptionYear>2017</inceptionYear> - <organizationName>AT&T Intellectual Property</organizationName> - <projectName>eCOMP Portal SDK</projectName> - <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> - <processStartTag>================================================================================</processStartTag> - <sectionDelimiter>================================================================================</sectionDelimiter> - <processEndTag>================================================================================</processEndTag> - <roots> - <root>src/main</root> - <root>src/test</root> - </roots> - <excludes> - <exclude>*.png</exclude> - <exclude>*.drl</exclude> - <exclude>*.gif</exclude> - <exclude>*.jpeg</exclude> - <exclude>*.jpg</exclude> - <exclude>*.bmp</exclude> - <exclude>*.ico</exclude> - <exclude>*.svg</exclude> - </excludes> - </configuration> - <executions> - <execution> - <id>first</id> - <goals> - <goal>update-file-header</goal> - </goals> - <phase>process-sources</phase> - </execution> - </executions> </plugin> - --> </plugins> </build> @@ -385,22 +341,6 @@ </exclusion> </exclusions> </dependency> -<!-- <dependency> - <groupId>com.att.nsa</groupId> - <artifactId>highlandParkCore</artifactId> - <version>0.3.2</version> - <exclusions> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> - </dependency> --> - </dependencies> </project> diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/FusionObject.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/FusionObject.java index 8258913f..d44fb7e6 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/FusionObject.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/FusionObject.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core; +package org.onap.portalsdk.core; /** * <p> diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/auth/LoginStrategy.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java index 673201fb..7fe4f632 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/auth/LoginStrategy.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/auth/LoginStrategy.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.auth; +package org.onap.portalsdk.core.auth; import java.util.HashMap; import java.util.List; @@ -27,16 +45,16 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.core.command.LoginBean; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.menu.MenuProperties; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler; -import org.openecomp.portalsdk.core.service.LoginService; -import org.openecomp.portalsdk.core.service.RoleService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.command.LoginBean; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.menu.MenuProperties; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; +import org.onap.portalsdk.core.service.LoginService; +import org.onap.portalsdk.core.service.RoleService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.util.WebUtils; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/LoginBean.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/LoginBean.java index 37df8db1..0f156bce 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/LoginBean.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/LoginBean.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.command; +package org.onap.portalsdk.core.command; import java.util.Set; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.domain.support.FusionCommand; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.support.FusionCommand; public class LoginBean extends FusionCommand { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/PostDroolsBean.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/PostDroolsBean.java new file mode 100644 index 00000000..89052495 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/PostDroolsBean.java @@ -0,0 +1,69 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.command; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +@JsonSerialize +public class PostDroolsBean { + + private String droolsFile; + private String className; + private String selectedRules; + + public String getDroolsFile() { + return droolsFile; + } + public void setDroolsFile(String droolsFile) { + this.droolsFile = droolsFile; + } + public String getSelectedRules() { + return selectedRules; + } + public void setSelectedRules(String selectedRules) { + this.selectedRules = selectedRules; + } + public String getClassName() { + return className; + } + public void setClassName(String className) { + this.className = className; + } + + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/PostSearchBean.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/PostSearchBean.java index 68806b39..3b32364e 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/PostSearchBean.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/PostSearchBean.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.command; +package org.onap.portalsdk.core.command; import java.util.List; -import org.openecomp.portalsdk.core.command.support.SearchBase; -import org.openecomp.portalsdk.core.domain.User; +import org.onap.portalsdk.core.command.support.SearchBase; +import org.onap.portalsdk.core.domain.User; import com.fasterxml.jackson.databind.annotation.JsonSerialize; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/UserRowBean.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/UserRowBean.java index fb6c2eab..49854e6b 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/UserRowBean.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/UserRowBean.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.command; +package org.onap.portalsdk.core.command; -import org.openecomp.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.User; public class UserRowBean extends User { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/support/SearchBase.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/support/SearchBase.java index f2f5408b..c053d95b 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/support/SearchBase.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/support/SearchBase.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.command.support; +package org.onap.portalsdk.core.command.support; import java.util.*; -import org.openecomp.portalsdk.core.domain.support.FusionCommand; +import org.onap.portalsdk.core.domain.support.FusionCommand; public abstract class SearchBase extends FusionCommand { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/support/SearchResult.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/support/SearchResult.java index 286b39cb..d1c1f315 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/support/SearchResult.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/command/support/SearchResult.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.command.support; +package org.onap.portalsdk.core.command.support; import java.util.*; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/AppConfig.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/AppConfig.java index fac79bc4..26624359 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/AppConfig.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/AppConfig.java @@ -1,43 +1,61 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.conf; +package org.onap.portalsdk.core.conf; import java.util.ArrayList; import java.util.List; import javax.sql.DataSource; -import org.openecomp.portalsdk.core.interceptor.ResourceInterceptor; -import org.openecomp.portalsdk.core.interceptor.SessionTimeoutInterceptor; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.format.AppMessagesEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.menu.MenuBuilder; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.service.DataAccessServiceImpl; -import org.openecomp.portalsdk.core.service.LocalAccessCondition; -import org.openecomp.portalsdk.core.service.RestApiRequestBuilder; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.interceptor.ResourceInterceptor; +import org.onap.portalsdk.core.interceptor.SessionTimeoutInterceptor; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.format.AppMessagesEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.menu.MenuBuilder; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.service.DataAccessServiceImpl; +import org.onap.portalsdk.core.service.LocalAccessCondition; +import org.onap.portalsdk.core.service.RestApiRequestBuilder; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; @@ -57,13 +75,13 @@ import org.springframework.web.servlet.view.tiles3.TilesView; import com.mchange.v2.c3p0.ComboPooledDataSource; /** - * Configures Spring features in the ECOMP Portal SDK including request + * Configures Spring features in the ONAP Portal SDK including request * interceptors and view resolvers. Application should subclass and override * methods as needed. */ public class AppConfig extends WebMvcConfigurerAdapter implements Configurable, ApplicationContextAware { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppConfig.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppConfig.class); private final List<String> tileDefinitions = new ArrayList<String>(); protected ApplicationContext appApplicationContext = null; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/AppInitializer.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/AppInitializer.java index 82e449f1..0865b987 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/AppInitializer.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/AppInitializer.java @@ -1,33 +1,52 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.conf; +package org.onap.portalsdk.core.conf; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; public abstract class AppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppInitializer.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppInitializer.class); + private final String activeProfile = "src"; @Override diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/Configurable.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/Configurable.java new file mode 100644 index 00000000..d890e609 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/Configurable.java @@ -0,0 +1,56 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.conf; + +import java.util.List; + +import org.onap.portalsdk.core.service.DataAccessService; +import org.springframework.web.servlet.ViewResolver; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; + +public interface Configurable { + + public ViewResolver viewResolver(); + + public void addResourceHandlers(ResourceHandlerRegistry registry) ; + + public DataAccessService dataAccessService(); + + public List<String> addTileDefinitions(); + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/HibernateConfiguration.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/HibernateConfiguration.java index 8a3459d1..54512865 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/HibernateConfiguration.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/HibernateConfiguration.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.conf; +package org.onap.portalsdk.core.conf; import java.sql.Connection; import java.sql.ResultSet; @@ -30,9 +48,9 @@ import java.util.Properties; import javax.sql.DataSource; import org.hibernate.SessionFactory; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -46,7 +64,7 @@ import com.mchange.v2.c3p0.ComboPooledDataSource; @EnableTransactionManagement public class HibernateConfiguration { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HibernateConfiguration.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HibernateConfiguration.class); @Autowired private HibernateMappingLocatable hbMappingLocatable; @@ -81,15 +99,13 @@ public class HibernateConfiguration { public Map dataSourceMap() throws Exception { Connection conn = null; Statement stmt = null; + ResultSet rs = null; Map<String, ComboPooledDataSource> dataSourceMap = new HashMap<String, ComboPooledDataSource>(); - try { conn = dataSource.getConnection(); stmt = conn.createStatement(); - String sql; - sql = "SELECT schema_id,datasource_type,connection_url,user_name,password,driver_class,min_pool_size,max_pool_size,idle_connection_test_period FROM schema_info"; - ResultSet rs = stmt.executeQuery(sql); - + String sql = "SELECT schema_id,datasource_type,connection_url,user_name,password,driver_class,min_pool_size,max_pool_size,idle_connection_test_period FROM schema_info"; + rs = stmt.executeQuery(sql); while (rs.next()) { ComboPooledDataSource dataSource = new ComboPooledDataSource(); dataSource.setDriverClass(rs.getString("driver_class")); @@ -102,8 +118,11 @@ public class HibernateConfiguration { dataSourceMap.put(rs.getString("schema_id"), dataSource); } rs.close(); + rs = null; stmt.close(); + stmt = null; conn.close(); + conn = null; } catch (Exception e) { logger.error(EELFLoggerDelegate.errorLogger, "Error initializing database, verify database settings in properties file: " + e.getMessage(), @@ -113,8 +132,12 @@ public class HibernateConfiguration { throw e; } finally { try { + if (rs != null) + rs.close(); if (stmt != null) stmt.close(); + if (conn != null) + conn.close(); } catch (SQLException se2) { } try { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/HibernateMappingLocatable.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/HibernateMappingLocatable.java new file mode 100644 index 00000000..743d4b76 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/conf/HibernateMappingLocatable.java @@ -0,0 +1,61 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.conf; + +import org.springframework.core.io.Resource; + +/** + * Defines methods used by developers to supply Hibernate configuration. + */ +public interface HibernateMappingLocatable { + + /** + * Gets Hibernate mapping locations. + * + * @return Array of Resource objects (usually ClassPathResource that's a + * file) which contain Hibernate mapping information. + */ + public Resource [] getMappingLocations(); + + /** + * Gets package names. + * + * @return Array of Java package names to scan for classes with Hibernate annotations. + */ + public String [] getPackagesToScan(); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/FusionBaseController.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/FusionBaseController.java index c7820115..48c145b3 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/FusionBaseController.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/FusionBaseController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.controller; +package org.onap.portalsdk.core.controller; import java.util.ArrayList; import java.util.HashMap; @@ -28,16 +46,16 @@ import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.core.domain.MenuData; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.interfaces.SecurityInterface; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.menu.MenuBuilder; -import org.openecomp.portalsdk.core.service.AppService; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.service.FnMenuService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.domain.MenuData; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.interfaces.SecurityInterface; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.menu.MenuBuilder; +import org.onap.portalsdk.core.service.AppService; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.service.FnMenuService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; @@ -47,7 +65,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @Controller public abstract class FusionBaseController implements SecurityInterface{ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FusionBaseController.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FusionBaseController.class); @Override public boolean isAccessible() { @@ -111,8 +129,8 @@ public abstract class FusionBaseController implements SecurityInterface{ }catch(Exception e){ logger.error(EELFLoggerDelegate.errorLogger, e.getMessage()); } - model.put("childItemList",childItemList!=null?mapper.writeValueAsString(childItemList):""); - model.put("parentList",parentList!=null?mapper.writeValueAsString(parentList):""); + model.put("childItemList", mapper.writeValueAsString(childItemList)); + model.put("parentList", mapper.writeValueAsString(parentList)); return model; } diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/RestrictedBaseController.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/RestrictedBaseController.java new file mode 100644 index 00000000..1659dc32 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/RestrictedBaseController.java @@ -0,0 +1,68 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.controller; + +public class RestrictedBaseController extends FusionBaseController{ + + protected String viewName; + private String exceptionView; + @Override + public boolean isAccessible() { + return false; + } + @Override + public boolean isRESTfulCall(){ + return false; + } + protected String getViewName() { + return viewName; + } + protected void setViewName(String viewName) { + this.viewName = viewName; + } + + public String getExceptionView() { + return (exceptionView == null) ? "runtime_error_handler" : exceptionView; + } + + public void setExceptionView(String exceptionView) { + this.exceptionView = exceptionView; + } + + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/RestrictedRESTfulBaseController.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/RestrictedRESTfulBaseController.java new file mode 100644 index 00000000..1dfffaa0 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/RestrictedRESTfulBaseController.java @@ -0,0 +1,68 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.controller; + +public class RestrictedRESTfulBaseController extends FusionBaseController{ + + protected String viewName; + private String exceptionView; + @Override + public boolean isAccessible() { + return false; + } + @Override + public boolean isRESTfulCall(){ + return true; + } + protected String getViewName() { + return viewName; + } + protected void setViewName(String viewName) { + this.viewName = viewName; + } + + public String getExceptionView() { + return (exceptionView == null) ? "runtime_error_handler" : exceptionView; + } + + public void setExceptionView(String exceptionView) { + this.exceptionView = exceptionView; + } + + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/UnRestrictedBaseController.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/UnRestrictedBaseController.java new file mode 100644 index 00000000..81f0c54d --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/controller/UnRestrictedBaseController.java @@ -0,0 +1,58 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.controller; + +public class UnRestrictedBaseController extends FusionBaseController{ + protected String viewName; + + @Override + public boolean isAccessible() { + return true; + } + @Override + public boolean isRESTfulCall(){ + return false; + } + protected String getViewName() { + return viewName; + } + + protected void setViewName(String viewName) { + this.viewName = viewName; + } +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/AbstractDao.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/AbstractDao.java index 0b274068..c1d063a9 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/AbstractDao.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/AbstractDao.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.dao; +package org.onap.portalsdk.core.dao; import java.io.Serializable; import java.lang.reflect.ParameterizedType; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/ProfileDao.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/ProfileDao.java new file mode 100644 index 00000000..bb93ac36 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/ProfileDao.java @@ -0,0 +1,47 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.dao; + +import java.util.List; + +import org.onap.portalsdk.core.domain.Profile; + +public interface ProfileDao { + List<Profile> findAll(); + Profile getProfile(int id); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/ProfileDaoImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/ProfileDaoImpl.java new file mode 100644 index 00000000..ee6c32d3 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/ProfileDaoImpl.java @@ -0,0 +1,69 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.dao; + +import java.util.List; + +import org.hibernate.Criteria; +import org.hibernate.criterion.Restrictions; +import org.onap.portalsdk.core.dao.AbstractDao; +import org.onap.portalsdk.core.domain.Profile; +import org.springframework.stereotype.Repository; + +@Repository("profileDao") +public class ProfileDaoImpl extends AbstractDao<Integer, Profile> implements ProfileDao{ + + + public List<Profile> findAll() { + Criteria crit = getSession().createCriteria(Profile.class); + @SuppressWarnings("unchecked") + List<Profile> p = crit.list(); + + return p; + } + + + public Profile getProfile(int id) { + Criteria crit = getSession().createCriteria(Profile.class); + crit.add(Restrictions.eq("id", id)); + Profile profile = (Profile) crit.uniqueResult(); + + return profile; + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/hibernate/ModelOperationsCommon.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/hibernate/ModelOperationsCommon.java index cd9e644b..2c3fa5da 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/hibernate/ModelOperationsCommon.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/hibernate/ModelOperationsCommon.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.dao.hibernate; +package org.onap.portalsdk.core.dao.hibernate; import java.io.Serializable; import java.util.Collection; @@ -37,15 +55,15 @@ import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.criterion.ProjectionList; import org.hibernate.type.LongType; -import org.openecomp.portalsdk.core.dao.support.FusionDao; -import org.openecomp.portalsdk.core.domain.Lookup; -import org.openecomp.portalsdk.core.domain.support.DomainVo; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.dao.support.FusionDao; +import org.onap.portalsdk.core.domain.Lookup; +import org.onap.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; public abstract class ModelOperationsCommon extends FusionDao { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ModelOperationsCommon.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ModelOperationsCommon.class); @SuppressWarnings({ "rawtypes", "unchecked" }) public List _getList(Class domainClass, String filterClause, Integer fromIndex, Integer toIndex, String orderBy) { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/support/FusionDao.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/support/FusionDao.java new file mode 100644 index 00000000..a3ff27fd --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/dao/support/FusionDao.java @@ -0,0 +1,53 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.dao.support; + +import org.hibernate.SessionFactory; +import org.onap.portalsdk.core.FusionObject; + +public class FusionDao implements FusionObject { + private SessionFactory sessionFactory; + + public void setSessionFactory(SessionFactory sessionFactory) { + this.sessionFactory = sessionFactory; + } + + public SessionFactory getSessionFactory() { + return this.sessionFactory; + } +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/App.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/App.java index 6e8e6c80..dfc4ae3c 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/App.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/App.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; /** * Represents a row in the FN_APP table in the EP_SDK database. (A nearly diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/AuditLog.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java index 1b1326b6..7cebc1af 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/AuditLog.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/AuditLog.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.util.Date; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; public class AuditLog extends DomainVo { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/BroadcastMessage.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java index 42122dbd..d75a030a 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/BroadcastMessage.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/BroadcastMessage.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.util.*; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; public class BroadcastMessage extends DomainVo { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/DomainVo.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java index 9d173996..355f36cb 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/DomainVo.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/DomainVo.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/FnMenu.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java index d9aaf43d..f4ed41e4 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/FnMenu.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FnMenu.java @@ -1,26 +1,44 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; /** * <p>RoleFunction.java</p> diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java new file mode 100644 index 00000000..bf2321ba --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/FusionVo.java @@ -0,0 +1,45 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain; + +import org.onap.portalsdk.core.FusionObject; + +public class FusionVo implements FusionObject { + public FusionVo() { + } +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LoginBean.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java index f20eb4a8..742f26b6 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LoginBean.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LoginBean.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.util.Set; -import org.openecomp.portalsdk.core.domain.support.FusionCommand; +import org.onap.portalsdk.core.domain.support.FusionCommand; @SuppressWarnings("rawtypes") public class LoginBean extends FusionCommand { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java new file mode 100644 index 00000000..6248de85 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Lookup.java @@ -0,0 +1,99 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain; + +import java.io.Serializable; +import java.util.Objects; + +import org.onap.portalsdk.core.domain.support.NameValueId; + +public class Lookup extends FusionVo implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 1L; + private NameValueId nameValueId = new NameValueId(); + + public Lookup() {} + + public Lookup(String label, String value) { + this(); + setLabel(label); + setValue(value); + } + + public String getValue() { + return getNameValueId().getVal(); + } + + public String getLabel() { + return getNameValueId().getLab(); + } + + public void setValue(String value) { + getNameValueId().setVal(value); + } + + public void setLabel(String label) { + getNameValueId().setLab(label); + } + + public NameValueId getNameValueId() { + return nameValueId; + } + + public void setNameValueId(NameValueId nameValueId) { + this.nameValueId = nameValueId; + } + + // required by ZK for to set the selectedItems of Listboxes (used heavily for <select>-style drop-downs) + @Override + public int hashCode() { + return Objects.hash(getValue(), getLabel()); + } + + @Override + public boolean equals( Object obj ) { + if (obj == null || !(obj instanceof Lookup)) + return false; + Lookup lookup = (Lookup)obj; + return Objects.equals(lookup.getValue(), getValue()) && Objects.equals(lookup.getLabel(), getLabel()); + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LuCountry.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java index f0237892..2aa8a7db 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LuCountry.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuCountry.java @@ -1,26 +1,44 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; -import org.openecomp.portalsdk.core.domain.support.*; +import org.onap.portalsdk.core.domain.support.*; /** diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java new file mode 100644 index 00000000..23b1ec99 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuState.java @@ -0,0 +1,88 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain; + + +import org.onap.portalsdk.core.domain.support.*; + + +/** + * <p>State.java</p> + * + * <p>Represents a state data object.</p> + * + * @version 1.0 + */ +public class LuState extends DomainVo { + + /** + * + */ + private static final long serialVersionUID = 1L; + + LuState() {} + + public String getState() { + return state; + } + + public String getAbbr() { + return abbr; + } + + public void setState(String state) { + this.state = state; + } + + public void setAbbr(String abbr) { + this.abbr = abbr; + } + + + public int compareTo(Object obj){ + String c1 = getState(); + String c2 = ((LuState)obj).getState(); + + return c1.compareTo(c2); + } + + + private String abbr; + private String state; + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LuTimeZone.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java index bc0d9326..ad17754a 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LuTimeZone.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/LuTimeZone.java @@ -1,26 +1,44 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; -import org.openecomp.portalsdk.core.domain.support.*; +import org.onap.portalsdk.core.domain.support.*; /** diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Menu.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Menu.java index 471edf86..9f3f83e2 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Menu.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Menu.java @@ -1,26 +1,44 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; public class Menu extends DomainVo { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/MenuData.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/MenuData.java index c1cefb0b..8967b4f4 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/MenuData.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/MenuData.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.util.*; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Profile.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Profile.java index b5592021..02d1c838 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Profile.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Profile.java @@ -1,24 +1,42 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +package org.onap.portalsdk.core.domain; +import org.onap.portalsdk.core.domain.support.DomainVo; public class Profile extends DomainVo{ diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Role.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Role.java index cc9f0f8a..b2cdce05 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Role.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/Role.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.util.Iterator; import java.util.Set; import java.util.TreeSet; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/RoleFunction.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java index 9fee520f..448cc232 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/RoleFunction.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/RoleFunction.java @@ -1,26 +1,44 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; /** * <p>RoleFunction.java</p> diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java new file mode 100644 index 00000000..f7237ed5 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessible.java @@ -0,0 +1,96 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain; + +import java.io.Serializable; +import java.util.Objects; + +public class UrlsAccessible extends FusionVo implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 1L; + private UrlsAccessibleKey urlsAccessibleKey = new UrlsAccessibleKey(); + + public UrlsAccessible() {} + + public UrlsAccessible(String url, String functionCd) { + this(); + setUrl(url); + setFunctionCd(functionCd); + } + + public String getUrl() { + return getUrlsAccessibleKey().getUrl(); + } + + public String getFunctionCd() { + return getUrlsAccessibleKey().getFunctionCd(); + } + + public void setUrl(String url) { + getUrlsAccessibleKey().setUrl(url); + } + + public void setFunctionCd(String functionCd) { + getUrlsAccessibleKey().setFunctionCd(functionCd); + } + + public UrlsAccessibleKey getUrlsAccessibleKey() { + return urlsAccessibleKey; + } + + public void setUrlsAccessibleKey(UrlsAccessibleKey urlsAccessibleKey) { + this.urlsAccessibleKey = urlsAccessibleKey; + } + + @Override + public int hashCode() { + return Objects.hash(getUrl(), getFunctionCd()); + } + + @Override + public boolean equals( Object obj ) { + if (obj == null || !(obj instanceof UrlsAccessible)) + return false; + UrlsAccessible ua = (UrlsAccessible)obj; + return Objects.equals(ua.getUrl(), getUrl()) && Objects.equals(ua.getFunctionCd(), getFunctionCd()); + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UrlsAccessibleKey.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java index fc0b36ce..e7bdc5a6 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UrlsAccessibleKey.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UrlsAccessibleKey.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.io.*; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/User.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/User.java index 06c4d59e..a72f1d6a 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/User.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/User.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.util.Date; @@ -26,7 +44,7 @@ import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; /** * <p>User.java</p> diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UserApp.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserApp.java index cfadd995..74f7dd75 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UserApp.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserApp.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; import java.util.Set; import java.util.TreeSet; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UserAppId.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java index 9458b90a..a9ec9760 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UserAppId.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/UserAppId.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain; +package org.onap.portalsdk.core.domain; // Generated Aug 27, 2014 5:51:36 PM by Hibernate Tools 3.4.0.CR1 diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java new file mode 100644 index 00000000..cf296175 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java @@ -0,0 +1,81 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain.sessionmgt; + +public class TimeoutVO implements Comparable<TimeoutVO>{ + + private String jSessionId; + private Long sessionTimOutMilliSec; + + public TimeoutVO(){ + + } + + public TimeoutVO(String _jSessionId, Long _sessionTimOutMilliSec) { + setjSessionId(_jSessionId); + setSessionTimOutMilliSec(_sessionTimOutMilliSec); + + } + + public String getjSessionId() { + return jSessionId; + } + + public void setjSessionId(String jSessionId) { + this.jSessionId = jSessionId; + } + + public Long getSessionTimOutMilliSec() { + return sessionTimOutMilliSec; + } + + public void setSessionTimOutMilliSec(Long sessionTimOutMilliSec) { + this.sessionTimOutMilliSec = sessionTimOutMilliSec; + } + + @Override + public int compareTo(TimeoutVO o) { + return sessionTimOutMilliSec.compareTo(o.sessionTimOutMilliSec); + } + + + + + + +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java new file mode 100644 index 00000000..e78589f8 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Attribute.java @@ -0,0 +1,80 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain.support; + +public class Attribute { + public double width; + public double top; + public double left; + public String name; + public double height; + + public double getWidth() { + return width; + } + public void setWidth(double width) { + this.width = width; + } + public double getTop() { + return top; + } + public void setTop(double top) { + this.top = top; + } + public double getLeft() { + return left; + } + public void setLeft(double left) { + this.left = left; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public double getHeight() { + return height; + } + public void setHeight(double height) { + this.height = height; + } + + + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/CollaborateList.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/CollaborateList.java index eaeab84d..2f0c5d50 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/CollaborateList.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/CollaborateList.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain.support; +package org.onap.portalsdk.core.domain.support; import java.io.Serializable; import java.util.HashSet; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Container.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Container.java index 88a9fa71..cdbf6611 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Container.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Container.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain.support; +package org.onap.portalsdk.core.domain.support; import java.util.List; import java.util.Map; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Domain.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java index a21ff395..b4adaf95 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Domain.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Domain.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain.support; +package org.onap.portalsdk.core.domain.support; import java.util.ArrayList; import java.util.List; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/DomainVo.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/DomainVo.java index 369cc4cd..57718ed4 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/DomainVo.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/DomainVo.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain.support; +package org.onap.portalsdk.core.domain.support; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -27,7 +45,7 @@ import java.io.Serializable; import java.util.Date; import java.util.Set; -import org.openecomp.portalsdk.core.domain.FusionVo; +import org.onap.portalsdk.core.domain.FusionVo; /* Super class from which all data objects descend */ diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Element.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Element.java index 567487de..85147e48 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Element.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Element.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain.support; +package org.onap.portalsdk.core.domain.support; import java.util.HashMap; import java.util.List; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/ElementDetails.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/ElementDetails.java index 0e22d639..58c8d416 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/ElementDetails.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/ElementDetails.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain.support; +package org.onap.portalsdk.core.domain.support; import java.util.HashMap; import java.util.Map; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java new file mode 100644 index 00000000..08736f0d --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/FusionCommand.java @@ -0,0 +1,57 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain.support; + +import org.onap.portalsdk.core.FusionObject; + +public class FusionCommand implements FusionObject { + + private String task; + + public FusionCommand() { + } + + public String getTask() { + return task; + } + + public void setTask(String task) { + this.task = task; + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Layout.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java index 0d78e5dd..957bb9af 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Layout.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Layout.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain.support; +package org.onap.portalsdk.core.domain.support; import java.util.ArrayList; import java.util.HashMap; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/NameValueId.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/NameValueId.java index fcb9f726..cc05ea3f 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/NameValueId.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/NameValueId.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.domain.support; +package org.onap.portalsdk.core.domain.support; import java.io.Serializable; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Position.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Position.java new file mode 100644 index 00000000..29771e97 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Position.java @@ -0,0 +1,58 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain.support; + +public class Position { + double x; + double y; + + public double getX() { + return x; + } + public void setX(double x) { + this.x = x; + } + public double getY() { + return y; + } + public void setY(double y) { + this.y = y; + } + + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Size.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Size.java new file mode 100644 index 00000000..bbaaeac3 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/support/Size.java @@ -0,0 +1,58 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.domain.support; + +public class Size { + private double width; + private double height; + + public double getWidth() { + return width; + } + public void setWidth(double width) { + this.width = width; + } + public double getHeight() { + return height; + } + public void setHeight(double height) { + this.height = height; + } + + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/drools/DroolsRuleService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/drools/DroolsRuleService.java new file mode 100644 index 00000000..3f05af1b --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/drools/DroolsRuleService.java @@ -0,0 +1,45 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.drools; + +public interface DroolsRuleService { + + public void init(String... params); + public String getResultsString(); + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/drools/DroolsRuleServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/drools/DroolsRuleServiceImpl.java new file mode 100644 index 00000000..85187b4c --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/drools/DroolsRuleServiceImpl.java @@ -0,0 +1,76 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.drools; + + +/** + * + * This is POC test class to execute sample rules + */ +public class DroolsRuleServiceImpl implements DroolsRuleService{ + + + private String state; + private String resultsString; + + public DroolsRuleServiceImpl() { + + } + + public void init(String... params) { + this.state = params[0]; + } + + + + public String getState() { + return state; + } + + public String accessLabel() { + return "Drools POC Test"; + } + + public String getResultsString() { + return resultsString; + } + + public void setResultsString(String resultsString) { + this.resultsString = resultsString; + } +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/FusionExceptionResolver.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/FusionExceptionResolver.java index a2b4363a..e376f318 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/FusionExceptionResolver.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/FusionExceptionResolver.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.exception; +package org.onap.portalsdk.core.exception; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/SessionExpiredException.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/SessionExpiredException.java new file mode 100644 index 00000000..7d2f28ef --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/SessionExpiredException.java @@ -0,0 +1,53 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.exception; + +import org.onap.portalsdk.core.exception.support.FusionRuntimeException; + +public class SessionExpiredException extends FusionRuntimeException { + + /** + * + */ + private static final long serialVersionUID = 1L; + public static final String MESSAGE = "Your session has expired. Please login again."; + + public SessionExpiredException() { + super(MESSAGE); + } +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/UrlAccessRestrictedException.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/UrlAccessRestrictedException.java new file mode 100644 index 00000000..67bf87b0 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/UrlAccessRestrictedException.java @@ -0,0 +1,53 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.exception; + +import org.onap.portalsdk.core.exception.support.FusionRuntimeException; + +public class UrlAccessRestrictedException extends FusionRuntimeException { + + /** + * + */ + private static final long serialVersionUID = 1L; + public static final String MESSAGE = "Authorization Denied"; + + public UrlAccessRestrictedException() { + super(MESSAGE); + } +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/support/FusionException.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/support/FusionException.java new file mode 100644 index 00000000..012b9474 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/support/FusionException.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.exception.support; + +import org.onap.portalsdk.core.FusionObject; + +public interface FusionException extends FusionObject {} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/support/FusionRuntimeException.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/support/FusionRuntimeException.java new file mode 100644 index 00000000..ea0e7a13 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/exception/support/FusionRuntimeException.java @@ -0,0 +1,53 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.exception.support; + +public class FusionRuntimeException extends RuntimeException implements FusionException { + /** + * + */ + private static final long serialVersionUID = 1L; + public FusionRuntimeException() { + this(""); + } + + public FusionRuntimeException(String message) { + super(message); + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/interceptor/ResourceInterceptor.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java index 5a631198..a0b88dc7 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/interceptor/ResourceInterceptor.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.interceptor; +package org.onap.portalsdk.core.interceptor; import java.net.HttpURLConnection; import java.util.List; @@ -26,29 +44,30 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.core.controller.FusionBaseController; -import org.openecomp.portalsdk.core.domain.App; -import org.openecomp.portalsdk.core.exception.UrlAccessRestrictedException; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.service.LoginService; -import org.openecomp.portalsdk.core.service.UrlAccessService; -import org.openecomp.portalsdk.core.service.WebServiceCallService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.controller.FusionBaseController; +import org.onap.portalsdk.core.domain.App; +import org.onap.portalsdk.core.exception.UrlAccessRestrictedException; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +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.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.service.LoginService; +import org.onap.portalsdk.core.service.UrlAccessService; +import org.onap.portalsdk.core.service.WebServiceCallService; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; public class ResourceInterceptor extends HandlerInterceptorAdapter { - public static final String APP_METADATA = "APP.METADATA"; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ResourceInterceptor.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ResourceInterceptor.class); + + public static final String APP_METADATA = "APP.METADATA"; @Autowired private DataAccessService dataAccessService; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/interceptor/SessionTimeoutInterceptor.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/SessionTimeoutInterceptor.java index e28ce866..2b0f0007 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/interceptor/SessionTimeoutInterceptor.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/SessionTimeoutInterceptor.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.interceptor; +package org.onap.portalsdk.core.interceptor; import java.net.URLEncoder; @@ -25,19 +43,19 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.core.controller.FusionBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.exception.SessionExpiredException; -import org.openecomp.portalsdk.core.listener.CollaborateListBindingListener; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.controller.FusionBaseController; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.exception.SessionExpiredException; +import org.onap.portalsdk.core.listener.CollaborateListBindingListener; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; public class SessionTimeoutInterceptor extends HandlerInterceptorAdapter { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SessionTimeoutInterceptor.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SessionTimeoutInterceptor.class); public SessionTimeoutInterceptor() { } diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interfaces/SecurityInterface.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interfaces/SecurityInterface.java new file mode 100644 index 00000000..f6bf974f --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interfaces/SecurityInterface.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.interfaces; + +public interface SecurityInterface { + public boolean isAccessible(); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/ApplicationContextListener.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/ApplicationContextListener.java new file mode 100644 index 00000000..4d266be4 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/ApplicationContextListener.java @@ -0,0 +1,67 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.listener; + +import javax.servlet.ServletContext; +import javax.servlet.annotation.WebListener; + +import org.onap.portalsdk.core.lm.FusionLicenseManager; +import org.onap.portalsdk.core.lm.FusionLicenseManagerUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationListener; +import org.springframework.context.event.ContextRefreshedEvent; +import org.springframework.stereotype.Component; + +@WebListener +@Component +public class ApplicationContextListener implements ApplicationListener<ContextRefreshedEvent> { + + @Autowired + ServletContext context; + @Autowired + FusionLicenseManager lm; + @Autowired + FusionLicenseManagerUtils fusionLicenseManagerUtils; + + + public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent ) { + int licenseStatus = fusionLicenseManagerUtils.verifyLicense(context); + context.setAttribute("licenseVerification", licenseStatus); + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/listener/CollaborateListBindingListener.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/CollaborateListBindingListener.java index 9306aaf1..5dcd438c 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/listener/CollaborateListBindingListener.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/CollaborateListBindingListener.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.listener; +package org.onap.portalsdk.core.listener; import java.io.Serializable; import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionBindingListener; -import org.openecomp.portalsdk.core.domain.support.CollaborateList; +import org.onap.portalsdk.core.domain.support.CollaborateList; public class CollaborateListBindingListener implements HttpSessionBindingListener, Serializable { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/listener/UserSessionListener.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/UserSessionListener.java index adc84775..19b1f0f2 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/listener/UserSessionListener.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/listener/UserSessionListener.java @@ -1,37 +1,55 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.listener; +package org.onap.portalsdk.core.listener; import javax.servlet.annotation.WebListener; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; @WebListener public class UserSessionListener implements HttpSessionListener{ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserSessionListener.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserSessionListener.class); public void sessionCreated(HttpSessionEvent event){ diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/lm/FusionLicenseManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManager.java index eb371575..7f1f2273 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/lm/FusionLicenseManager.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManager.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.lm; +package org.onap.portalsdk.core.lm; import java.util.Date; import java.util.List; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/lm/FusionLicenseManagerUtils.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManagerUtils.java index 538709e8..c52abf44 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/lm/FusionLicenseManagerUtils.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/FusionLicenseManagerUtils.java @@ -1,31 +1,48 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.lm; +package org.onap.portalsdk.core.lm; import java.util.Date; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.util.SystemProperties; -//import org.openecomp.portalapp.lm.FusionLicenseManagerImpl; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.web.context.WebApplicationContext; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/LicenseableClass.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/LicenseableClass.java new file mode 100644 index 00000000..cd49f5a5 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/lm/LicenseableClass.java @@ -0,0 +1,56 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.lm; + +import java.io.*; + +/** + * created by Alvin Alexander of http://devdaily.com. + * modified by Sundar Ramalingam + */ +public interface LicenseableClass +{ + public String getApplicationName(); + public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException; + public String getAlias(); + public String getPublicKeystorePassword(); + public String getKeyPasswd(); + public String getCipherParamPassword(); + public Class getClassToLicense(); + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/AuditLog.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/AuditLog.java new file mode 100644 index 00000000..93075937 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/AuditLog.java @@ -0,0 +1,50 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.logging.aspect; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + + +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface AuditLog { + String value() default ""; +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/EELFLoggerAdvice.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAdvice.java index da4e2aff..269d4b9c 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/EELFLoggerAdvice.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAdvice.java @@ -1,34 +1,52 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.logging.aspect; +package org.onap.portalsdk.core.logging.aspect; import java.text.SimpleDateFormat; import java.util.Date; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.logging.format.AuditLogFormatter; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.AppService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum; +import org.onap.portalsdk.core.logging.format.AuditLogFormatter; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.AppService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; @@ -37,10 +55,10 @@ import com.att.eelf.configuration.Configuration; @org.springframework.context.annotation.Configuration public class EELFLoggerAdvice { - @Autowired - AppService appService; + private static final EELFLoggerDelegate adviceLogger = EELFLoggerDelegate.getLogger(EELFLoggerAdvice.class); - EELFLoggerDelegate adviceLogger = EELFLoggerDelegate.getLogger(EELFLoggerAdvice.class); + @Autowired + private AppService appService; // DateTime Format according to the ECOMP Application Logging Guidelines. private static final SimpleDateFormat ecompLogDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/EELFLoggerAspect.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java index 3138d21a..8c958924 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/EELFLoggerAspect.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.logging.aspect; +package org.onap.portalsdk.core.logging.aspect; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; -import org.openecomp.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum; +import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum; import org.springframework.beans.factory.annotation.Autowired; @@ -37,7 +55,7 @@ public class EELFLoggerAspect { /* * Point-cut expression to handle all INCOMING_REST_MESSAGES */ - @Pointcut("execution(public * org.openecomp.portalsdk.core.controller.*.*(..))") + @Pointcut("execution(public * org.onap.portalsdk.core.controller.*.*(..))") public void incomingAuditMessages() {} @Around("incomingAuditMessages() && @annotation(auditLog)") diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/MetricsLog.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/MetricsLog.java new file mode 100644 index 00000000..7d552774 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/MetricsLog.java @@ -0,0 +1,50 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.logging.aspect; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + + +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface MetricsLog { + String value() default ""; +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/AlarmSeverityEnum.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/AlarmSeverityEnum.java new file mode 100644 index 00000000..f2481e34 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/AlarmSeverityEnum.java @@ -0,0 +1,46 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.logging.format; + +public enum AlarmSeverityEnum { + CRITICAL, + MAJOR, + MINOR, + INFORMATIONAL, + NONE, +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/AppMessagesEnum.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/AppMessagesEnum.java index a6924ba0..84790f6b 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/AppMessagesEnum.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/AppMessagesEnum.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.logging.format; +package org.onap.portalsdk.core.logging.format; public enum AppMessagesEnum { /* diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ApplicationCodes.properties b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ApplicationCodes.properties index efd9ac24..220c4a0d 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ApplicationCodes.properties +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ApplicationCodes.properties @@ -1,21 +1,39 @@ ### -# ================================================================================ -# eCOMP Portal SDK -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. +# ============LICENSE_START========================================== +# ONAP Portal SDK +# =================================================================== +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# +# Unless otherwise specified, all software contained herein is licensed +# under the Apache License, Version 2.0 (the “License”); +# you may not use this software except in compliance with the License. # You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# +# http://www.apache.org/licenses/LICENSE-2.0 +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# ================================================================================ +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============LICENSE_END============================================ +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. ### ######################################################################## #Resource key=Error Code|Message text|Resolution text |Description text diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/AuditLogFormatter.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/AuditLogFormatter.java index 2cb336e2..4ea932a3 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/AuditLogFormatter.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/AuditLogFormatter.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.logging.format; +package org.onap.portalsdk.core.logging.format; import java.text.MessageFormat; import java.util.Map; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.SystemProperties; public class AuditLogFormatter { //Singleton diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ErrorCodesEnum.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ErrorCodesEnum.java index 549d3262..6dc7e99d 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ErrorCodesEnum.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ErrorCodesEnum.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.logging.format; +package org.onap.portalsdk.core.logging.format; import com.att.eelf.i18n.EELFResolvableErrorEnum; //import com.att.eelf.i18n.EELFResourceManager; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ErrorSeverityEnum.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ErrorSeverityEnum.java new file mode 100644 index 00000000..468a2b9a --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ErrorSeverityEnum.java @@ -0,0 +1,45 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.logging.format; + +public enum ErrorSeverityEnum { + INFO, + WARN, + ERROR, + FATAL, +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ErrorTypeEnum.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ErrorTypeEnum.java new file mode 100644 index 00000000..77477ca1 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/format/ErrorTypeEnum.java @@ -0,0 +1,47 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.logging.format; + +public enum ErrorTypeEnum { + RECOVERY, + CONFIG_ERROR, + SYSTEM_ERROR, + DATA_ERROR, + CONNECTION_PROBLEM, + AUTHENTICATION_PROBLEM +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/logic/EELFLoggerDelegate.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/logic/EELFLoggerDelegate.java index 319caf3c..2eef3793 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/logic/EELFLoggerDelegate.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/logic/EELFLoggerDelegate.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.logging.logic; +package org.onap.portalsdk.core.logging.logic; import static com.att.eelf.configuration.Configuration.MDC_ALERT_SEVERITY; import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID; @@ -34,13 +52,13 @@ import java.util.concurrent.ConcurrentMap; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.aspect.EELFLoggerAdvice; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.format.AppMessagesEnum; -import org.openecomp.portalsdk.core.logging.format.ErrorSeverityEnum; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.aspect.EELFLoggerAdvice; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.format.AppMessagesEnum; +import org.onap.portalsdk.core.logging.format.ErrorSeverityEnum; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.UserUtils; import org.slf4j.MDC; import com.att.eelf.configuration.EELFLogger; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/menu/MenuBuilder.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/menu/MenuBuilder.java index d856e7ee..ac1e9396 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/menu/MenuBuilder.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/menu/MenuBuilder.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.menu; +package org.onap.portalsdk.core.menu; import java.util.HashMap; import java.util.Iterator; @@ -26,11 +44,11 @@ import java.util.Set; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.FusionObject; -import org.openecomp.portalsdk.core.domain.MenuData; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.FusionObject; +import org.onap.portalsdk.core.domain.MenuData; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; @SuppressWarnings("rawtypes") diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/menu/MenuProperties.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/menu/MenuProperties.java index e55baeb4..18f3f83e 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/menu/MenuProperties.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/menu/MenuProperties.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.menu; +package org.onap.portalsdk.core.menu; import java.io.IOException; import java.util.HashMap; @@ -25,7 +43,7 @@ import java.util.Properties; import javax.servlet.ServletContext; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.SystemProperties; /* diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/AbstractCacheManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/AbstractCacheManager.java new file mode 100644 index 00000000..8bbf34cd --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/AbstractCacheManager.java @@ -0,0 +1,78 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.objectcache; + +import java.io.*; + +import org.onap.portalsdk.core.objectcache.support.*; + + +public abstract class AbstractCacheManager implements FusionCacheManager { + public AbstractCacheManager() { + super(); + // TODO Auto-generated constructor stub + } + + public Object getObject(String key) { + // TODO Auto-generated method stub + return null; + } + + public void putObject(String key, Object objectToCache) { + // TODO Auto-generated method stub + } + + public boolean isObjectInCache(String key) { + // TODO Auto-generated method stub + return false; + } + + public void removeObject(String key) { + // TODO Auto-generated method stub + } + + public void clearCache() { + // TODO Auto-generated method stub + } + + public void configure() throws IOException { + // TODO Auto-generated method stub + + } +} + diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/jcs/JCSCacheEventHandler.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/jcs/JCSCacheEventHandler.java index 0695876f..8660d9f9 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/jcs/JCSCacheEventHandler.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/jcs/JCSCacheEventHandler.java @@ -1,32 +1,50 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.objectcache.jcs; +package org.onap.portalsdk.core.objectcache.jcs; import org.apache.jcs.engine.control.event.behavior.IElementEvent; import org.apache.jcs.engine.control.event.behavior.IElementEventConstants; import org.apache.jcs.engine.control.event.behavior.IElementEventHandler; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class JCSCacheEventHandler implements IElementEventHandler, IElementEventConstants { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JCSCacheEventHandler.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JCSCacheEventHandler.class); public JCSCacheEventHandler() { super(); diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/jcs/JCSCacheManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/jcs/JCSCacheManager.java index 39b3f0cb..f169754f 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/jcs/JCSCacheManager.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/jcs/JCSCacheManager.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.objectcache.jcs; +package org.onap.portalsdk.core.objectcache.jcs; import java.io.IOException; import java.io.InputStream; @@ -32,14 +50,16 @@ import org.apache.jcs.access.exception.CacheException; import org.apache.jcs.engine.CacheConstants; import org.apache.jcs.engine.behavior.IElementAttributes; import org.apache.jcs.engine.control.CompositeCacheManager; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.web.context.ServletContextAware; public abstract class JCSCacheManager extends AbstractCacheManager implements CacheConstants, ServletContextAware { + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JCSCacheManager.class); + public static String LOOKUP_OBJECT_CACHE_NAME = "lookUpObjectCache"; public static String JCS_CONFIG_FILE_PATH = "cache_config_file_path"; public static String CACHE_LOAD_ON_STARTUP = "cache_load_on_startup"; @@ -48,8 +68,6 @@ public abstract class JCSCacheManager extends AbstractCacheManager implements Ca public static String CACHE_CONTROL_SWITCH_OFF = "0"; public static String CACHE_CONTROL_SWITCH = "cache_switch"; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JCSCacheManager.class); - private static JCS lookUpCache; private ServletContext servletContext; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/support/FusionCacheManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/support/FusionCacheManager.java new file mode 100644 index 00000000..e2a8ca14 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/objectcache/support/FusionCacheManager.java @@ -0,0 +1,54 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.objectcache.support; + +import java.io.*; + +import org.onap.portalsdk.core.FusionObject; + +public interface FusionCacheManager extends FusionObject { + + Object getObject(String key); + void putObject(String key, Object objectToCache); + boolean isObjectInCache(String key); + + void removeObject(String key); + void clearCache(); + void configure() throws IOException; +} + diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/client/AppContextManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/client/AppContextManager.java new file mode 100644 index 00000000..a446c435 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/client/AppContextManager.java @@ -0,0 +1,63 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.client; + +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +/** + * + * + * Use this class to get access to ApplicationContext for classes who were not created by Spring. + */ + + +@Component +public class AppContextManager implements ApplicationContextAware{ + private static ApplicationContext _appCtx; + + @Override + public void setApplicationContext(ApplicationContext ctx){ + _appCtx = ctx; + } + + public static ApplicationContext getAppContext(){ + return _appCtx; + } +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/session/TestClass.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/session/TestClass.java new file mode 100644 index 00000000..ff21d641 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/session/TestClass.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.session; + +public class TestClass { + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/sso/TestClass.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/sso/TestClass.java new file mode 100644 index 00000000..0bf193eb --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/sso/TestClass.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.sso; + +public class TestClass { + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/Consumer.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Consumer.java index e9921d18..6f76d1aa 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/Consumer.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Consumer.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import java.io.IOException; import java.security.GeneralSecurityException; @@ -27,8 +45,8 @@ import java.util.concurrent.ConcurrentLinkedQueue; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; import com.att.nsa.cambria.client.CambriaClientBuilders; import com.att.nsa.cambria.client.CambriaConsumer; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/FunctionalMenu.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/FunctionalMenu.java index 7cf3e91c..29a3b567 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/FunctionalMenu.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/FunctionalMenu.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/Helper.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Helper.java index 6e6b4ae8..02f64bd4 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/Helper.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Helper.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import java.util.LinkedList; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; /** * Provides utility methods. diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/Publisher.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Publisher.java index 8dbdda2b..9536fee8 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/Publisher.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/Publisher.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import java.io.IOException; import java.net.MalformedURLException; @@ -27,7 +45,7 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; import com.att.nsa.cambria.client.CambriaBatchingPublisher; import com.att.nsa.cambria.client.CambriaClientBuilders; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/PublisherList.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/PublisherList.java index 6919236f..0556e045 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/PublisherList.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/PublisherList.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/TopicManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/TopicManager.java index 8593b5bb..a19e2de6 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/TopicManager.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/TopicManager.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import java.io.IOException; import java.security.GeneralSecurityException; @@ -25,7 +43,6 @@ import java.util.LinkedList; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; import com.att.nsa.apiClient.http.HttpClient; import com.att.nsa.apiClient.http.HttpException; @@ -96,12 +113,11 @@ public class TopicManager { CambriaTopicManager tm = null; try { tm = new CambriaClientBuilders.TopicManagerBuilder().usingHosts(urlList).authenticatedBy(topicOwnerKey, topicOwnerSecret).build(); + tm.allowConsumer(topicName, subscriberKey); } catch (Exception e) { // TODO Auto-generated catch block - e.printStackTrace(); + logger.error("addSubscriber failed", e); } - //old version num : CambriaClientFactory.createTopicManager(urlList, topicOwnerKey,topicOwnerSecret); - tm.allowConsumer(topicName, subscriberKey); } /** diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebException.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebException.java index 875ba58d..462345ee 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebException.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebException.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; /** * Stores UEB-specific information including topic, message ID and message body. diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebManager.java index 7bf6de35..1608add1 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebManager.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebManager.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import java.io.IOException; import java.util.List; @@ -27,8 +45,8 @@ import java.util.concurrent.LinkedBlockingQueue; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; /** * Manages UEB interactions and provides methods for publishing requests, diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebMsg.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebMsg.java index da18c4f8..b05fae68 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebMsg.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebMsg.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import java.net.InetAddress; import java.net.UnknownHostException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebMsgTypes.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebMsgTypes.java new file mode 100644 index 00000000..ba94cdc9 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/UebMsgTypes.java @@ -0,0 +1,46 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.ueb; + +/** + * Publishes constants used in the UEB package. + */ +public interface UebMsgTypes { + public static final String UEB_MSG_TYPE_GET_FUNC_MENU = "uebMsgTypeGetFuncMenu"; + public static final String UEB_MSG_TYPE_WIDGET_NOTIFICATION = "uebMsgTypeWidgetNotification"; +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/WaitingRequestersQueueList.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/WaitingRequestersQueueList.java index db0ee1b9..768f1beb 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/WaitingRequestersQueueList.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/onboarding/ueb/WaitingRequestersQueueList.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.ueb; +package org.onap.portalsdk.core.onboarding.ueb; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/HttpStatusAndResponse.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/HttpStatusAndResponse.java new file mode 100644 index 00000000..7caba3d8 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/HttpStatusAndResponse.java @@ -0,0 +1,60 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.restful.client; + +/** + * Holds the status code and body that result from accessing an HTTP URL. + */ +public class HttpStatusAndResponse { + + private int statusCode; + private String response; + + public HttpStatusAndResponse(int status, String resp) { + this.statusCode = status; + this.response = resp; + } + + public int getStatusCode() { + return statusCode; + } + + public String getResponse() { + return response; + } +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/restful/client/PortalRestClientBase.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/PortalRestClientBase.java index b74d87c4..5ccb715b 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/restful/client/PortalRestClientBase.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/PortalRestClientBase.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.restful.client; +package org.onap.portalsdk.core.restful.client; import java.io.IOException; import java.net.URI; @@ -36,12 +54,12 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; -import org.openecomp.portalsdk.core.domain.App; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.openecomp.portalsdk.core.service.AppService; +import org.onap.portalsdk.core.domain.App; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.service.AppService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -59,7 +77,7 @@ import org.springframework.stereotype.Component; @Component public class PortalRestClientBase { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PortalRestClientBase.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PortalRestClientBase.class); @Autowired AppService appService; @@ -71,16 +89,14 @@ public class PortalRestClientBase { * @param uri * URI of the service * @return Result of the get; null if an error happens - * @throws URISyntaxException - * @throws IOException - * @throws ClientProtocolException + * @throws Exception */ - public HttpStatusAndResponse getRestWithCredentials(final URI uri) throws Exception { + public HttpStatusAndResponse getRestWithCredentials(final URI uri) throws Exception { String uebKey = PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY); App app = appService.getDefaultApp(); if (uebKey == null || app == null || app.getUsername() == null || app.getAppPassword() == null) - throw new Exception("Missing one or more required properties and/or database entries"); + throw new IllegalArgumentException("Missing one or more required properties and/or database entries"); String decryptedPassword = CipherUtil.decrypt(app.getAppPassword()); CloseableHttpClient httpClient = HttpClients.createDefault(); HttpGet httpGet = new HttpGet(uri); @@ -109,6 +125,8 @@ public class PortalRestClientBase { } finally { if (response != null) response.close(); + if (httpClient != null) + httpClient.close(); } if (response == null) return null; @@ -164,6 +182,8 @@ public class PortalRestClientBase { } finally { if (response != null) response.close(); + if (httpClient != null) + httpClient.close(); } return new HttpStatusAndResponse(response.getStatusLine().getStatusCode(), responseJson); } diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/restful/client/SharedContextRestClient.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/SharedContextRestClient.java index 91f4652a..89ebbe5a 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/restful/client/SharedContextRestClient.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/SharedContextRestClient.java @@ -1,34 +1,52 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.restful.client; +package org.onap.portalsdk.core.restful.client; import java.net.URI; import java.util.HashMap; import java.util.List; import org.apache.http.client.utils.URIBuilder; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.openecomp.portalsdk.core.restful.domain.SharedContext; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.restful.domain.SharedContext; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -53,10 +71,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @Component public class SharedContextRestClient extends PortalRestClientBase { - @Autowired - SystemProperties systemProperties; - - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SharedContextRestClient.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SharedContextRestClient.class); /** * Reusable JSON (de)serializer diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/scheduler/CoreRegister.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/scheduler/CoreRegister.java index 5f81308f..68907d3d 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/scheduler/CoreRegister.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/scheduler/CoreRegister.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.scheduler; +package org.onap.portalsdk.core.scheduler; import java.util.ArrayList; import java.util.List; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.quartz.CronTrigger; import org.quartz.Trigger; import org.springframework.context.annotation.DependsOn; @@ -34,17 +52,12 @@ import org.springframework.stereotype.Component; @DependsOn({"systemProperties"}) public class CoreRegister { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CoreRegister.class); - Trigger trigger[] = new Trigger[1]; - - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CoreRegister.class); - //@Autowired - //private SessionMgtRegistry sessionMgtRegistry; + Trigger trigger[] = new Trigger[1]; protected List<Trigger> scheduleTriggers = new ArrayList<Trigger>(); - public void registerTriggers() { // we can use this method to add any schedules to the core diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/scheduler/CronRegistry.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/scheduler/CronRegistry.java index dfd9a817..3b1c7030 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/scheduler/CronRegistry.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/scheduler/CronRegistry.java @@ -1,41 +1,58 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.scheduler; +package org.onap.portalsdk.core.scheduler; import java.text.ParseException; import java.util.Map; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.quartz.CronTrigger; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.quartz.CronTriggerFactoryBean; import org.springframework.scheduling.quartz.JobDetailFactoryBean; import org.springframework.scheduling.quartz.QuartzJobBean; import com.mchange.v2.c3p0.ComboPooledDataSource; -public abstract class CronRegistry { +public abstract class CronRegistry { + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CronRegistry.class); - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CronRegistry.class); protected JobDetailFactoryBean jobDetailFactory; protected CronTriggerFactoryBean cronTriggerFactory; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/scheduler/Registerable.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/scheduler/Registerable.java new file mode 100644 index 00000000..33af9d1a --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/scheduler/Registerable.java @@ -0,0 +1,48 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.scheduler; + +import org.quartz.Trigger; + +public interface Registerable { + + public void registerTriggers(); + + public Trigger[] getTriggers(); + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AccessConfiguration.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AccessConfiguration.java index 04163d06..d369199d 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AccessConfiguration.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AccessConfiguration.java @@ -1,4 +1,42 @@ -package org.openecomp.portalsdk.core.service; +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ + +package org.onap.portalsdk.core.service; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AppService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AppService.java new file mode 100644 index 00000000..6ca1d013 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AppService.java @@ -0,0 +1,79 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.List; + +import org.onap.portalsdk.core.domain.App; + +/** + * Defines methods to fetch App domain objects. + * + * Very thin interface; Portal defines a much richer interface. + */ +public interface AppService { + + /** + * Gets all apps defined in the table. + * + * @return List of apps. + */ + List<App> getApps(); + + /** + * Gets the app with the specified ID. + * + * @param appId + * @return App with the specified ID. + */ + App getApp(Long appId); + + /** + * Gets the singleton entry - applications should have exactly 1 row in the + * FN_APP table. + */ + App getDefaultApp(); + + /** + * Fetches the application name once from database + * and keep refers to the same name later on as required. + * @return Default Application Name + */ + String getDefaultAppName(); + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AppServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AppServiceImpl.java index b06b36fc..179b0864 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AppServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AppServiceImpl.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.List; -import org.openecomp.portalsdk.core.domain.App; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.domain.App; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -31,7 +49,7 @@ import org.springframework.transaction.annotation.Transactional; @Transactional public class AppServiceImpl implements AppService{ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppServiceImpl.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppServiceImpl.class); @Autowired private DataAccessService dataAccessService; @@ -42,29 +60,17 @@ public class AppServiceImpl implements AppService{ */ private static String defaultAppName = ""; - /* - * (non-Javadoc) - * @see org.openecomp.portalsdk.core.service.AppService#getApps() - */ @SuppressWarnings("unchecked") @Override public List<App> getApps() { return getDataAccessService().getList(App.class, null); } - /* - * (non-Javadoc) - * @see org.openecomp.portalsdk.service.AppService#getApp(long) - */ @Override public App getApp(Long appId) { return (App)getDataAccessService().getDomainObject(App.class, appId, null); } - - /* - * (non-Javadoc) - * @see org.openecomp.portalsdk.service.AppService#getApp() - */ + @Override public App getDefaultApp() { return getApp(1L); diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AuditService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AuditService.java new file mode 100644 index 00000000..ec0c7ce7 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AuditService.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.HashMap; + +import org.onap.portalsdk.core.domain.AuditLog; + +public interface AuditService { + /** + * + * Update log data in database + * + * @param auditLog + * @param additionalParams + */ + + @SuppressWarnings("rawtypes") + void logActivity(AuditLog auditLog, HashMap additionalParams); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AuditServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AuditServiceImpl.java new file mode 100644 index 00000000..77db3681 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AuditServiceImpl.java @@ -0,0 +1,68 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.HashMap; + +import org.onap.portalsdk.core.domain.AuditLog; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service("auditService") +@Transactional +public class AuditServiceImpl implements AuditService { + public AuditServiceImpl() {} + + @Autowired + private DataAccessService dataAccessService; + + @SuppressWarnings("rawtypes") + public void logActivity(AuditLog auditLog, HashMap additionalParams) { + getDataAccessService().saveDomainObject(auditLog, additionalParams); + } + + public DataAccessService getDataAccessService() { + return dataAccessService; + } + + public void setDataAccessService(DataAccessService dataAccessService) { + this.dataAccessService = dataAccessService; + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/BroadcastService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/BroadcastService.java new file mode 100644 index 00000000..bef46450 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/BroadcastService.java @@ -0,0 +1,54 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.*; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.domain.BroadcastMessage; + +@SuppressWarnings("rawtypes") +public interface BroadcastService { + HashMap getBcModel(HttpServletRequest request); + Hashtable getBroadcastMessages(); + void loadMessages(); + BroadcastMessage getBroadcastMessage(HttpServletRequest request); + void saveBroadcastMessage(BroadcastMessage broadcastMessage); + void removeBroadcastMessage(BroadcastMessage broadcastMessage); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/BroadcastServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/BroadcastServiceImpl.java index 92a77507..19803d94 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/BroadcastServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/BroadcastServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.Calendar; import java.util.Collections; @@ -29,11 +47,11 @@ import java.util.TreeSet; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.domain.BroadcastMessage; -import org.openecomp.portalsdk.core.domain.Lookup; -import org.openecomp.portalsdk.core.service.support.FusionService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.domain.BroadcastMessage; +import org.onap.portalsdk.core.domain.Lookup; +import org.onap.portalsdk.core.service.support.FusionService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -190,8 +208,9 @@ public class BroadcastServiceImpl extends FusionService implements BroadcastServ public static boolean hasServerMessages(String locationId, String siteCd) { List messages = getBroadcastMessages(locationId); - boolean messagesExist = !((messages == null) || messages.size() == 0); + if (!messagesExist) + return false; if (siteCd == null) { return messagesExist; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/CentralAccessCondition.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/CentralAccessCondition.java new file mode 100644 index 00000000..65ee9460 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/CentralAccessCondition.java @@ -0,0 +1,65 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.core.type.AnnotatedTypeMetadata; + +public class CentralAccessCondition implements Condition { + + /** + * returns true if the application is centralized + */ + @Override + public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { + boolean isRemote = false; + + if(PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED) == null) + { + isRemote = false; + } + else if(PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED) != null && PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED).equals("remote")){ + isRemote = true; + } + + return isRemote; + } +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/DataAccessService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/DataAccessService.java index 26892b88..737d6a6f 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/DataAccessService.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/DataAccessService.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.io.Serializable; @@ -29,7 +47,7 @@ import org.hibernate.FetchMode; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.criterion.ProjectionList; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; @SuppressWarnings("rawtypes") public interface DataAccessService { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/DataAccessServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/DataAccessServiceImpl.java index 9c52b1b4..e53260db 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/DataAccessServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/DataAccessServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.io.Serializable; import java.util.Collection; @@ -37,11 +55,11 @@ import org.hibernate.SessionFactory; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.criterion.ProjectionList; -import org.openecomp.portalsdk.core.domain.Lookup; -import org.openecomp.portalsdk.core.domain.support.DomainVo; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.support.FusionService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.domain.Lookup; +import org.onap.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.support.FusionService; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; @@ -51,18 +69,11 @@ import org.springframework.transaction.annotation.Transactional; @Transactional public class DataAccessServiceImpl extends FusionService implements DataAccessService { + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DataAccessServiceImpl.class); + @Autowired private SessionFactory sessionFactory; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DataAccessServiceImpl.class); - - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#getDomainObject(java.lang. - * Class, java.io.Serializable, java.util.HashMap) - */ @Override public DomainVo getDomainObject(Class domainClass, Serializable id, HashMap additionalParams) { DomainVo vo = null; @@ -80,23 +91,12 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return vo; } - /* - * (non-Javadoc) - * - */ @Override public void deleteDomainObject(DomainVo domainObject, HashMap additionalParams) { Session session = sessionFactory.getCurrentSession(); session.delete(domainObject); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#deleteDomainObjects(java. - * lang.Class, java.lang.String, java.util.HashMap) - */ @Override public void deleteDomainObjects(Class domainClass, String whereClause, HashMap additionalParams) { int rowsAffected = 0; @@ -110,12 +110,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe /* return rowsAffected; */ } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#saveDomainObject - */ @Override public void saveDomainObject(DomainVo vo, HashMap additionalParams) { Integer userId = 1; @@ -206,50 +200,22 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return list; } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#getList(java.lang.Class, - * java.util.HashMap) - */ @Override public List getList(Class domainClass, HashMap additionalParams) { return getListCommon(domainClass, null, null, null, null); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#getList(java.lang.Class, - * java.lang.String, java.lang.String, java.util.HashMap) - */ @Override public List getList(Class domainClass, String filter, String orderBy, HashMap additionalParams) { return getListCommon(domainClass, filter, null, null, orderBy); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#getList(java.lang.Class, - * java.lang.String, int, int, java.lang.String, java.util.HashMap) - */ @Override public List getList(Class domainClass, String filter, int fromIndex, int toIndex, String orderBy, HashMap additionalParams) { return getListCommon(domainClass, filter, new Integer(fromIndex), new Integer(toIndex), orderBy); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#getList(java.lang.Class, - * org.hibernate.criterion.ProjectionList, java.util.List, java.util.List) - */ @Override public List<?> getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList, List<Order> orderByList) { @@ -280,14 +246,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return criteria.list(); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#getLookupList(java.lang. - * String, java.lang.String, java.lang.String, java.lang.String, - * java.lang.String, java.util.HashMap) - */ @Override public List getLookupList(String dbTable, String dbValueCol, String dbLabelCol, String dbFilter, String dbOrderBy, HashMap additionalParams) { @@ -328,26 +286,11 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe * extensibility, just in case) */ - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeSQLQuery(java.lang. - * String, java.lang.Class, java.util.HashMap) - */ @Override public List executeSQLQuery(String sql, Class domainClass, HashMap additionalParams) { return executeSQLQuery(sql, domainClass, null, null, additionalParams); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeSQLQuery(java.lang. - * String, java.lang.Class, java.lang.Integer, java.lang.Integer, - * java.util.HashMap) - */ @Override public List executeSQLQuery(String sql, Class domainClass, Integer fromIndex, Integer toIndex, HashMap additionalParams) { @@ -364,25 +307,11 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return query.list(); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeQuery(java.lang. - * String, java.util.HashMap) - */ @Override public List executeQuery(String sql, HashMap additionalParams) { return executeQuery(sql, null, null, additionalParams); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeQuery(java.lang. - * String, java.lang.Integer, java.lang.Integer, java.util.HashMap) - */ @Override public List executeQuery(String sql, Integer fromIndex, Integer toIndex, HashMap additionalParams) { Session session = sessionFactory.getCurrentSession(); @@ -398,38 +327,16 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return query.list(); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeNamedQuery(java.lang - * .String, java.lang.Integer, java.lang.Integer, java.util.HashMap) - */ @Override public List executeNamedQuery(String queryName, Integer fromIndex, Integer toIndex, HashMap additionalParams) { return executeNamedQuery(queryName, null, fromIndex, toIndex, additionalParams); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeNamedQuery(java.lang - * .String, java.util.Map, java.util.HashMap) - */ @Override public List executeNamedQuery(String queryName, Map params, HashMap additionalParams) { return executeNamedQuery(queryName, params, null, null, additionalParams); } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeNamedQuery(java.lang - * .String, java.util.Map, java.lang.Integer, java.lang.Integer, - * java.util.HashMap) - */ @Override public List executeNamedQuery(String queryName, Map params, Integer fromIndex, Integer toIndex, HashMap additionalParams) { @@ -473,14 +380,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe // With Where Clause & RAPTOR's ZK - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.service.DataAccessService# - * executeNamedQueryWithOrderBy(java.lang.Class, java.lang.String, - * java.util.Map, java.lang.String, boolean, java.lang.Integer, - * java.lang.Integer, java.util.HashMap) - */ @Override public List executeNamedQueryWithOrderBy(Class entity, String queryName, Map params, String _orderBy, boolean asc, Integer fromIndex, Integer toIndex, HashMap additionalParams) { @@ -489,13 +388,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return null; } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeNamedCountQuery(java - * .lang.Class, java.lang.String, java.lang.String, java.util.Map) - */ @Override public List executeNamedCountQuery(Class entity, String queryName, String whereClause, Map params) { // TODO Auto-generated method stub @@ -503,14 +395,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return null; } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeNamedQuery(java.lang - * .Class, java.lang.String, java.lang.String, java.util.Map, - * java.lang.Integer, java.lang.Integer, java.util.HashMap) - */ @Override public List executeNamedQuery(Class entity, String queryName, String whereClause, Map params, Integer fromIndex, Integer toIndex, HashMap additionalParams) { @@ -519,14 +403,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return null; } - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.service.DataAccessService# - * executeNamedQueryWithOrderBy(java.lang.Class, java.lang.String, - * java.lang.String, java.util.Map, java.lang.String, boolean, - * java.lang.Integer, java.lang.Integer, java.util.HashMap) - */ @Override public List executeNamedQueryWithOrderBy(Class entity, String queryName, String whereClause, Map params, String _orderBy, boolean asc, Integer fromIndex, Integer toIndex, HashMap additionalParams) { @@ -535,14 +411,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return null; } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#getList(java.lang.Class, - * org.hibernate.criterion.ProjectionList, java.util.List, java.util.List, - * java.util.HashMap) - */ @Override public List<?> getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList, List<Order> orderByList, HashMap<String, FetchMode> fetchModeMap) { @@ -551,13 +419,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return null; } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeUpdateQuery(java. - * lang.String, java.util.HashMap) - */ @Override public int executeUpdateQuery(String sql, HashMap additionalParams) throws RuntimeException { // TODO Auto-generated method stub @@ -565,13 +426,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return 0; } - /* - * (non-Javadoc) - * - * @see - * org.openecomp.portalsdk.core.service.DataAccessService#executeNamedUpdateQuery( - * java.lang.String, java.util.Map, java.util.HashMap) - */ @Override public int executeNamedUpdateQuery(String queryName, Map params, HashMap additionalParams) throws RuntimeException { // TODO Auto-generated method stub @@ -579,12 +433,6 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe return 0; } - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.service.DataAccessService#synchronize(java.util. - * HashMap) - */ @Override public void synchronize(HashMap additionalParams) { // TODO Auto-generated method stub diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ElementLinkService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementLinkService.java index 0cd90dc7..d9c25377 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ElementLinkService.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementLinkService.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.io.File; import java.io.IOException; @@ -26,8 +44,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.util.YamlUtils; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.YamlUtils; public class ElementLinkService { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ElementMapService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java index 8213a5ba..2c89dccd 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ElementMapService.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ElementMapService.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.io.File; import java.util.ArrayList; @@ -29,21 +47,21 @@ import java.util.Set; import java.util.TreeSet; import org.apache.commons.lang.StringUtils; -import org.openecomp.portalsdk.core.domain.support.Container; -import org.openecomp.portalsdk.core.domain.support.Domain; -import org.openecomp.portalsdk.core.domain.support.Element; -import org.openecomp.portalsdk.core.domain.support.ElementDetails; -import org.openecomp.portalsdk.core.domain.support.Layout; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.util.YamlUtils; +import org.onap.portalsdk.core.domain.support.Container; +import org.onap.portalsdk.core.domain.support.Domain; +import org.onap.portalsdk.core.domain.support.Element; +import org.onap.portalsdk.core.domain.support.ElementDetails; +import org.onap.portalsdk.core.domain.support.Layout; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.YamlUtils; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.nodes.Tag; import org.yaml.snakeyaml.representer.Representer; public class ElementMapService { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ElementMapService.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ElementMapService.class); /** * diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FnMenuService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FnMenuService.java new file mode 100644 index 00000000..12203671 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FnMenuService.java @@ -0,0 +1,70 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.List; +import java.util.Set; + +import org.onap.portalsdk.core.domain.Menu; +import org.onap.portalsdk.core.domain.MenuData; + +/** + * Defines services for admin user to add/edit/delete menu items from FN_MENU. + */ +public interface FnMenuService { + List<MenuData> getFnMenuItems(); + + void saveFnMenuData(MenuData domainFnMenu); + + void saveFnMenu(Menu domainFnMenu); + + void removeMenuItem(MenuData domainFnMenu); + + MenuData getMenuItemRow(Long id); + + Menu getMenuItem(Long id); + + List<Long> getParentId(String label); + + @SuppressWarnings("rawtypes") + List<List> getParentList(); + + void removeMenuItem(Menu domainFnMenu); + + void setMenuDataStructure(List<List<MenuData>> childItemList, List<MenuData> parentList, Set<MenuData> menuResult); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FnMenuServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FnMenuServiceImpl.java index 6d8667f9..8c445a46 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FnMenuServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FnMenuServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.ArrayList; import java.util.HashMap; @@ -25,17 +43,12 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.openecomp.portalsdk.core.domain.Menu; -import org.openecomp.portalsdk.core.domain.MenuData; +import org.onap.portalsdk.core.domain.Menu; +import org.onap.portalsdk.core.domain.MenuData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -/** - * Description: this java class is an implementation of services for Admin to - * add/edit/delete menu items from FN_MENU - */ - @Service("fnMenuService") @Transactional public class FnMenuServiceImpl implements FnMenuService { @@ -74,7 +87,7 @@ public class FnMenuServiceImpl implements FnMenuService { public List<List> getParentList() { return getDataAccessService().executeNamedQuery("parentList", null, null); } - + @Override public void removeMenuItem(MenuData domainFnMenu) { getDataAccessService().deleteDomainObject(domainFnMenu, null); @@ -100,8 +113,8 @@ public class FnMenuServiceImpl implements FnMenuService { } @Override - public Map<String, List<MenuData>> setMenuDataStructure(List<List<MenuData>> childItemList, - List<MenuData> parentList, Set<MenuData> menuResult) throws Exception { + public void setMenuDataStructure(List<List<MenuData>> childItemList, List<MenuData> parentList, + Set<MenuData> menuResult) { for (MenuData menu : menuResult) { MenuData parentData = new MenuData(); parentData.setLabel(menu.getLabel()); @@ -119,7 +132,6 @@ public class FnMenuServiceImpl implements FnMenuService { } childItemList.add(tempList); } - return null; } } diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListService.java new file mode 100644 index 00000000..e2e6349d --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListService.java @@ -0,0 +1,51 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.io.IOException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.domain.RoleFunction; + +public interface FunctionalMenuListService { + + List<RoleFunction> getFunctionCDList(HttpServletRequest request) throws IOException; + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java new file mode 100644 index 00000000..7192198d --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java @@ -0,0 +1,68 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.io.IOException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.web.support.UserUtils; +import org.springframework.beans.factory.annotation.Autowired; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.type.TypeFactory; + +public class FunctionalMenuListServiceCentralizedImpl implements FunctionalMenuListService{ + + @Autowired + private RestApiRequestBuilder restApiRequestBuilder; + + @Override + public List<RoleFunction> getFunctionCDList(HttpServletRequest request) throws IOException { + User user = UserUtils.getUserSession(request); + ObjectMapper mapper = new ObjectMapper(); + String menuList = restApiRequestBuilder.getViaREST("/menuFunctions", true, user.getOrgUserId()); + List<RoleFunction> roleFunctionFinalList = mapper.readValue(menuList, + TypeFactory.defaultInstance().constructCollectionType(List.class, String.class)); + return roleFunctionFinalList; + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceImpl.java new file mode 100644 index 00000000..b9e70e6e --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/FunctionalMenuListServiceImpl.java @@ -0,0 +1,67 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.io.IOException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.domain.RoleFunction; +import org.springframework.beans.factory.annotation.Autowired; + +public class FunctionalMenuListServiceImpl implements FunctionalMenuListService{ + + @Autowired + private DataAccessService dataAccessService; + + public DataAccessService getDataAccessService() { + return dataAccessService; + } + + public void setDataAccessService(DataAccessService dataAccessService) { + this.dataAccessService = dataAccessService; + } + + @SuppressWarnings("unchecked") + @Override + public List<RoleFunction> getFunctionCDList(HttpServletRequest request) throws IOException { + return getDataAccessService().executeNamedQuery("functionCDlist", null, null); + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LdapService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LdapService.java new file mode 100644 index 00000000..9156c8a7 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LdapService.java @@ -0,0 +1,49 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import org.onap.portalsdk.core.command.support.SearchResult; +import org.onap.portalsdk.core.domain.support.DomainVo; + + +public interface LdapService { + + // search POST for users based on the criteria selected in the Request + SearchResult searchPost(DomainVo searchCriteria, String sortBy1, String sortBy2, String sortBy3, int pageNo, int dataSize, int userId) throws Exception; + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LdapServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LdapServiceImpl.java index ba43e45f..ca2e13aa 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LdapServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LdapServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.ArrayList; import java.util.Collections; @@ -30,13 +48,13 @@ import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import javax.naming.directory.SearchControls; -import org.openecomp.portalsdk.core.command.support.SearchResult; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.domain.support.DomainVo; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.support.FusionService; -import org.openecomp.portalsdk.core.service.support.ServiceLocator; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.command.support.SearchResult; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.support.FusionService; +import org.onap.portalsdk.core.service.support.ServiceLocator; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -45,7 +63,8 @@ import org.springframework.transaction.annotation.Transactional; @Transactional public class LdapServiceImpl extends FusionService implements LdapService { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LdapServiceImpl.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LdapServiceImpl.class); + @Autowired private ServiceLocator serviceLocator; @@ -257,9 +276,9 @@ public class LdapServiceImpl extends FusionService implements LdapService { } } catch (NamingException e) { logger.error(EELFLoggerDelegate.errorLogger, "An error occurred while processing the following user from POST with an ORGUSERID of " + user.getOrgUserId() + e.getMessage()); - } finally { - return user; - } + } + + return user; } diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LocalAccessCondition.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LocalAccessCondition.java new file mode 100644 index 00000000..772b2559 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LocalAccessCondition.java @@ -0,0 +1,56 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.core.type.AnnotatedTypeMetadata; + +public class LocalAccessCondition implements Condition{ + + /** + * returns true if the application is not centralized + */ + @Override + public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { + return PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED) == null || (PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED) != null && ! PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED).equals("remote")); + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginService.java new file mode 100644 index 00000000..f3a62de7 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginService.java @@ -0,0 +1,72 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + + +import java.util.*; + +import org.onap.portalsdk.core.command.*; + + +public interface LoginService { + + /** + * + * @param bean + * @param menuPropertiesFilename + * @param additionalParams + * @return returns login user bean + * @throws Exception + */ + // validate user exists in the system + @SuppressWarnings("rawtypes") + LoginBean findUser(LoginBean bean, String menuPropertiesFilename, HashMap additionalParams) throws Exception; + + + /** + * + * @param bean + * @param menuPropertiesFilename + * @param additionalParams + * @param matchPassword + * @return returns login user bean + * @throws Exception + */ + @SuppressWarnings("rawtypes") + LoginBean findUser(LoginBean bean, String menuPropertiesFilename, HashMap additionalParams, boolean matchPassword) throws Exception; +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LoginServiceCentralizedImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginServiceCentralizedImpl.java index bab2249c..9956cc48 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LoginServiceCentralizedImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginServiceCentralizedImpl.java @@ -1,4 +1,41 @@ -package org.openecomp.portalsdk.core.service; +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; import java.util.Date; import java.util.HashMap; @@ -8,15 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.openecomp.portalsdk.core.command.LoginBean; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.menu.MenuBuilder; -import org.openecomp.portalsdk.core.service.support.FusionService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.command.LoginBean; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.menu.MenuBuilder; +import org.onap.portalsdk.core.service.support.FusionService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; @@ -24,19 +60,17 @@ import org.springframework.transaction.annotation.Transactional; @Transactional public class LoginServiceCentralizedImpl extends FusionService implements LoginService { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginServiceCentralizedImpl.class); - @Autowired - AppService appService; + private AppService appService; @Autowired private DataAccessService dataAccessService; @Autowired - RestApiRequestBuilder restApiRequestBuilder; + private RestApiRequestBuilder restApiRequestBuilder; @Autowired - UserService userService; + private UserService userService; @SuppressWarnings("unused") private MenuBuilder menuBuilder; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LoginServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginServiceImpl.java index a38a16ff..6965bf3c 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LoginServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.Date; import java.util.HashMap; @@ -26,14 +44,14 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import org.openecomp.portalsdk.core.command.LoginBean; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.menu.MenuBuilder; -import org.openecomp.portalsdk.core.service.support.FusionService; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.command.LoginBean; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.menu.MenuBuilder; +import org.onap.portalsdk.core.service.support.FusionService; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.web.support.UserUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostDroolsService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostDroolsService.java new file mode 100644 index 00000000..b299f021 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostDroolsService.java @@ -0,0 +1,52 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.List; + +import org.onap.portalsdk.core.command.PostDroolsBean; + +public interface PostDroolsService { + + String execute(String droolsFile, String className, String selectedRules); + + List<PostDroolsBean> fetchDroolBeans(); + + String retrieveClass(String droolsFile); + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostDroolsServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostDroolsServiceImpl.java index 658de264..1d5d9cc9 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostDroolsServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostDroolsServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.io.File; import java.io.IOException; @@ -38,10 +56,10 @@ import org.kie.internal.builder.KnowledgeBuilderFactory; import org.kie.internal.definition.KnowledgePackage; import org.kie.internal.io.ResourceFactory; import org.kie.internal.runtime.StatefulKnowledgeSession; -import org.openecomp.portalsdk.core.command.PostDroolsBean; -import org.openecomp.portalsdk.core.drools.DroolsRuleService; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.command.PostDroolsBean; +import org.onap.portalsdk.core.drools.DroolsRuleService; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -55,7 +73,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @Transactional public class PostDroolsServiceImpl implements PostDroolsService{ - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostDroolsServiceImpl.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostDroolsServiceImpl.class); @Override public String execute(String droolsFile, String className, String selectedRules) { @@ -96,8 +114,8 @@ public class PostDroolsServiceImpl implements PostDroolsService{ final Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages(); return pkgs.iterator().next().getFactTypes().iterator().next().getFactClass().getName(); - } catch (Throwable t) { - logger.error(EELFLoggerDelegate.errorLogger, t.getMessage()); + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "retrieveClass failed", e); } return resultsString; @@ -174,8 +192,8 @@ public class PostDroolsServiceImpl implements PostDroolsService{ // kSession.setGlobal("age", "25"); // kSession.insert(new DroolsRuleService("NY")); // kSession.fireAllRules(); - } catch (Throwable t) { - logger.error(EELFLoggerDelegate.errorLogger, t.getMessage()); + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "executeDemoRules failed", e); } return resultsString; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostSearchService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostSearchService.java new file mode 100644 index 00000000..91d21776 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostSearchService.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.command.PostSearchBean; + +public interface PostSearchService { + + /** + * Imports the selected users in the search results as new users. + * + * @param request + * @param postSearch + * @return the number of users successfully imported + */ + int process(HttpServletRequest request, PostSearchBean postSearch); + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostSearchServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostSearchServiceImpl.java index f2877d4d..e799e313 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostSearchServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/PostSearchServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.Arrays; import java.util.HashMap; @@ -25,13 +43,13 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.FusionObject.Parameters; -import org.openecomp.portalsdk.core.command.PostSearchBean; -import org.openecomp.portalsdk.core.domain.Lookup; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.FusionObject.Parameters; +import org.onap.portalsdk.core.command.PostSearchBean; +import org.onap.portalsdk.core.domain.Lookup; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,7 +58,7 @@ import org.springframework.transaction.annotation.Transactional; @Transactional public class PostSearchServiceImpl implements PostSearchService { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostSearchServiceImpl.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostSearchServiceImpl.class); @Autowired private DataAccessService dataAccessService; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileService.java new file mode 100644 index 00000000..2ee612a6 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileService.java @@ -0,0 +1,78 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.List; + +import org.onap.portalsdk.core.domain.Profile; +import org.onap.portalsdk.core.domain.User; + + +public interface ProfileService { + + /** + * + * @return returns list of profiles + * @throws Exception + */ + List<Profile> findAll() throws Exception; + + /** + * + * @param id + * @return returns profile of requested ID + * @throws Exception + */ + Profile getProfile(int id) throws Exception; + + + /** + * + * @param id loginId + * @return returns User info of requested ID + * @throws Exception + */ + User getUser(String id) throws Exception; + + /** + * + * @param user + *saveUser method saves the user object + */ + void saveUser(User user); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileServiceCentralizedImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileServiceCentralizedImpl.java new file mode 100644 index 00000000..91661e61 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileServiceCentralizedImpl.java @@ -0,0 +1,105 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.List; + +import org.onap.portalsdk.core.domain.Profile; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; + +import com.fasterxml.jackson.databind.ObjectMapper; + +@Transactional +public class ProfileServiceCentralizedImpl implements ProfileService{ + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ProfileServiceCentralizedImpl.class); + + @Autowired + AppService appService; + + @Autowired + private DataAccessService dataAccessService; + + public DataAccessService getDataAccessService() { + return dataAccessService; + } + + public void setDataAccessService(DataAccessService dataAccessService) { + this.dataAccessService = dataAccessService; + } + + @Autowired + RestApiRequestBuilder restApiRequestBuilder ; + + @SuppressWarnings("unchecked") + @Override + public List<Profile> findAll() throws Exception{ + return getDataAccessService().getList(Profile.class, null); + } + + @Override + public Profile getProfile(int id) throws Exception{ + ObjectMapper mapper = new ObjectMapper(); + Profile user = null; + String responseString = restApiRequestBuilder.getViaREST("/getProfile/" + id, true,Integer.toString(id)); + user = mapper.readValue(responseString, Profile.class); + return user; + } + + @Override + public User getUser(String id) throws Exception{ + ObjectMapper mapper = new ObjectMapper(); + User user = new User(); + String responseString =restApiRequestBuilder.getViaREST("/user/" + id, true,id); + user = mapper.readValue(responseString, User.class); + + return user; + } + + @Override + public void saveUser(User user) { + try { + getDataAccessService().saveDomainObject(user, null); + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "saveUser failed", e); + } + } +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ProfileServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileServiceImpl.java index e0785567..ac7c2d01 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ProfileServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileServiceImpl.java @@ -1,29 +1,47 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.List; -import org.openecomp.portalsdk.core.dao.ProfileDao; -import org.openecomp.portalsdk.core.domain.Profile; -import org.openecomp.portalsdk.core.domain.User; +import org.onap.portalsdk.core.dao.ProfileDao; +import org.onap.portalsdk.core.domain.Profile; +import org.onap.portalsdk.core.domain.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; @@ -34,7 +52,7 @@ public class ProfileServiceImpl implements ProfileService{ private ProfileDao profileDao; @Autowired - private DataAccessService dataAccessService; + private DataAccessService dataAccessService; @SuppressWarnings("unchecked") public List<Profile> findAll() { 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 new file mode 100644 index 00000000..5870dc29 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RestApiRequestBuilder.java @@ -0,0 +1,170 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID; + +import java.io.IOException; + +import org.onap.portalsdk.core.domain.App; +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.util.SystemProperties; +import org.slf4j.MDC; +import org.springframework.beans.factory.annotation.Autowired; + +public class RestApiRequestBuilder { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RestApiRequestBuilder.class); + + @Autowired + private AppService appService; + + private static final String content_type = "application/json"; + + /** + * + * @param restEndPoint + * @param isBasicAuth + * @param userId + * @return + * @throws IOException + */ + public String getViaREST(String restEndPoint, boolean isBasicAuth, String userId) throws IOException { + logger.info(EELFLoggerDelegate.debugLogger, "getViaRest: endpoint {}", restEndPoint); + String appName = ""; + String appUserName = ""; + String decryptedPwd = ""; + App app = appService.getDefaultApp(); + if (app != null) { + appName = app.getName(); + appUserName = app.getUsername(); + try { + decryptedPwd = CipherUtil.decrypt(app.getAppPassword(), + SystemProperties.getProperty(SystemProperties.Decryption_Key)); + } catch (CipherUtilException e) { + logger.error(EELFLoggerDelegate.errorLogger, "getViaREST failed", e); + throw new IOException(e.toString()); + } + } else { + logger.warn(EELFLoggerDelegate.errorLogger, + "getViaREST: Unable to locate the app information from the database."); + appName = SystemProperties.SDK_NAME; + } + String requestId = MDC.get(MDC_KEY_REQUEST_ID); + String response = RestWebServiceClient.getInstance().getPortalContent(restEndPoint, userId, appName, requestId, + appUserName, decryptedPwd, isBasicAuth); + logger.debug(EELFLoggerDelegate.errorLogger, "getViaREST response: {}", response); + return response; + } + + /** + * + * @param restEndPoint + * @param isBasicAuth + * @param content + * @param userId + * @throws IOException + */ + public void postViaREST(String restEndPoint, boolean isBasicAuth, String content, String userId) + throws IOException { + logger.info(EELFLoggerDelegate.debugLogger, "postViaRest: endpoint {}", restEndPoint); + String appName = ""; + String appUserName = ""; + String decryptedPwd = ""; + App app = appService.getDefaultApp(); + if (app != null) { + appName = app.getName(); + appUserName = app.getUsername(); + try { + decryptedPwd = CipherUtil.decrypt(app.getAppPassword(), + SystemProperties.getProperty(SystemProperties.Decryption_Key)); + } catch (CipherUtilException e) { + logger.error(EELFLoggerDelegate.errorLogger, "postViaREST failed", e); + throw new IOException(e.toString()); + } + } else { + logger.warn(EELFLoggerDelegate.errorLogger, + "postViaRest: Unable to locate the app information from the database."); + appName = SystemProperties.SDK_NAME; + } + String requestId = MDC.get(MDC_KEY_REQUEST_ID); + String response = RestWebServiceClient.getInstance().postPortalContent(restEndPoint, userId, appName, requestId, + appUserName, decryptedPwd, content_type, content, isBasicAuth); + logger.debug(EELFLoggerDelegate.debugLogger, "postViaRest response: {}", response); + } + + /** + * + * @param restEndPoint + * @param isBasicAuth + * @param content + * @param userId + * @throws IOException + */ + public void deleteViaRest(String restEndPoint, boolean isBasicAuth, String content, String userId) + throws IOException { + logger.info(EELFLoggerDelegate.debugLogger, "deleteViaRest: endpoint {}", restEndPoint); + String appName = ""; + String appUserName = ""; + String decryptedPwd = ""; + App app = appService.getDefaultApp(); + if (app != null) { + appName = app.getName(); + appUserName = app.getUsername(); + try { + decryptedPwd = CipherUtil.decrypt(app.getAppPassword(), + SystemProperties.getProperty(SystemProperties.Decryption_Key)); + } catch (CipherUtilException e) { + logger.error(EELFLoggerDelegate.errorLogger, "postViaREST failed", e); + throw new IOException(e.toString()); + } + } else { + logger.warn(EELFLoggerDelegate.errorLogger, + "deleteViaRest: Unable to locate the app information from the database."); + appName = SystemProperties.SDK_NAME; + } + String requestId = MDC.get(MDC_KEY_REQUEST_ID); + String response = RestWebServiceClient.getInstance().deletePortalContent(restEndPoint, userId, appName, + requestId, appUserName, decryptedPwd, content_type, content, isBasicAuth); + logger.debug(EELFLoggerDelegate.debugLogger, "deleteViaRest response: {}", response); + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleService.java index a64d480b..12c9d59e 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleService.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleService.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.List; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.RoleFunction; public interface RoleService { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleServiceCentralizedAccess.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceCentralizedAccess.java index 53f257bd..13da750c 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleServiceCentralizedAccess.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceCentralizedAccess.java @@ -1,4 +1,41 @@ -package org.openecomp.portalsdk.core.service; +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; import java.util.HashSet; import java.util.Iterator; @@ -6,9 +43,9 @@ import java.util.List; import java.util.Set; import java.util.TreeSet; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; @@ -18,13 +55,10 @@ import com.fasterxml.jackson.databind.type.TypeFactory; @Transactional public class RoleServiceCentralizedAccess implements RoleService { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleServiceCentralizedAccess.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleServiceCentralizedAccess.class); @Autowired - AppService appService; - - @Autowired - RestApiRequestBuilder restApiRequestBuilder; + private RestApiRequestBuilder restApiRequestBuilder; @Override public List<RoleFunction> getRoleFunctions(String loginId) throws Exception { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceImpl.java index eab20f56..abf785a0 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.sql.Connection; import java.sql.SQLException; @@ -29,16 +47,16 @@ import java.util.TreeSet; import javax.sql.DataSource; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; @Transactional public class RoleServiceImpl implements RoleService { - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleServiceImpl.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleServiceImpl.class); @Autowired private DataAccessService dataAccessService; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessImpl.java new file mode 100644 index 00000000..2a9718a6 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessImpl.java @@ -0,0 +1,81 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.domain.UrlsAccessible; +import org.onap.portalsdk.core.web.support.UserUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Transactional +@Service("urlAccessService") +public class UrlAccessImpl implements UrlAccessService { + + @Autowired + private DataAccessService dataAccessService; + + @Override + public boolean isUrlAccessible(HttpServletRequest request, String currentUrl) { + boolean isAccessible = false; + Map<String, String> params = new HashMap<>(); + params.put("current_url", currentUrl); + List list = dataAccessService.executeNamedQuery("restrictedUrls", params, null); + + // loop through the list of restricted URL's + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + UrlsAccessible urlFunctions = (UrlsAccessible) list.get(i); + // String url = (String) urlFunctions.getUrl(); + String functionCd = (String) urlFunctions.getFunctionCd(); + if (UserUtils.isAccessible(request, functionCd)) { + isAccessible = true; + } + } + return isAccessible; + } + return true; + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessService.java new file mode 100644 index 00000000..7b915854 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessService.java @@ -0,0 +1,52 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import javax.servlet.http.HttpServletRequest; + +public interface UrlAccessService { + + /** + * Answers whether the specified URL is accessible. + * + * @param request + * @param currentUrl + * @return true if yes, false if no. + */ + public boolean isUrlAccessible(HttpServletRequest request, String currentUrl); +} 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 new file mode 100644 index 00000000..a7537959 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileService.java @@ -0,0 +1,51 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.util.List; + +import org.onap.portalsdk.core.domain.User; + + +public interface UserProfileService { + List<User> findAll(); + User getUserByLoginId(String loginId); + void saveUser(User user); + public List<User> findAllUserWithOnOffline(String originOrgUserId); + List<User> findAllActive(); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserProfileServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java index 93b87594..5a123393 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserProfileServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.ArrayList; import java.util.HashSet; @@ -27,9 +45,9 @@ import java.util.SortedSet; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Restrictions; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.domain.support.CollaborateList; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.support.CollaborateList; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserService.java new file mode 100644 index 00000000..8a667462 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserService.java @@ -0,0 +1,67 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.io.IOException; + +import org.onap.portalsdk.core.domain.User; + +import com.fasterxml.jackson.core.JsonProcessingException; + +public interface UserService { + + /** + * Gets the user object for the specified ID. + * + * @param id + * orgUserID + * @return User object + * @throws IOException + */ + User getUser(String id) throws IOException; + + /** + * Builds a User object from a JSON string. + * + * @param response + * @return User object + * @throws IOException + * @throws JsonProcessingException + */ + User userMapper(String response) throws IOException, JsonProcessingException; +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserServiceCentalizedImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserServiceCentalizedImpl.java new file mode 100644 index 00000000..17735bd6 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserServiceCentalizedImpl.java @@ -0,0 +1,127 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import java.io.IOException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.UserApp; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +@Transactional +public class UserServiceCentalizedImpl implements UserService { + + @Autowired + private RestApiRequestBuilder restApiRequestBuilder; + + @Autowired + private DataAccessService dataAccessService; + + public DataAccessService getDataAccessService() { + return dataAccessService; + } + + public void setDataAccessService(DataAccessService dataAccessService) { + this.dataAccessService = dataAccessService; + } + + @Override + public User getUser(String id) throws IOException { + String orgUserId = getUserByProfileId(id); + String responseString = restApiRequestBuilder.getViaREST("/user/" + orgUserId, true, id); + User user = userMapper(responseString); + return user; + } + + public String getUserByProfileId(String id) { + Map<String, Long> params = new HashMap<>(); + params.put("user_id", new Long(id)); + @SuppressWarnings("rawtypes") + List list = getDataAccessService().executeNamedQuery("getUserByProfileId", params, null); + String orgUserId = ""; + if (list != null && !list.isEmpty()) + orgUserId = (String) list.get(0); + return orgUserId; + } + + @Override + public User userMapper(String res) throws IOException, JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + User user = mapper.readValue(res, User.class); + Set<RoleFunction> roleFunctionListNew = new HashSet<>(); + SortedSet<UserApp> userAppSet = new TreeSet<>(); + @SuppressWarnings("unchecked") + Set<UserApp> setAppsObj = user.getUserApps(); + Iterator<UserApp> it = setAppsObj.iterator(); + while (it.hasNext()) { + Object next = it.next(); + UserApp nextApp = mapper.convertValue(next, UserApp.class); + Role role = nextApp.getRole(); + @SuppressWarnings("unchecked") + Set<RoleFunction> roleFunctionList = role.getRoleFunctions(); + Iterator<RoleFunction> itetaror = roleFunctionList.iterator(); + while (itetaror.hasNext()) { + Object nextValue = itetaror.next(); + RoleFunction roleFunction = mapper.convertValue(nextValue, RoleFunction.class); + roleFunctionListNew.add(roleFunction); + } + role.setRoleFunctions(roleFunctionListNew); + nextApp.setRole(role); + nextApp.getRole().getRoleFunctions(); + + userAppSet.add(nextApp); + user.setUserApps(userAppSet); + } + return user; + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserServiceImpl.java new file mode 100644 index 00000000..d41499a0 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserServiceImpl.java @@ -0,0 +1,60 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + +import org.onap.portalsdk.core.domain.User; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; + +@Transactional +public class UserServiceImpl implements UserService { + + @Autowired + private DataAccessService dataAccessService; + + @Override + public User getUser(String id) { + return (User) dataAccessService.getDomainObject(User.class, Long.parseLong(id), null); + } + + @Override + public User userMapper(String response) { + throw new UnsupportedOperationException("method cannot be used"); + } + +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallService.java new file mode 100644 index 00000000..6db9cb86 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallService.java @@ -0,0 +1,44 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service; + + +public interface WebServiceCallService { + public boolean verifyRESTCredential(String secretKey, String requestAppName, String requestPassword)throws Exception; + /*public String get(String restURL, String restPath);*/ +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/WebServiceCallServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallServiceImpl.java index 557af2dd..f1a0cb28 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/WebServiceCallServiceImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/WebServiceCallServiceImpl.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service; +package org.onap.portalsdk.core.service; import java.util.List; -import org.openecomp.portalsdk.core.domain.App; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.domain.App; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -33,13 +51,13 @@ import org.springframework.transaction.annotation.Transactional; @Transactional public class WebServiceCallServiceImpl implements WebServiceCallService{ + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WebServiceCallServiceImpl.class); + @Autowired private DataAccessService dataAccessService; @Autowired - AppService appService; - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WebServiceCallServiceImpl.class); + private AppService appService; /** * Verify REST Credential diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/FusionService.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/FusionService.java new file mode 100644 index 00000000..601afc66 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/FusionService.java @@ -0,0 +1,45 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service.support; + + +import org.onap.portalsdk.core.FusionObject; + +public class FusionService implements FusionObject { + /** Logger for this class and subclasses */ +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocator.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocator.java new file mode 100644 index 00000000..bcd55878 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocator.java @@ -0,0 +1,45 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.service.support; + +import javax.naming.directory.DirContext; + + +public interface ServiceLocator { + DirContext getDirContext(String initialContextFactory, String providerUrl, String securityPrincipal); +} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/support/ServiceLocatorImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocatorImpl.java index 97f4875d..b72d5d51 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/support/ServiceLocatorImpl.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/support/ServiceLocatorImpl.java @@ -1,31 +1,51 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.service.support; +package org.onap.portalsdk.core.service.support; -import java.util.*; +import java.util.Properties; -import javax.naming.*; -import javax.naming.directory.*; -import javax.naming.ldap.*; +import javax.naming.Context; +import javax.naming.NamingException; +import javax.naming.directory.DirContext; +import javax.naming.directory.InitialDirContext; +import javax.naming.ldap.InitialLdapContext; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.stereotype.Service; /** @@ -35,7 +55,7 @@ import org.springframework.stereotype.Service; @Service("serviceLocator") public class ServiceLocatorImpl implements ServiceLocator { - //private static ServiceLocator locator; // The singleton instance + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ServiceLocatorImpl.class); private Context context; // JNDI context (not currently in use) private Context rootContext; // Java env root context (not currently in use) @@ -99,7 +119,4 @@ public class ServiceLocatorImpl implements ServiceLocator { }*/ - /** Logger for this class and subclasses */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ServiceLocatorImpl.class); - } diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/CacheManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/CacheManager.java index e26ac884..774943d4 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/CacheManager.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/CacheManager.java @@ -1,25 +1,43 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.util; +package org.onap.portalsdk.core.util; -import org.openecomp.portalsdk.core.objectcache.jcs.JCSCacheManager; +import org.onap.portalsdk.core.objectcache.jcs.JCSCacheManager; import org.springframework.context.annotation.Configuration; @Configuration public class CacheManager extends JCSCacheManager { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/EncDecUtilTest.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/EncDecUtilTest.java index 23d90cc9..3a13e362 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/EncDecUtilTest.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/EncDecUtilTest.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.util; +package org.onap.portalsdk.core.util; import java.security.AlgorithmParameters; import java.security.SecureRandom; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/JSONUtil.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/JSONUtil.java index 6b849e81..8bbd791a 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/JSONUtil.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/JSONUtil.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.util; +package org.onap.portalsdk.core.util; import java.util.HashMap; import java.util.Map; -import org.openecomp.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.User; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/SystemProperties.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/SystemProperties.java index 20dfec90..31d2f04d 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/SystemProperties.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/SystemProperties.java @@ -1,27 +1,45 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.util; +package org.onap.portalsdk.core.util; import javax.servlet.ServletContext; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; @@ -45,7 +63,7 @@ import org.springframework.core.env.Environment; "${container.classpath:}/WEB-INF/conf/sql.properties" }) public class SystemProperties { - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SystemProperties.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SystemProperties.class); private static Environment environment; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/UsageUtils.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/UsageUtils.java index a8cc7fd7..faf410fc 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/UsageUtils.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/UsageUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.util; +package org.onap.portalsdk.core.util; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -27,8 +45,8 @@ import java.util.Iterator; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.core.command.UserRowBean; -import org.openecomp.portalsdk.core.domain.User; +import org.onap.portalsdk.core.command.UserRowBean; +import org.onap.portalsdk.core.domain.User; public class UsageUtils { @SuppressWarnings("rawtypes") diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/YamlUtils.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/YamlUtils.java index da69b729..38206d55 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/util/YamlUtils.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/util/YamlUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.util; +package org.onap.portalsdk.core.util; import java.io.File; import java.io.FileNotFoundException; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/socket/PeerBroadcastSocket.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/socket/PeerBroadcastSocket.java index ddf08c8f..e00e05b7 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/socket/PeerBroadcastSocket.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/socket/PeerBroadcastSocket.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.web.socket; +package org.onap.portalsdk.core.web.socket; import java.io.IOException; import java.util.Hashtable; @@ -29,14 +47,14 @@ import javax.websocket.OnOpen; import javax.websocket.Session; import javax.websocket.server.ServerEndpoint; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import com.fasterxml.jackson.databind.ObjectMapper; @ServerEndpoint("/contact") public class PeerBroadcastSocket { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PeerBroadcastSocket.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PeerBroadcastSocket.class); public static Map<String, Object> channelMap = new Hashtable<String, Object>(); public Map<String, String> sessionMap = new Hashtable<String, String>(); diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/socket/WebRTCSocket.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/socket/WebRTCSocket.java index 810cba5c..76cb3b8f 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/socket/WebRTCSocket.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/socket/WebRTCSocket.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.web.socket; +package org.onap.portalsdk.core.web.socket; import java.util.Hashtable; import java.util.Map; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/AppUtils.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/AppUtils.java index 295cff42..f6655399 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/AppUtils.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/AppUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.web.support; +package org.onap.portalsdk.core.web.support; import java.io.File; import java.net.InetAddress; @@ -38,10 +56,10 @@ import javax.servlet.http.HttpSession; import javax.sql.DataSource; import org.hibernate.Session; -import org.openecomp.portalsdk.core.exception.SessionExpiredException; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.exception.SessionExpiredException; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.FileSystemResource; @@ -166,12 +184,12 @@ public class AppUtils { return ""; } - List<org.openecomp.portalsdk.core.domain.Lookup> lstResult = getLookupListNoCache(dbTable, dbValueCol, dbLabelCol, dbLabelCol + "='" + label.replaceAll("'", "''") + "'", ""); + List<org.onap.portalsdk.core.domain.Lookup> lstResult = getLookupListNoCache(dbTable, dbValueCol, dbLabelCol, dbLabelCol + "='" + label.replaceAll("'", "''") + "'", ""); if (lstResult == null) { return ""; } if (lstResult.size() > 0) { - return ((org.openecomp.portalsdk.core.domain.Lookup)lstResult.toArray()[0]).getValue(); + return ((org.onap.portalsdk.core.domain.Lookup)lstResult.toArray()[0]).getValue(); } else { return ""; } @@ -190,7 +208,7 @@ public class AppUtils { i = lookupList.iterator(); while (i.hasNext()) { - org.openecomp.portalsdk.core.domain.Lookup lookup = (org.openecomp.portalsdk.core.domain.Lookup)i.next(); + org.onap.portalsdk.core.domain.Lookup lookup = (org.onap.portalsdk.core.domain.Lookup)i.next(); if (lookup.getLabel().equals(label)) { return lookup.getValue(); diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/ControllerProperties.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/ControllerProperties.java index 1d09eba0..c1c2f24a 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/ControllerProperties.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/ControllerProperties.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.web.support; +package org.onap.portalsdk.core.web.support; public interface ControllerProperties { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/FeedbackMessage.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/FeedbackMessage.java index d8993b03..e2dadb50 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/FeedbackMessage.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/FeedbackMessage.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.web.support; +package org.onap.portalsdk.core.web.support; public class FeedbackMessage { diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/JsonMessage.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/JsonMessage.java index 5566bf90..9b7a65ca 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/JsonMessage.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/JsonMessage.java @@ -1,28 +1,46 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.web.support; +package org.onap.portalsdk.core.web.support; import java.io.PrintWriter; import java.io.StringWriter; -import org.openecomp.portalsdk.core.onboarding.crossapi.PortalAPIResponse; +import org.onap.portalsdk.core.onboarding.crossapi.PortalAPIResponse; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/MessagesList.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/MessagesList.java index 0cf628aa..a3ab7896 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/MessagesList.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/MessagesList.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.web.support; +package org.onap.portalsdk.core.web.support; import java.util.*; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/UserUtils.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/UserUtils.java index a7850e34..98e437d9 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/web/support/UserUtils.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/web/support/UserUtils.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.web.support; +package org.onap.portalsdk.core.web.support; import java.io.PrintWriter; import java.io.StringWriter; @@ -34,23 +52,23 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.exception.SessionExpiredException; -import org.openecomp.portalsdk.core.lm.FusionLicenseManager; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.menu.MenuBuilder; -import org.openecomp.portalsdk.core.restful.domain.EcompRole; -import org.openecomp.portalsdk.core.restful.domain.EcompUser; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.RoleFunction; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.exception.SessionExpiredException; +import org.onap.portalsdk.core.lm.FusionLicenseManager; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.menu.MenuBuilder; +import org.onap.portalsdk.core.restful.domain.EcompRole; +import org.onap.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; @SuppressWarnings("rawtypes") public class UserUtils { - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserUtils.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserUtils.class); public static final String KEY_USER_ROLES_CACHE = "userRoles"; diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/PostDroolsBean.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/PostDroolsBean.java deleted file mode 100644 index 541d9f71..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/command/PostDroolsBean.java +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.command; - -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -@JsonSerialize -public class PostDroolsBean { - - private String droolsFile; - private String className; - private String selectedRules; - - public String getDroolsFile() { - return droolsFile; - } - public void setDroolsFile(String droolsFile) { - this.droolsFile = droolsFile; - } - public String getSelectedRules() { - return selectedRules; - } - public void setSelectedRules(String selectedRules) { - this.selectedRules = selectedRules; - } - public String getClassName() { - return className; - } - public void setClassName(String className) { - this.className = className; - } - - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/Configurable.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/Configurable.java deleted file mode 100644 index 9585e45d..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/Configurable.java +++ /dev/null @@ -1,38 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.conf; - -import java.util.List; - -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.springframework.web.servlet.ViewResolver; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; - -public interface Configurable { - - public ViewResolver viewResolver(); - - public void addResourceHandlers(ResourceHandlerRegistry registry) ; - - public DataAccessService dataAccessService(); - - public List<String> addTileDefinitions(); - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/HibernateMappingLocatable.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/HibernateMappingLocatable.java deleted file mode 100644 index 94aed111..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/conf/HibernateMappingLocatable.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.conf; - -import org.springframework.core.io.Resource; - -/** - * Defines methods used by developers to supply Hibernate configuration. - */ -public interface HibernateMappingLocatable { - - /** - * Gets Hibernate mapping locations. - * - * @return Array of Resource objects (usually ClassPathResource that's a - * file) which contain Hibernate mapping information. - */ - public Resource [] getMappingLocations(); - - /** - * Gets package names. - * - * @return Array of Java package names to scan for classes with Hibernate annotations. - */ - public String [] getPackagesToScan(); -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/RestrictedBaseController.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/RestrictedBaseController.java deleted file mode 100644 index 2b2e3426..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/RestrictedBaseController.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.controller; - -public class RestrictedBaseController extends FusionBaseController{ - - protected String viewName; - private String exceptionView; - @Override - public boolean isAccessible() { - return false; - } - @Override - public boolean isRESTfulCall(){ - return false; - } - protected String getViewName() { - return viewName; - } - protected void setViewName(String viewName) { - this.viewName = viewName; - } - - public String getExceptionView() { - return (exceptionView == null) ? "runtime_error_handler" : exceptionView; - } - - public void setExceptionView(String exceptionView) { - this.exceptionView = exceptionView; - } - - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/RestrictedRESTfulBaseController.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/RestrictedRESTfulBaseController.java deleted file mode 100644 index d11c7d76..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/RestrictedRESTfulBaseController.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.controller; - -public class RestrictedRESTfulBaseController extends FusionBaseController{ - - protected String viewName; - private String exceptionView; - @Override - public boolean isAccessible() { - return false; - } - @Override - public boolean isRESTfulCall(){ - return true; - } - protected String getViewName() { - return viewName; - } - protected void setViewName(String viewName) { - this.viewName = viewName; - } - - public String getExceptionView() { - return (exceptionView == null) ? "runtime_error_handler" : exceptionView; - } - - public void setExceptionView(String exceptionView) { - this.exceptionView = exceptionView; - } - - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/UnRestrictedBaseController.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/UnRestrictedBaseController.java deleted file mode 100644 index 78bf4c51..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/controller/UnRestrictedBaseController.java +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.controller; - -public class UnRestrictedBaseController extends FusionBaseController{ - protected String viewName; - - @Override - public boolean isAccessible() { - return true; - } - @Override - public boolean isRESTfulCall(){ - return false; - } - protected String getViewName() { - return viewName; - } - - protected void setViewName(String viewName) { - this.viewName = viewName; - } -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/ProfileDao.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/ProfileDao.java deleted file mode 100644 index 0094072c..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/ProfileDao.java +++ /dev/null @@ -1,29 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.dao; - -import java.util.List; - -import org.openecomp.portalsdk.core.domain.Profile; - -public interface ProfileDao { - List<Profile> findAll(); - Profile getProfile(int id); -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/ProfileDaoImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/ProfileDaoImpl.java deleted file mode 100644 index 4dd2711e..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/ProfileDaoImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.dao; - -import java.util.List; - -import org.hibernate.Criteria; -import org.hibernate.criterion.Restrictions; -import org.openecomp.portalsdk.core.dao.AbstractDao; -import org.openecomp.portalsdk.core.domain.Profile; -import org.springframework.stereotype.Repository; - -@Repository("profileDao") -public class ProfileDaoImpl extends AbstractDao<Integer, Profile> implements ProfileDao{ - - - public List<Profile> findAll() { - Criteria crit = getSession().createCriteria(Profile.class); - @SuppressWarnings("unchecked") - List<Profile> p = crit.list(); - - return p; - } - - - public Profile getProfile(int id) { - Criteria crit = getSession().createCriteria(Profile.class); - crit.add(Restrictions.eq("id", id)); - Profile profile = (Profile) crit.uniqueResult(); - - return profile; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/support/FusionDao.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/support/FusionDao.java deleted file mode 100644 index 086a8da0..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/dao/support/FusionDao.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.dao.support; - -import org.hibernate.SessionFactory; - -import org.openecomp.portalsdk.core.FusionObject; - -public class FusionDao implements FusionObject { - private SessionFactory sessionFactory; - - public void setSessionFactory(SessionFactory sessionFactory) { - this.sessionFactory = sessionFactory; - } - - public SessionFactory getSessionFactory() { - return this.sessionFactory; - } -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/FusionVo.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/FusionVo.java deleted file mode 100644 index dc1b8d4c..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/FusionVo.java +++ /dev/null @@ -1,27 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain; - -import org.openecomp.portalsdk.core.FusionObject; - -public class FusionVo implements FusionObject { - public FusionVo() { - } -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Lookup.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Lookup.java deleted file mode 100644 index aa7d036c..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/Lookup.java +++ /dev/null @@ -1,85 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain; - -import java.io.Serializable; - -import org.openecomp.portalsdk.core.domain.support.NameValueId; - -public class Lookup extends FusionVo implements Serializable { - - /** - * - */ - private static final long serialVersionUID = 1L; - private NameValueId nameValueId = new NameValueId(); - - public Lookup() {} - - public Lookup(String label, String value) { - this(); - setLabel(label); - setValue(value); - } - - public String getValue() { - return getNameValueId().getVal(); - } - - public String getLabel() { - return getNameValueId().getLab(); - } - - public void setValue(String value) { - getNameValueId().setVal(value); - } - - public void setLabel(String label) { - getNameValueId().setLab(label); - } - - public NameValueId getNameValueId() { - return nameValueId; - } - - public void setNameValueId(NameValueId nameValueId) { - this.nameValueId = nameValueId; - } - - // required by ZK for to set the selectedItems of Listboxes (used heavily for <select>-style drop-downs) - public int hashCode() { - int hash = getValue().hashCode(); - hash = hash + getLabel().hashCode(); - - return hash; - } - - public boolean equals( Object obj ) { - boolean equivalent = false; - - Lookup lookup = (Lookup)obj; - if( lookup.getValue().equals(getValue()) && lookup.getLabel().equals(getLabel())) { - equivalent = true; - } - - return equivalent; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LuState.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LuState.java deleted file mode 100644 index 09d25b28..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/LuState.java +++ /dev/null @@ -1,70 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain; - - -import org.openecomp.portalsdk.core.domain.support.*; - - -/** - * <p>State.java</p> - * - * <p>Represents a state data object.</p> - * - * @version 1.0 - */ -public class LuState extends DomainVo { - - /** - * - */ - private static final long serialVersionUID = 1L; - - LuState() {} - - public String getState() { - return state; - } - - public String getAbbr() { - return abbr; - } - - public void setState(String state) { - this.state = state; - } - - public void setAbbr(String abbr) { - this.abbr = abbr; - } - - - public int compareTo(Object obj){ - String c1 = getState(); - String c2 = ((LuState)obj).getState(); - - return c1.compareTo(c2); - } - - - private String abbr; - private String state; - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UrlsAccessible.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UrlsAccessible.java deleted file mode 100644 index e0f35db0..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/UrlsAccessible.java +++ /dev/null @@ -1,83 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain; - -import java.io.Serializable; - -public class UrlsAccessible extends FusionVo implements Serializable { - - /** - * - */ - private static final long serialVersionUID = 1L; - private UrlsAccessibleKey urlsAccessibleKey = new UrlsAccessibleKey(); - - public UrlsAccessible() {} - - public UrlsAccessible(String url, String functionCd) { - this(); - setUrl(url); - setFunctionCd(functionCd); - } - - public String getUrl() { - return getUrlsAccessibleKey().getUrl(); - } - - public String getFunctionCd() { - return getUrlsAccessibleKey().getFunctionCd(); - } - - public void setUrl(String url) { - getUrlsAccessibleKey().setUrl(url); - } - - public void setFunctionCd(String functionCd) { - getUrlsAccessibleKey().setFunctionCd(functionCd); - } - - public UrlsAccessibleKey getUrlsAccessibleKey() { - return urlsAccessibleKey; - } - - public void setUrlsAccessibleKey(UrlsAccessibleKey urlsAccessibleKey) { - this.urlsAccessibleKey = urlsAccessibleKey; - } - - // required by ZK for to set the selectedItems of Listboxes (used heavily for <select>-style drop-downs) - public int hashCode() { - int hash = getUrl().hashCode(); - hash = hash + getFunctionCd().hashCode(); - - return hash; - } - - public boolean equals( Object obj ) { - boolean equivalent = false; - - UrlsAccessible lookup = (UrlsAccessible)obj; - if( lookup.getUrl().equals(getUrl()) && lookup.getFunctionCd().equals(getFunctionCd())) { - equivalent = true; - } - - return equivalent; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/sessionmgt/TimeoutVO.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/sessionmgt/TimeoutVO.java deleted file mode 100644 index 0f6c3876..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/sessionmgt/TimeoutVO.java +++ /dev/null @@ -1,63 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain.sessionmgt; - -public class TimeoutVO implements Comparable<TimeoutVO>{ - - private String jSessionId; - private Long sessionTimOutMilliSec; - - public TimeoutVO(){ - - } - - public TimeoutVO(String _jSessionId, Long _sessionTimOutMilliSec) { - setjSessionId(_jSessionId); - setSessionTimOutMilliSec(_sessionTimOutMilliSec); - - } - - public String getjSessionId() { - return jSessionId; - } - - public void setjSessionId(String jSessionId) { - this.jSessionId = jSessionId; - } - - public Long getSessionTimOutMilliSec() { - return sessionTimOutMilliSec; - } - - public void setSessionTimOutMilliSec(Long sessionTimOutMilliSec) { - this.sessionTimOutMilliSec = sessionTimOutMilliSec; - } - - @Override - public int compareTo(TimeoutVO o) { - return sessionTimOutMilliSec.compareTo(o.sessionTimOutMilliSec); - } - - - - - - -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Attribute.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Attribute.java deleted file mode 100644 index a78d7bfa..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Attribute.java +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain.support; - -public class Attribute { - public double width; - public double top; - public double left; - public String name; - public double height; - - public double getWidth() { - return width; - } - public void setWidth(double width) { - this.width = width; - } - public double getTop() { - return top; - } - public void setTop(double top) { - this.top = top; - } - public double getLeft() { - return left; - } - public void setLeft(double left) { - this.left = left; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public double getHeight() { - return height; - } - public void setHeight(double height) { - this.height = height; - } - - - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/FusionCommand.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/FusionCommand.java deleted file mode 100644 index 6ac85b6f..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/FusionCommand.java +++ /dev/null @@ -1,39 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain.support; - -import org.openecomp.portalsdk.core.FusionObject; - -public class FusionCommand implements FusionObject { - - private String task; - - public FusionCommand() { - } - - public String getTask() { - return task; - } - - public void setTask(String task) { - this.task = task; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Position.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Position.java deleted file mode 100644 index db137c80..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Position.java +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain.support; - -public class Position { - double x; - double y; - - public double getX() { - return x; - } - public void setX(double x) { - this.x = x; - } - public double getY() { - return y; - } - public void setY(double y) { - this.y = y; - } - - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Size.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Size.java deleted file mode 100644 index 4ebfb962..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/domain/support/Size.java +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.domain.support; - -public class Size { - private double width; - private double height; - - public double getWidth() { - return width; - } - public void setWidth(double width) { - this.width = width; - } - public double getHeight() { - return height; - } - public void setHeight(double height) { - this.height = height; - } - - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/drools/DroolsRuleService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/drools/DroolsRuleService.java deleted file mode 100644 index c556aa13..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/drools/DroolsRuleService.java +++ /dev/null @@ -1,27 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.drools; - -public interface DroolsRuleService { - - public void init(String... params); - public String getResultsString(); - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/drools/DroolsRuleServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/drools/DroolsRuleServiceImpl.java deleted file mode 100644 index 2aa0d1f2..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/drools/DroolsRuleServiceImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.drools; - - -/** - * - * This is POC test class to execute sample rules - */ -public class DroolsRuleServiceImpl implements DroolsRuleService{ - - - private String state; - private String resultsString; - - public DroolsRuleServiceImpl() { - - } - - public void init(String... params) { - this.state = params[0]; - } - - - - public String getState() { - return state; - } - - public String accessLabel() { - return "Drools POC Test"; - } - - public String getResultsString() { - return resultsString; - } - - public void setResultsString(String resultsString) { - this.resultsString = resultsString; - } -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/SessionExpiredException.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/SessionExpiredException.java deleted file mode 100644 index f4a19a9e..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/SessionExpiredException.java +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.exception; - -import org.openecomp.portalsdk.core.exception.support.FusionRuntimeException; - -public class SessionExpiredException extends FusionRuntimeException { - - /** - * - */ - private static final long serialVersionUID = 1L; - public static final String MESSAGE = "Your session has expired. Please login again."; - - public SessionExpiredException() { - super(MESSAGE); - } -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/UrlAccessRestrictedException.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/UrlAccessRestrictedException.java deleted file mode 100644 index adc56118..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/UrlAccessRestrictedException.java +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.exception; - -import org.openecomp.portalsdk.core.exception.support.FusionRuntimeException; - -public class UrlAccessRestrictedException extends FusionRuntimeException { - - /** - * - */ - private static final long serialVersionUID = 1L; - public static final String MESSAGE = "Authorization Denied"; - - public UrlAccessRestrictedException() { - super(MESSAGE); - } -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/support/FusionException.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/support/FusionException.java deleted file mode 100644 index 135fc3e3..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/support/FusionException.java +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.exception.support; - -import org.openecomp.portalsdk.core.FusionObject; - -public interface FusionException extends FusionObject {} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/support/FusionRuntimeException.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/support/FusionRuntimeException.java deleted file mode 100644 index 91a733d4..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/exception/support/FusionRuntimeException.java +++ /dev/null @@ -1,35 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.exception.support; - -public class FusionRuntimeException extends RuntimeException implements FusionException { - /** - * - */ - private static final long serialVersionUID = 1L; - public FusionRuntimeException() { - this(""); - } - - public FusionRuntimeException(String message) { - super(message); - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/interfaces/SecurityInterface.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/interfaces/SecurityInterface.java deleted file mode 100644 index b40c4713..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/interfaces/SecurityInterface.java +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.interfaces; - -public interface SecurityInterface { - public boolean isAccessible(); -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/listener/ApplicationContextListener.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/listener/ApplicationContextListener.java deleted file mode 100644 index 0cc99f0e..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/listener/ApplicationContextListener.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.listener; - -import javax.servlet.ServletContext; -import javax.servlet.annotation.WebListener; - -import org.openecomp.portalsdk.core.lm.FusionLicenseManager; -import org.openecomp.portalsdk.core.lm.FusionLicenseManagerUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationListener; -import org.springframework.context.event.ContextRefreshedEvent; -import org.springframework.stereotype.Component; - -@WebListener -@Component -public class ApplicationContextListener implements ApplicationListener<ContextRefreshedEvent> { - - @Autowired - ServletContext context; - @Autowired - FusionLicenseManager lm; - @Autowired - FusionLicenseManagerUtils fusionLicenseManagerUtils; - - - public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent ) { - int licenseStatus = fusionLicenseManagerUtils.verifyLicense(context); - context.setAttribute("licenseVerification", licenseStatus); - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/lm/LicenseableClass.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/lm/LicenseableClass.java deleted file mode 100644 index 296a1609..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/lm/LicenseableClass.java +++ /dev/null @@ -1,38 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.lm; - -import java.io.*; - -/** - * created by Alvin Alexander of http://devdaily.com. - * modified by Sundar Ramalingam - */ -public interface LicenseableClass -{ - public String getApplicationName(); - public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException; - public String getAlias(); - public String getPublicKeystorePassword(); - public String getKeyPasswd(); - public String getCipherParamPassword(); - public Class getClassToLicense(); - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/AuditLog.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/AuditLog.java deleted file mode 100644 index 6cb661b1..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/AuditLog.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.logging.aspect; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - - -@Target({ElementType.METHOD, ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -public @interface AuditLog { - String value() default ""; -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/MetricsLog.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/MetricsLog.java deleted file mode 100644 index f795ffb1..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/aspect/MetricsLog.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.logging.aspect; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - - -@Target({ElementType.METHOD, ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -public @interface MetricsLog { - String value() default ""; -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/AlarmSeverityEnum.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/AlarmSeverityEnum.java deleted file mode 100644 index 360d8d81..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/AlarmSeverityEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.logging.format; - -public enum AlarmSeverityEnum { - CRITICAL, - MAJOR, - MINOR, - INFORMATIONAL, - NONE, -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ErrorSeverityEnum.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ErrorSeverityEnum.java deleted file mode 100644 index 5908fda9..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ErrorSeverityEnum.java +++ /dev/null @@ -1,27 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.logging.format; - -public enum ErrorSeverityEnum { - INFO, - WARN, - ERROR, - FATAL, -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ErrorTypeEnum.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ErrorTypeEnum.java deleted file mode 100644 index 8ce2d4dc..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/logging/format/ErrorTypeEnum.java +++ /dev/null @@ -1,29 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.logging.format; - -public enum ErrorTypeEnum { - RECOVERY, - CONFIG_ERROR, - SYSTEM_ERROR, - DATA_ERROR, - CONNECTION_PROBLEM, - AUTHENTICATION_PROBLEM -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/AbstractCacheManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/AbstractCacheManager.java deleted file mode 100644 index 7c553ad5..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/AbstractCacheManager.java +++ /dev/null @@ -1,60 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.objectcache; - -import java.io.*; - -import org.openecomp.portalsdk.core.objectcache.support.*; - - -public abstract class AbstractCacheManager implements FusionCacheManager { - public AbstractCacheManager() { - super(); - // TODO Auto-generated constructor stub - } - - public Object getObject(String key) { - // TODO Auto-generated method stub - return null; - } - - public void putObject(String key, Object objectToCache) { - // TODO Auto-generated method stub - } - - public boolean isObjectInCache(String key) { - // TODO Auto-generated method stub - return false; - } - - public void removeObject(String key) { - // TODO Auto-generated method stub - } - - public void clearCache() { - // TODO Auto-generated method stub - } - - public void configure() throws IOException { - // TODO Auto-generated method stub - - } -} - diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/support/FusionCacheManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/support/FusionCacheManager.java deleted file mode 100644 index dee566e3..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/objectcache/support/FusionCacheManager.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.objectcache.support; - -import java.io.*; - -import org.openecomp.portalsdk.core.FusionObject; - -public interface FusionCacheManager extends FusionObject { - - Object getObject(String key); - void putObject(String key, Object objectToCache); - boolean isObjectInCache(String key); - - void removeObject(String key); - void clearCache(); - void configure() throws IOException; -} - diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/client/AppContextManager.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/client/AppContextManager.java deleted file mode 100644 index 1f54a8ec..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/client/AppContextManager.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.client; - -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; - -/** - * - * - * Use this class to get access to ApplicationContext for classes who were not created by Spring. - */ - - -@Component -public class AppContextManager implements ApplicationContextAware{ - private static ApplicationContext _appCtx; - - @Override - public void setApplicationContext(ApplicationContext ctx){ - _appCtx = ctx; - } - - public static ApplicationContext getAppContext(){ - return _appCtx; - } -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/session/TestClass.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/session/TestClass.java deleted file mode 100644 index 6bbf8c1d..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/session/TestClass.java +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.session; - -public class TestClass { - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/sso/TestClass.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/sso/TestClass.java deleted file mode 100644 index ccd903a9..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/sso/TestClass.java +++ /dev/null @@ -1,24 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.sso; - -public class TestClass { - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebMsgTypes.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebMsgTypes.java deleted file mode 100644 index 28ab327f..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/onboarding/ueb/UebMsgTypes.java +++ /dev/null @@ -1,28 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.ueb; - -/** - * Publishes constants used in the UEB package. - */ -public interface UebMsgTypes { - public static final String UEB_MSG_TYPE_GET_FUNC_MENU = "uebMsgTypeGetFuncMenu"; - public static final String UEB_MSG_TYPE_WIDGET_NOTIFICATION = "uebMsgTypeWidgetNotification"; -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/restful/client/HttpStatusAndResponse.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/restful/client/HttpStatusAndResponse.java deleted file mode 100644 index a8242234..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/restful/client/HttpStatusAndResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.restful.client; - -/** - * Holds the status code and body that result from accessing an HTTP URL. - */ -public class HttpStatusAndResponse { - - private int statusCode; - private String response; - - public HttpStatusAndResponse(int status, String resp) { - this.statusCode = status; - this.response = resp; - } - - public int getStatusCode() { - return statusCode; - } - - public String getResponse() { - return response; - } -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/scheduler/Registerable.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/scheduler/Registerable.java deleted file mode 100644 index e2e4c385..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/scheduler/Registerable.java +++ /dev/null @@ -1,30 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.scheduler; - -import org.quartz.Trigger; - -public interface Registerable { - - public void registerTriggers(); - - public Trigger[] getTriggers(); - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AppService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AppService.java deleted file mode 100644 index 55180fd7..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AppService.java +++ /dev/null @@ -1,61 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import java.util.List; - -import org.openecomp.portalsdk.core.domain.App; - -/** - * Defines methods to fetch App domain objects. - * - * Very thin interface; Portal defines a much richer interface. - */ -public interface AppService { - - /** - * Gets all apps defined in the table. - * - * @return List of apps. - */ - List<App> getApps(); - - /** - * Gets the app with the specified ID. - * - * @param appId - * @return App with the specified ID. - */ - App getApp(Long appId); - - /** - * Gets the singleton entry - applications should have exactly 1 row in the - * FN_APP table. - */ - App getDefaultApp(); - - /** - * Fetches the application name once from database - * and keep refers to the same name later on as required. - * @return Default Application Name - */ - String getDefaultAppName(); - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AuditService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AuditService.java deleted file mode 100644 index b228d1b1..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AuditService.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import java.util.HashMap; - -import org.openecomp.portalsdk.core.domain.AuditLog; - -public interface AuditService { - /** - * - * Update log data in database - * - * @param auditLog - * @param additionalParams - */ - - @SuppressWarnings("rawtypes") - void logActivity(AuditLog auditLog, HashMap additionalParams); -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AuditServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AuditServiceImpl.java deleted file mode 100644 index 433cd2ac..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AuditServiceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import java.util.HashMap; - -import org.openecomp.portalsdk.core.domain.AuditLog; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -@Service("auditService") -@Transactional -public class AuditServiceImpl implements AuditService { - public AuditServiceImpl() {} - - @Autowired - private DataAccessService dataAccessService; - - @SuppressWarnings("rawtypes") - public void logActivity(AuditLog auditLog, HashMap additionalParams) { - getDataAccessService().saveDomainObject(auditLog, additionalParams); - } - - public DataAccessService getDataAccessService() { - return dataAccessService; - } - - public void setDataAccessService(DataAccessService dataAccessService) { - this.dataAccessService = dataAccessService; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/BroadcastService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/BroadcastService.java deleted file mode 100644 index 66315b92..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/BroadcastService.java +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import java.util.*; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.domain.BroadcastMessage; - -@SuppressWarnings("rawtypes") -public interface BroadcastService { - HashMap getBcModel(HttpServletRequest request); - Hashtable getBroadcastMessages(); - void loadMessages(); - BroadcastMessage getBroadcastMessage(HttpServletRequest request); - void saveBroadcastMessage(BroadcastMessage broadcastMessage); - void removeBroadcastMessage(BroadcastMessage broadcastMessage); -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/CentralAccessCondition.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/CentralAccessCondition.java deleted file mode 100644 index 9cefd5e1..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/CentralAccessCondition.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.springframework.context.annotation.Condition; -import org.springframework.context.annotation.ConditionContext; -import org.springframework.core.type.AnnotatedTypeMetadata; - - -public class CentralAccessCondition implements Condition { - - /** - * returns true if the application is centralized - */ - - @Override - public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { - boolean isRemote = false; - - if(PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED) == null) - { - isRemote = false; - } - else if(PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED) != null && PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED).equals("remote")){ - isRemote = true; - } - - return isRemote; - } -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FnMenuService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FnMenuService.java deleted file mode 100644 index 0cd65df2..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FnMenuService.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openecomp.portalsdk.core.domain.Menu; -import org.openecomp.portalsdk.core.domain.MenuData; - -/** - * Services for Admin to add/edit/delete menu items from FN_MENU - */ -public interface FnMenuService { - List<MenuData> getFnMenuItems(); - - void saveFnMenuData(MenuData domainFnMenu); - - void saveFnMenu(Menu domainFnMenu); - - void removeMenuItem(MenuData domainFnMenu); - - MenuData getMenuItemRow(Long id); - - Menu getMenuItem(Long id); - - List<Long> getParentId(String label); - - @SuppressWarnings("rawtypes") - List<List> getParentList(); - - void removeMenuItem(Menu domainFnMenu); - - Map<String, List<MenuData>> setMenuDataStructure(List<List<MenuData>> childItemList, List<MenuData> parentList, - Set<MenuData> menuResult) throws Exception; -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListService.java deleted file mode 100644 index 9419f213..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListService.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.domain.RoleFunction; - -public interface FunctionalMenuListService { - - List<RoleFunction> getFunctionCDList(HttpServletRequest request) throws Exception; - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java deleted file mode 100644 index c7474de1..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListServiceCentralizedImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.UserUtils; -import org.springframework.beans.factory.annotation.Autowired; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.type.TypeFactory; - -public class FunctionalMenuListServiceCentralizedImpl implements FunctionalMenuListService{ - -private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuListServiceCentralizedImpl.class); - - @Autowired - private RestApiRequestBuilder restApiRequestBuilder; - - @SuppressWarnings("unchecked") - @Override - public List<RoleFunction> getFunctionCDList(HttpServletRequest request) throws Exception { - User user = UserUtils.getUserSession(request); - ObjectMapper mapper = new ObjectMapper(); - List roleFunctionFinalList = new ArrayList<>(); - try { - String menuList = restApiRequestBuilder.getViaREST("/menuFunctions", true, user.getOrgUserId()); - roleFunctionFinalList = mapper.readValue(menuList, - TypeFactory.defaultInstance().constructCollectionType(List.class, String.class)); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "getFunctionCDList Failed", e); - throw new Exception(e.getMessage()); - } - return roleFunctionFinalList; - } - - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListServiceImpl.java deleted file mode 100644 index dd448856..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/FunctionalMenuListServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.springframework.beans.factory.annotation.Autowired; - -public class FunctionalMenuListServiceImpl implements FunctionalMenuListService{ - -private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuListServiceImpl.class); - - @Autowired - private DataAccessService dataAccessService; - - public DataAccessService getDataAccessService() { - return dataAccessService; - } - - public void setDataAccessService(DataAccessService dataAccessService) { - this.dataAccessService = dataAccessService; - } - - @SuppressWarnings("unchecked") - @Override - public List<RoleFunction> getFunctionCDList(HttpServletRequest request) throws Exception { - return getDataAccessService().executeNamedQuery("functionCDlist", null, null); - } - - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LdapService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LdapService.java deleted file mode 100644 index 9c790eb2..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LdapService.java +++ /dev/null @@ -1,31 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import org.openecomp.portalsdk.core.command.support.SearchResult; -import org.openecomp.portalsdk.core.domain.support.DomainVo; - - -public interface LdapService { - - // search POST for users based on the criteria selected in the Request - SearchResult searchPost(DomainVo searchCriteria, String sortBy1, String sortBy2, String sortBy3, int pageNo, int dataSize, int userId) throws Exception; - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LocalAccessCondition.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LocalAccessCondition.java deleted file mode 100644 index 68a9626a..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LocalAccessCondition.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.springframework.context.annotation.Condition; -import org.springframework.context.annotation.ConditionContext; -import org.springframework.core.type.AnnotatedTypeMetadata; - -public class LocalAccessCondition implements Condition{ - - /** - * returns true if the application is not centralized - */ - @Override - public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { - return PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED) == null || (PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED) != null && ! PortalApiProperties.getProperty(PortalApiConstants.ROLE_ACCESS_CENTRALIZED).equals("remote")); - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LoginService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LoginService.java deleted file mode 100644 index 5baa86ef..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/LoginService.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - - -import java.util.*; - -import org.openecomp.portalsdk.core.command.*; - - -public interface LoginService { - - /** - * - * @param bean - * @param menuPropertiesFilename - * @param additionalParams - * @return returns login user bean - * @throws Exception - */ - // validate user exists in the system - @SuppressWarnings("rawtypes") - LoginBean findUser(LoginBean bean, String menuPropertiesFilename, HashMap additionalParams) throws Exception; - - - /** - * - * @param bean - * @param menuPropertiesFilename - * @param additionalParams - * @param matchPassword - * @return returns login user bean - * @throws Exception - */ - @SuppressWarnings("rawtypes") - LoginBean findUser(LoginBean bean, String menuPropertiesFilename, HashMap additionalParams, boolean matchPassword) throws Exception; -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostDroolsService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostDroolsService.java deleted file mode 100644 index 596ebed2..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostDroolsService.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import java.util.List; - -import org.openecomp.portalsdk.core.command.PostDroolsBean; - -public interface PostDroolsService { - - String execute(String droolsFile, String className, String selectedRules); - - List<PostDroolsBean> fetchDroolBeans(); - - String retrieveClass(String droolsFile); - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostSearchService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostSearchService.java deleted file mode 100644 index cde9a370..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/PostSearchService.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.command.PostSearchBean; - -public interface PostSearchService { - - /** - * Imports the selected users in the search results as new users. - * - * @param request - * @param postSearch - * @return the number of users successfully imported - */ - int process(HttpServletRequest request, PostSearchBean postSearch); - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ProfileService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ProfileService.java deleted file mode 100644 index 3eda4cfc..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ProfileService.java +++ /dev/null @@ -1,60 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import java.util.List; - -import org.openecomp.portalsdk.core.domain.Profile; -import org.openecomp.portalsdk.core.domain.User; - - -public interface ProfileService { - - /** - * - * @return returns list of profiles - * @throws Exception - */ - List<Profile> findAll() throws Exception; - - /** - * - * @param id - * @return returns profile of requested ID - * @throws Exception - */ - Profile getProfile(int id) throws Exception; - - - /** - * - * @param id loginId - * @return returns User info of requested ID - * @throws Exception - */ - User getUser(String id) throws Exception; - - /** - * - * @param user - *saveUser method saves the user object - */ - void saveUser(User user); -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ProfileServiceCentralizedImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ProfileServiceCentralizedImpl.java deleted file mode 100644 index dd4b16f9..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/ProfileServiceCentralizedImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import java.util.List; - -import org.openecomp.portalsdk.core.domain.Profile; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; - -import com.fasterxml.jackson.databind.ObjectMapper; - -@Transactional -public class ProfileServiceCentralizedImpl implements ProfileService{ - - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ProfileServiceCentralizedImpl.class); - - @Autowired - AppService appService; - - @Autowired - private DataAccessService dataAccessService; - - public DataAccessService getDataAccessService() { - return dataAccessService; - } - - public void setDataAccessService(DataAccessService dataAccessService) { - this.dataAccessService = dataAccessService; - } - - @Autowired - RestApiRequestBuilder restApiRequestBuilder ; - - @SuppressWarnings("unchecked") - @Override - public List<Profile> findAll() throws Exception{ - return getDataAccessService().getList(Profile.class, null); - } - - @Override - public Profile getProfile(int id) throws Exception{ - ObjectMapper mapper = new ObjectMapper(); - Profile user = null; - String responseString = restApiRequestBuilder.getViaREST("/getProfile/" + id, true,Integer.toString(id)); - user = mapper.readValue(responseString, Profile.class); - return user; - } - - @Override - public User getUser(String id) throws Exception{ - ObjectMapper mapper = new ObjectMapper(); - User user = new User(); - String responseString =restApiRequestBuilder.getViaREST("/user/" + id, true,id); - user = mapper.readValue(responseString, User.class); - - return user; - } - - @Override - public void saveUser(User user) { - try { - getDataAccessService().saveDomainObject(user, null); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "saveUser failed", e); - } - } -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RestApiRequestBuilder.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RestApiRequestBuilder.java deleted file mode 100644 index 52473608..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RestApiRequestBuilder.java +++ /dev/null @@ -1,140 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID; - -import org.openecomp.portalsdk.core.domain.App; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.rest.RestWebServiceClient; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.slf4j.MDC; -import org.springframework.beans.factory.annotation.Autowired; - -public class RestApiRequestBuilder { - - private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RestApiRequestBuilder.class); - - @Autowired - AppService appService; - - public static String content_type = "application/json"; - - public String getViaREST(String restEndPoint, boolean isBasicAuth,String userId) throws Exception { - String appName = ""; - String requestId = ""; - String appUserName = ""; - String decryptedPwd = ""; - - logger.info(EELFLoggerDelegate.debugLogger, "Making use of REST API communication for GET" + restEndPoint); - - App app = appService.getDefaultApp(); - - if (app != null) { - appName = app.getName(); - appUserName = app.getUsername(); - try { - decryptedPwd = CipherUtil.decrypt(app.getAppPassword(), - SystemProperties.getProperty(SystemProperties.Decryption_Key)); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, - "Exception occurred in WebServiceCallServiceImpl.get while decrypting the password. Details: " - + e.toString()); - } - } else { - logger.warn(EELFLoggerDelegate.errorLogger, "Unable to locate the app information from the database."); - appName = SystemProperties.SDK_NAME; - } - requestId = MDC.get(MDC_KEY_REQUEST_ID); - - String response = null; - try { - response = RestWebServiceClient.getInstance().getPortalContent(restEndPoint, userId,appName, requestId, appUserName, - decryptedPwd, isBasicAuth); - } catch (Exception ex) { - response = "Failed to perform GET " + ex.toString(); - throw new Exception("get Failed"+ ex); - } - logger.debug(EELFLoggerDelegate.errorLogger, "getRoles response: {}", response); - return response; - } - - public void postViaREST(String restEndPoint, boolean isBasicAuth, String content,String userId) throws Exception { - String appName = ""; - String requestId = ""; - String appUserName = ""; - String decryptedPwd = ""; - - logger.info(EELFLoggerDelegate.debugLogger, "Making use of REST API communication for POST" + restEndPoint); - - App app = appService.getDefaultApp(); - - if (app != null) { - appName = app.getName(); - appUserName = app.getUsername(); - try { - decryptedPwd = CipherUtil.decrypt(app.getAppPassword(), - SystemProperties.getProperty(SystemProperties.Decryption_Key)); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, - "Exception occurred in WebServiceCallServiceImpl.get while decrypting the password. Details: " - + e.toString()); - } - } else { - logger.warn(EELFLoggerDelegate.errorLogger, "Unable to locate the app information from the database."); - appName = SystemProperties.SDK_NAME; - } - requestId = MDC.get(MDC_KEY_REQUEST_ID); - - - try { - RestWebServiceClient.getInstance().postPortalContent(restEndPoint, userId, appName, requestId, appUserName, - decryptedPwd, content_type, content, isBasicAuth); - } catch (Exception ex) { - logger.error(EELFLoggerDelegate.errorLogger, "POST response: {}", ex); - - throw new Exception("Save Failed"); - } - logger.debug(EELFLoggerDelegate.debugLogger, "POST response: {}"); - - } - - public void deleteViaRest(String restEndPoint, boolean isBasicAuth, String content, String userId) throws Exception { - String appName = ""; - String requestId = ""; - String appUserName = ""; - String decryptedPwd = ""; - - logger.info(EELFLoggerDelegate.debugLogger, "Making use of REST API communication for DELETE" + restEndPoint); - - App app = appService.getDefaultApp(); - - if (app != null) { - appName = app.getName(); - appUserName = app.getUsername(); - try { - decryptedPwd = CipherUtil.decrypt(app.getAppPassword(), - SystemProperties.getProperty(SystemProperties.Decryption_Key)); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, - "Exception occurred in WebServiceCallServiceImpl.get while decrypting the password. Details: " - + e.toString()); - } - } else { - logger.warn(EELFLoggerDelegate.errorLogger, "Unable to locate the app information from the database."); - appName = SystemProperties.SDK_NAME; - } - requestId = MDC.get(MDC_KEY_REQUEST_ID); - - - try { - RestWebServiceClient.getInstance().deletePortalContent(restEndPoint, userId, appName, requestId, appUserName, - decryptedPwd, content_type, content, isBasicAuth); - } catch (Exception ex) { - logger.error(EELFLoggerDelegate.errorLogger, "DELETE response: {}", ex); - throw new Exception("Delete Failed"); - } - logger.debug(EELFLoggerDelegate.debugLogger, "DELETE response: {}"); - - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleServiceNonSpringImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleServiceNonSpringImpl.java deleted file mode 100644 index a7374d0c..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/RoleServiceNonSpringImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; -/*package org.openecomp.portalsdk.core.service; - -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.RoleFunction; - -@Service("roleService") -@Transactional -public class RoleServiceNonSpringImpl implements RoleService{ - - @Autowired - private DataAccessService dataAccessService; - - @SuppressWarnings("unchecked") - public List<RoleFunction> getRoleFunctions() { - //List msgDB = getDataAccessService().getList(Profile.class, null); - return getDataAccessService().getList(RoleFunction.class, null); - } - - @SuppressWarnings("unchecked") - public List<Role> getAvailableChildRoles(Long roleId) { - List<Role> availableChildRoles = (List<Role>)getDataAccessService().getList(Role.class,null); - if(roleId==null || roleId==0){ - return availableChildRoles; - } - - Role currentRole = (Role)getDataAccessService().getDomainObject(Role.class,roleId,null); - Set<Role> allParentRoles = new TreeSet<Role>(); - allParentRoles = getAllParentRolesAsList(currentRole, allParentRoles); - - - Iterator<Role> availableChildRolesIterator = availableChildRoles.iterator(); - while (availableChildRolesIterator.hasNext()) { - Role role = availableChildRolesIterator.next(); - if(!role.getActive() || allParentRoles.contains(role) || role.getId().equals(roleId)){ - availableChildRolesIterator.remove(); - } - } - return availableChildRoles; - } - - @SuppressWarnings("unchecked") - private Set<Role> getAllParentRolesAsList(Role role, Set<Role> allParentRoles) { - Set<Role> parentRoles = role.getParentRoles(); - allParentRoles.addAll(parentRoles); - Iterator<Role> parentRolesIterator = parentRoles.iterator(); - while (parentRolesIterator.hasNext()) { - getAllParentRolesAsList(parentRolesIterator.next(),allParentRoles); - } - return allParentRoles; - } - - public RoleFunction getRoleFunction(String code) { - return (RoleFunction)getDataAccessService().getDomainObject(RoleFunction.class, code, null); - } - - public void saveRoleFunction(RoleFunction domainRoleFunction) { - getDataAccessService().saveDomainObject(domainRoleFunction, null); - } - - public void deleteRoleFunction(RoleFunction domainRoleFunction) { - getDataAccessService().deleteDomainObject(domainRoleFunction, null); - } - - public Role getRole(Long id) { - return (Role)getDataAccessService().getDomainObject(Role.class, id, null); - } - - public void saveRole(Role domainRole) { - getDataAccessService().saveDomainObject(domainRole, null); - } - - public void deleteRole(Role domainRole) { - getDataAccessService().deleteDomainObject(domainRole, null); - } - - @SuppressWarnings("unchecked") - public List<Role> getAvailableRoles() { - return getDataAccessService().getList(Role.class, null); - } - - public DataAccessService getDataAccessService() { - return dataAccessService; - } - - - public void setDataAccessService(DataAccessService dataAccessService) { - this.dataAccessService = dataAccessService; - } - - - -} -*/
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UrlAccessImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UrlAccessImpl.java deleted file mode 100644 index 02cb7807..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UrlAccessImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.domain.UrlsAccessible; -import org.openecomp.portalsdk.core.web.support.UserUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -@Transactional -@Service("urlAccessService") -public class UrlAccessImpl implements UrlAccessService{ - - @Autowired - DataAccessService dataAccessService; - - @Override - public boolean isUrlAccessible(HttpServletRequest request, String currentUrl) { - boolean isAccessible = false; - Map<String, String> params = new HashMap<>(); - params.put("current_url", currentUrl); - List list = dataAccessService.executeNamedQuery("restrictedUrls", params, null); - - // loop through the list of restricted URL's - if (list != null && list.size() > 0) { - for (int i = 0; i < list.size(); i++) { - UrlsAccessible urlFunctions = (UrlsAccessible) list.get(i); - // String url = (String) urlFunctions.getUrl(); - String functionCd = (String) urlFunctions.getFunctionCd(); - if (UserUtils.isAccessible(request, functionCd)) { - isAccessible = true; - } - } - return isAccessible; - } - return true; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UrlAccessService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UrlAccessService.java deleted file mode 100644 index bb815f5d..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UrlAccessService.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import javax.servlet.http.HttpServletRequest; - -public interface UrlAccessService { - - /** - * Answers whether the specified URL is accessible. - * - * @param request - * @param currentUrl - * @return true if yes, false if no. - */ - public boolean isUrlAccessible(HttpServletRequest request, String currentUrl); -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserProfileService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserProfileService.java deleted file mode 100644 index 2273bad1..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserProfileService.java +++ /dev/null @@ -1,33 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - -import java.util.List; - -import org.openecomp.portalsdk.core.domain.User; - - -public interface UserProfileService { - List<User> findAll(); - User getUserByLoginId(String loginId); - void saveUser(User user); - public List<User> findAllUserWithOnOffline(String originOrgUserId); - List<User> findAllActive(); -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserService.java deleted file mode 100644 index d1c2f4b4..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserService.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import org.openecomp.portalsdk.core.domain.User; - -public interface UserService { - - /** - * Gets the user object for the specified ID. - * - * @param id - * orgUserID - * @return User object - * @throws Exception - */ - User getUser(String id) throws Exception; - - /** - * Builds a User object from a JSON string. - * - * @param response - * @return User object - * @throws Exception - */ - User userMapper(String response) throws Exception; -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserServiceCentalizedImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserServiceCentalizedImpl.java deleted file mode 100644 index 979d6658..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserServiceCentalizedImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.RoleFunction; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.domain.UserApp; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; - -import com.fasterxml.jackson.databind.ObjectMapper; - -@Transactional -public class UserServiceCentalizedImpl implements UserService { - - @Autowired - AppService appService; - - @Autowired - RestApiRequestBuilder restApiRequestBuilder; - - @Autowired - LoginService loginService; - - @Autowired - private DataAccessService dataAccessService; - - public DataAccessService getDataAccessService() { - return dataAccessService; - } - - public void setDataAccessService(DataAccessService dataAccessService) { - this.dataAccessService = dataAccessService; - } - - - @Override - public User getUser(String id) throws Exception { - User user = null; - String orgUserId = getUserByProfileId(id); - String responseString = restApiRequestBuilder.getViaREST("/user/" + orgUserId, true, id); - user = userMapper(responseString); - return user; - } - - public String getUserByProfileId(String id) { - Map<String, Long> params = new HashMap<String, Long>(); - params.put("user_id", new Long(id)); - @SuppressWarnings("rawtypes") - List list = getDataAccessService().executeNamedQuery("getUserByProfileId", params, null); - String orgUserId = ""; - if (list != null && !list.isEmpty()) - orgUserId = (String) list.get(0); - return orgUserId; - } - - @Override - public User userMapper(String res) throws Exception - { - User user= new User(); - ObjectMapper mapper = new ObjectMapper(); - HashSet<RoleFunction> rolefun = null; - user = mapper.readValue(res, User.class); - Set<RoleFunction> roleFunctionListNew = new HashSet<>(); - Set<RoleFunction> roleFunctionList = new HashSet<>(); - SortedSet<UserApp> UserAppSet = new TreeSet<>(); - @SuppressWarnings("unchecked") - Set<UserApp> setAppsObj = user.getUserApps(); - Iterator<UserApp> it = setAppsObj.iterator(); - while (it.hasNext()) { - Object next = it.next(); - - UserApp nextApp = mapper.convertValue(next, UserApp.class); - rolefun = new HashSet<>(); - Role role = nextApp.getRole(); - roleFunctionList = role.getRoleFunctions(); - Iterator<RoleFunction> itetaror = roleFunctionList.iterator(); - while (itetaror.hasNext()) { - Object nextValue = itetaror.next(); - RoleFunction roleFunction = mapper.convertValue(nextValue, RoleFunction.class); - roleFunctionListNew.add(roleFunction); - } - role.setRoleFunctions(roleFunctionListNew); - nextApp.setRole(role); - nextApp.getRole().getRoleFunctions(); - - UserAppSet.add(nextApp); - user.setUserApps(UserAppSet); - } - return user; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserServiceImpl.java deleted file mode 100644 index 80f8bb2a..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/UserServiceImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.openecomp.portalsdk.core.service; - -import org.openecomp.portalsdk.core.domain.User; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; - -@Transactional -public class UserServiceImpl implements UserService { - - @Autowired - private DataAccessService dataAccessService; - - @Override - public User getUser(String id) { - return (User) dataAccessService.getDomainObject(User.class, Long.parseLong(id), null); - } - - @Override - public User userMapper(String response) throws Exception { - throw new UnsupportedOperationException("method cannot be used"); - } - -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/WebServiceCallService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/WebServiceCallService.java deleted file mode 100644 index a7a5ad07..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/WebServiceCallService.java +++ /dev/null @@ -1,26 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service; - - -public interface WebServiceCallService { - public boolean verifyRESTCredential(String secretKey, String requestAppName, String requestPassword)throws Exception; - /*public String get(String restURL, String restPath);*/ -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/support/FusionService.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/support/FusionService.java deleted file mode 100644 index 34649ee1..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/support/FusionService.java +++ /dev/null @@ -1,27 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service.support; - - -import org.openecomp.portalsdk.core.FusionObject; - -public class FusionService implements FusionObject { - /** Logger for this class and subclasses */ -} diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/support/ServiceLocator.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/support/ServiceLocator.java deleted file mode 100644 index 5858c3fa..00000000 --- a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/support/ServiceLocator.java +++ /dev/null @@ -1,27 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.service.support; - -import javax.naming.directory.DirContext; - - -public interface ServiceLocator { - DirContext getDirContext(String initialContextFactory, String providerUrl, String securityPrincipal); -} diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/fusion/core/MockApplicationContextTestSuite.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/fusion/core/MockApplicationContextTestSuite.java index 0867f2a7..fa248385 100644 --- a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/fusion/core/MockApplicationContextTestSuite.java +++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/fusion/core/MockApplicationContextTestSuite.java @@ -1,13 +1,13 @@ -package org.openecomp.fusion.core; +package org.onap.fusion.core; import java.io.IOException; import org.junit.Before; import org.junit.runner.RunWith; -import org.openecomp.portalsdk.core.conf.AppConfig; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.util.CacheManager; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.conf.AppConfig; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.util.CacheManager; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -73,7 +73,7 @@ public class MockApplicationContextTestSuite { } @Configuration -@ComponentScan(basePackages = "org.openecomp", excludeFilters = {}) +@ComponentScan(basePackages = "org.onap", excludeFilters = {}) @Profile("test") class MockAppConfig extends AppConfig { diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/fusion/core/MockHibernateMappingLocations.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/fusion/core/MockHibernateMappingLocations.java index fea7cdda..d61bc690 100644 --- a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/fusion/core/MockHibernateMappingLocations.java +++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/fusion/core/MockHibernateMappingLocations.java @@ -1,6 +1,6 @@ -package org.openecomp.fusion.core; +package org.onap.fusion.core; -import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable; +import org.onap.portalsdk.core.conf.HibernateMappingLocatable; import org.springframework.context.annotation.Profile; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -17,7 +17,7 @@ public class MockHibernateMappingLocations implements HibernateMappingLocatable{ @Override public String[] getPackagesToScan() { - return new String[] { "org.openecomp" }; + return new String[] { "org.onap" }; } } diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/portalsdk/MockApplicationContextTestSuite.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/MockApplicationContextTestSuite.java index 812d438a..3b661672 100644 --- a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/portalsdk/MockApplicationContextTestSuite.java +++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/MockApplicationContextTestSuite.java @@ -1,32 +1,50 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk; +package org.onap.portalsdk; import java.io.IOException; import org.junit.Before; import org.junit.runner.RunWith; -import org.openecomp.portalsdk.core.conf.AppConfig; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.util.CacheManager; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.conf.AppConfig; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.util.CacheManager; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -98,7 +116,7 @@ public class MockApplicationContextTestSuite { @Configuration - @ComponentScan(basePackages = "org.openecomp", + @ComponentScan(basePackages = "org.onap", excludeFilters = { } ) @Profile("test") diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/MockHibernateMappingLocations.java b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/MockHibernateMappingLocations.java new file mode 100644 index 00000000..6a0d7e11 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/test/java/org/onap/portalsdk/MockHibernateMappingLocations.java @@ -0,0 +1,60 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk; + +import org.onap.portalsdk.core.conf.HibernateMappingLocatable; +import org.springframework.context.annotation.Profile; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; + +@Component +@Profile("test") +public class MockHibernateMappingLocations implements HibernateMappingLocatable { + + public Resource[] getMappingLocations() { + return new Resource[] { new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"), + new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml") }; + } + + @Override + public String[] getPackagesToScan() { + return new String[] { "org.onap" }; + } + +} diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/portalsdk/MockHibernateMappingLocations.java b/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/portalsdk/MockHibernateMappingLocations.java deleted file mode 100644 index a9fdebb4..00000000 --- a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/portalsdk/MockHibernateMappingLocations.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk; - -import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable; -import org.springframework.context.annotation.Profile; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.stereotype.Component; - -@Component -@Profile("test") -public class MockHibernateMappingLocations implements HibernateMappingLocatable { - - public Resource[] getMappingLocations() { - return new Resource[] { new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"), - new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml") }; - } - - @Override - public String[] getPackagesToScan() { - return new String[] { "org.openecomp" }; - } - -} diff --git a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/portalsdk/controller/sessionmgt/PortalCommunicationTest.java b/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/portalsdk/controller/sessionmgt/PortalCommunicationTest.java deleted file mode 100644 index 6b87dbe4..00000000 --- a/ecomp-sdk/epsdk-core/src/test/java/org/openecomp/portalsdk/controller/sessionmgt/PortalCommunicationTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.controller.sessionmgt; -/*package org.openecomp.portalsdk.controller.sessionmgt; - -import org.junit.Assert; -import org.junit.Test; -import org.springframework.mock.web.MockHttpSession; -import org.springframework.test.web.servlet.ResultActions; -import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; - -import org.openecomp.portalsdk.MockApplicationContextTestSuite; -import org.openecomp.portalsdk.service.sessionmgt.CoreTimeoutHandler; - -public class PortalCommunicationTest extends MockApplicationContextTestSuite{ - - - @Test - public void testGetTimeoutSessions() throws Exception { - - MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/api/sessionTimeOuts"); - MockHttpSession httpSession = new MockHttpSession(this.wac.getServletContext(),"1234"); - CoreTimeoutHandler.sessionCreated("12", "1234", httpSession); - - ResultActions ra = this.getMockMvc().perform(requestBuilder); - - System.out.println(" %%%%%%%%%%%%%%%%%%%%%%%%% " + ra.andReturn().getResponse().getContentAsString()); - System.out.println(" %%%%%%%%%%%%%%%%%%%%%%%%% " + "{\"12\":{\"jSessionId\":\"1234\",\"sessionTimOutMilliSec\":"); - - Assert.assertTrue(ra.andReturn().getResponse().getContentAsString().startsWith("{\"12\":{\"jSessionId\":\"1234\",\"sessionTimOutMilliSec\":")); - - } - - @Test - public void testUpdateTimeoutSessions() throws Exception { - - // pre condition - MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/api/sessionTimeOuts"); - MockHttpSession httpSession = new MockHttpSession(this.wac.getServletContext(),"1234"); - CoreTimeoutHandler.sessionCreated("12", "1234", httpSession); - ResultActions ra = this.getMockMvc().perform(requestBuilder); - - String responseSessMapStr = ra.andReturn().getResponse().getContentAsString(); - - - // test - requestBuilder = MockMvcRequestBuilders.post("/api/updateSessionTimeOuts"); - requestBuilder.param("sessionMap", responseSessMapStr); - ra = this.getMockMvc().perform(requestBuilder); - - - } - - - -} -*/ diff --git a/ecomp-sdk/epsdk-fw/README.md b/ecomp-sdk/epsdk-fw/README.md index 59f4e0fb..1fe154f5 100644 --- a/ecomp-sdk/epsdk-fw/README.md +++ b/ecomp-sdk/epsdk-fw/README.md @@ -1,8 +1,8 @@ -# ECOMP Portal SDK Framework +# ONAP Portal SDK Framework ## Overview -This is the Maven project for the ECOMP Portal SDK Framework library, +This is the Maven project for the ONAP Portal SDK Framework library, which is distributed as epsdk-fw-N.N.N.jar. This library (once called third-party onboarding) provides features to partner applications that use a J2EE Servlet 3.0 container @@ -29,7 +29,14 @@ nor does it require Spring. ### ONAP Distributions -Version 1.3.0 +Version 1.4.0 +- PORTAL-19 Rename Java package base to org.onap +- PORTAL-42 Use OParent as parent POM +- PORTAL-72 Address Sonar Scan code issues +- PORTAL-90 Use approved ONAP license text +* Put new entries here * + +Version 1.3.0, 28 August 2017 - PORTAL-19 Renaming the Group Id in the POM file to org.onap.portal.sdk - PORTAL-64 Single sign-on from Portal fails for some applications diff --git a/ecomp-sdk/epsdk-fw/pom.xml b/ecomp-sdk/epsdk-fw/pom.xml index 4a3d9a5a..ab07ae2a 100644 --- a/ecomp-sdk/epsdk-fw/pom.xml +++ b/ecomp-sdk/epsdk-fw/pom.xml @@ -5,14 +5,14 @@ <parent> <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-project</artifactId> - <version>1.3.0-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> </parent> <!-- GroupId is inherited from parent --> <artifactId>epsdk-fw</artifactId> <!-- Version is inherited from parent --> <packaging>jar</packaging> - <name>ECOMP Portal SDK Framework</name> + <name>ONAP Portal SDK Framework</name> <!-- properties are inherited from parent --> diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/IPortalRestAPIService.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/IPortalRestAPIService.java index b2d5ef3d..182d2675 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/IPortalRestAPIService.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/IPortalRestAPIService.java @@ -1,31 +1,49 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.crossapi; +package org.onap.portalsdk.core.onboarding.crossapi; import java.util.List; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.restful.domain.EcompRole; -import org.openecomp.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.restful.domain.EcompRole; +import org.onap.portalsdk.core.restful.domain.EcompUser; /** * Defines the REST API Interface that an on-boarding application must implement @@ -37,32 +55,32 @@ public interface IPortalRestAPIService { // EcompUser Interface /** - * Creates a user with the specified details. If any error occurs, for - * example the user exists, the method should throw PortalApiException with - * an appropriate message. The FW library will catch the exception and send - * an appropriate response to Portal. + * Creates a user with the specified details. If any error occurs, for example + * the user exists, the method should throw PortalApiException with an + * appropriate message. The FW library will catch the exception and send an + * appropriate response to Portal. * * @param user * Model object with attributes of user to be created. * @throws PortalAPIException - * If any error occurs while processing the request; for - * example, user exists. + * If any error occurs while processing the request; for example, + * user exists. */ public void pushUser(EcompUser user) throws PortalAPIException; /** - * Updates details about the user with the specified loginId. For example, - * mark user as inactive. If any error occurs, the method should throw - * PortalApiException with an appropriate message. The FW library will catch - * the exception and send an appropriate response to Portal. + * Updates details about the user with the specified loginId. For example, mark + * user as inactive. If any error occurs, the method should throw + * PortalApiException with an appropriate message. The FW library will catch the + * exception and send an appropriate response to Portal. * * @param loginId * EcompUser ID to be updated. * @param user * Model object with attributes of user to be updated. * @throws PortalAPIException - * If any error occurs while processing the request; for - * example, unknown user. + * If any error occurs while processing the request; for example, + * unknown user. */ public void editUser(String loginId, EcompUser user) throws PortalAPIException; @@ -76,19 +94,17 @@ public interface IPortalRestAPIService { * EcompUser ID to be fetched * @return Model object with user attributes. * @throws PortalAPIException - * If any error occurs while processing the request; for - * example, unknown user. + * If any error occurs while processing the request; for example, + * unknown user. */ public EcompUser getUser(String loginId) throws PortalAPIException; /** * Gets and returns a list of active users. If any error occurs, the method - * should throw PortalApiException with an appropriate message. The FW - * library will catch the exception and send an appropriate response to - * Portal. + * should throw PortalApiException with an appropriate message. The FW library + * will catch the exception and send an appropriate response to Portal. * - * @return List of user attribute model objects; empty list if none are - * found. + * @return List of user attribute model objects; empty list if none are found. * @throws PortalAPIException * If any error occurs while processing the request. */ @@ -98,12 +114,11 @@ public interface IPortalRestAPIService { /** * Gets and returns a list of active roles. If any error occurs, the method - * should throw PortalApiException with an appropriate message. The FW - * library will catch the exception and send an appropriate response to - * Portal. + * should throw PortalApiException with an appropriate message. The FW library + * will catch the exception and send an appropriate response to Portal. * - * @param requestedLoginId - * requested userloginId to fetch available roles + * @param requestedLoginId + * requested userloginId to fetch available roles * @return List of role attribute objects; empty list if none are found. * @throws PortalAPIException * If an unexpected error occurs while processing the request. @@ -111,15 +126,14 @@ public interface IPortalRestAPIService { public List<EcompRole> getAvailableRoles(String requestedLoginId) throws PortalAPIException; /** - * Updates roles for the user with the specified loginId to the list of - * roles provided as the second argument. After this operation, the should - * have ONLY the roles provided in the list above. For example, if user had - * roles r1, r2 and r3; and a call was made to pushUserRole with a list - * containing only roles r3 and r4, this method should leave the user with - * roles r3 and r4 since those were the ONLY roles provided in second - * argument. If any error occurs, the method should throw PortalApiException - * with an appropriate message. The FW library will catch the exception and - * send an appropriate response to Portal. + * Updates roles for the user with the specified loginId to the list of roles + * provided as the second argument. After this operation, the should have ONLY + * the roles provided in the list above. For example, if user had roles r1, r2 + * and r3; and a call was made to pushUserRole with a list containing only roles + * r3 and r4, this method should leave the user with roles r3 and r4 since those + * were the ONLY roles provided in second argument. If any error occurs, the + * method should throw PortalApiException with an appropriate message. The FW + * library will catch the exception and send an appropriate response to Portal. * * @param loginId * EcompUser ID to be updated. @@ -131,30 +145,32 @@ public interface IPortalRestAPIService { public void pushUserRole(String loginId, List<EcompRole> roles) throws PortalAPIException; /** - * Gets and returns a list of roles for the user with the specified loginId. - * If any error occurs, the method should throw PortalApiException with an + * Gets and returns a list of roles for the user with the specified loginId. If + * any error occurs, the method should throw PortalApiException with an * appropriate message. The FW library will catch the exception and send an * appropriate response to Portal. * * @param loginId + * Organization user ID * @return List of model objects; empty if no roles are found. * @throws PortalAPIException - * If any error occurs while processing the request; e.g., user - * not found. + * If any error occurs while processing the request; e.g., user not + * found. */ public List<EcompRole> getUserRoles(String loginId) throws PortalAPIException; // Security Interface /** - * Should return true if the call should be allowed and false if not. - * Currently Portal sends two headers of username and password in each - * request which the app should check. If match, return true; else return - * false. If any error occurs, the method should throw PortalApiException - * with an appropriate message. The FW library will catch the exception and - * send an appropriate response to Portal. + * Should return true if the call should be allowed and false if not. Currently + * Portal sends two headers of username and password in each request which the + * app should check. If match, return true; else return false. If any error + * occurs, the method should throw PortalApiException with an appropriate + * message. The FW library will catch the exception and send an appropriate + * response to Portal. * * @param request + * HttpServletRequest * @return true if the request contains appropriate credentials, else false. * @throws PortalAPIException * If an unexpected error occurs while processing the request. @@ -162,12 +178,13 @@ public interface IPortalRestAPIService { public boolean isAppAuthenticated(HttpServletRequest request) throws PortalAPIException; /** - * Gets and returns the userId for the logged-in user based on the request. - * If any error occurs, the method should throw PortalApiException with an + * Gets and returns the userId for the logged-in user based on the request. If + * any error occurs, the method should throw PortalApiException with an * appropriate message. The FW library will catch the exception and send an * appropriate response to Portal. * * @param request + * HttpServletRequest * @return true if the request contains appropriate credentials, else false. * @throws PortalAPIException * If an unexpected error occurs while processing the request. diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/IPortalUebAPIService.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/IPortalUebAPIService.java new file mode 100644 index 00000000..aa11aafe --- /dev/null +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/IPortalUebAPIService.java @@ -0,0 +1,67 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.crossapi; + +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; + +/** + * UEB API Interface for all the onboarding third party applications. + */ + +public interface IPortalUebAPIService { + // User Interface + public String pushUser(String userJson) throws PortalAPIException; + + public String editUser(String loginId, String userJson) throws PortalAPIException; + + public String getUser(String loginId) throws PortalAPIException; + + public String getUsers() throws PortalAPIException; + + // Roles Interface + public String getAvailableRoles() throws PortalAPIException; + + public String getAvailableFullRoles() throws PortalAPIException; + + public String pushUserRole(String loginId, String rolesJson) throws PortalAPIException; + + public String getUserRoles(String loginId) throws PortalAPIException; + + // Security Interface + public boolean isAppAuthenticated(String appUserName, String appPassword) throws PortalAPIException; +} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalAPIResponse.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalAPIResponse.java new file mode 100644 index 00000000..6ae2cdd8 --- /dev/null +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalAPIResponse.java @@ -0,0 +1,76 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.crossapi; + +/** + * This bean holds a response that is returned by the role and user-management + * REST API. + */ +public class PortalAPIResponse { + + /** + * Either "ok" or "error" + */ + private String status; + /** + * Optional if status is ok + */ + private String message; + + public PortalAPIResponse(boolean isOk, String msg) { + status = (isOk? "ok" : "error"); + message = msg; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + +} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java index 01337f78..869500f2 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.crossapi; +package org.onap.portalsdk.core.onboarding.crossapi; import java.io.BufferedReader; import java.io.IOException; @@ -36,13 +54,13 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler; -import org.openecomp.portalsdk.core.onboarding.rest.RestWebServiceClient; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.openecomp.portalsdk.core.restful.domain.EcompRole; -import org.openecomp.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; +import org.onap.portalsdk.core.onboarding.rest.RestWebServiceClient; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.restful.domain.EcompRole; +import org.onap.portalsdk.core.restful.domain.EcompUser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; @@ -320,9 +338,9 @@ public class PortalRestAPIProxy extends HttpServlet implements IPortalRestAPISer String credential = PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY); // for now lets also pass uebkey as user name and password contentType = "text/javascript"; - + responseString = RestWebServiceClient.getInstance().getPortalContent(webAnalyticsContextPath, - userId, credential, null, credential, credential,true); + userId, credential, null, credential, credential, true); if (logger.isDebugEnabled()) logger.debug("doGet: " + webAnalyticsContextPath + ": " + responseString); response.setStatus(HttpServletResponse.SC_OK); @@ -398,7 +416,7 @@ public class PortalRestAPIProxy extends HttpServlet implements IPortalRestAPISer } } else // Example: /roles <-- get all roles - + if (requestUri.endsWith(PortalApiConstants.API_PREFIX + "/roles")) { try { List<EcompRole> roles = getAvailableRoles(getUserId(request)); @@ -452,15 +470,15 @@ public class PortalRestAPIProxy extends HttpServlet implements IPortalRestAPISer writeAndFlush(response, contentTypeAppJson, responseJson); } - public String getSessionTimeOuts() throws Exception { + public String getSessionTimeOuts() { return PortalTimeoutHandler.gatherSessionExtensions(); } - public boolean timeoutSession(String portalJSessionId) throws Exception { + public boolean timeoutSession(String portalJSessionId) { return PortalTimeoutHandler.invalidateSession(portalJSessionId); } - public boolean updateSessionTimeOuts(String sessionMap) throws Exception { + public boolean updateSessionTimeOuts(String sessionMap) { return PortalTimeoutHandler.updateSessionExtensions(sessionMap); } @@ -524,8 +542,7 @@ public class PortalRestAPIProxy extends HttpServlet implements IPortalRestAPISer * Reads the request body and closes the input stream. * * @param request - * @return String read from the request, the empty string if nothing is - * read. + * @return String read from the request, the empty string if nothing is read. * @throws IOException */ private static String readRequestBody(HttpServletRequest request) throws IOException { @@ -584,8 +601,8 @@ public class PortalRestAPIProxy extends HttpServlet implements IPortalRestAPISer } /** - * Builds JSON object with status of error and message containing stack - * trace for the specified throwable. + * Builds JSON object with status of error and message containing stack trace + * for the specified throwable. * * @param t * Throwable with stack trace to use as message diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java index be3a7d54..1f9bfd07 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.crossapi; +package org.onap.portalsdk.core.onboarding.crossapi; import java.io.BufferedReader; import java.io.InputStreamReader; @@ -35,6 +53,7 @@ public class SessionCommunicationService { * Calls the ECOMP Portal to retrieve the session slot check interval. * * @param ecompRestURL + * Remote system URL * @param userName * application user name used for authentication at Portal * @param password @@ -68,16 +87,14 @@ public class SessionCommunicationService { logger.debug("getSessionSlotCheckInterval: Response Code : " + responseCode); } - StringBuffer response = new StringBuffer(); - - BufferedReader in = null; - try { - in = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8")); + StringBuffer response = new StringBuffer(); + try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"))) { String inputLine; while ((inputLine = in.readLine()) != null) response.append(inputLine); - } finally { - in.close(); + } + catch (Exception ex) { + logger.error("getSessionSlotCheckInterval failed to read stream", ex); } return response.toString(); } catch (Exception e) { @@ -91,6 +108,7 @@ public class SessionCommunicationService { * Calls the ECOMP Portal to request an extension of the current session. * * @param ecompRestURL + * Remote system URL * @param userName * application user name used for authentication at Portal * @param password @@ -99,19 +117,15 @@ public class SessionCommunicationService { * application UEB key (basically application ID) used for * authentication at Portal * @param sessionTimeoutMap + * Session timeout map * @return Content read from the remote REST endpoint - * @throws Exception */ public static String requestPortalSessionTimeoutExtension(String ecompRestURL, String userName, String password, - String uebKey, String sessionTimeoutMap) throws Exception { + String uebKey, String sessionTimeoutMap) { try { String url = ecompRestURL + "/extendSessionTimeOuts"; - // String decreptedPwd = - // app.appPassword;//CipherUtil.decrypt(encriptedPwdDB, - // SystemProperties.getProperty(SystemProperties.SECRET_KEY)); - URL obj = new URL(url); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); @@ -140,15 +154,13 @@ public class SessionCommunicationService { } StringBuffer response = new StringBuffer(); - BufferedReader in = null; - try { - in = new BufferedReader(new InputStreamReader(con.getInputStream())); + try (BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()))) { String inputLine; while ((inputLine = in.readLine()) != null) { response.append(inputLine); } - } finally { - in.close(); + } catch (Exception ex) { + logger.error("requestPortalSessionTimeoutExtension failed", ex); } return response.toString(); } catch (Exception e) { diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/exception/CipherUtilException.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/exception/CipherUtilException.java new file mode 100644 index 00000000..a1109abe --- /dev/null +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/exception/CipherUtilException.java @@ -0,0 +1,64 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.exception; + +public class CipherUtilException extends Exception { + + private static final long serialVersionUID = -4163367786939629691L; + + public CipherUtilException() { + super(); + } + + public CipherUtilException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } + + public CipherUtilException(String message, Throwable cause) { + super(message, cause); + } + + public CipherUtilException(String message) { + super(message); + } + + public CipherUtilException(Throwable cause) { + super(cause); + } + +} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/exception/PortalAPIException.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/exception/PortalAPIException.java new file mode 100644 index 00000000..ccfb95b2 --- /dev/null +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/exception/PortalAPIException.java @@ -0,0 +1,64 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.exception; + +public class PortalAPIException extends Exception{ + + private static final long serialVersionUID = 4854048794984375707L; + + public PortalAPIException() { + super(); + } + + public PortalAPIException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } + + public PortalAPIException(String message, Throwable cause) { + super(message, cause); + } + + public PortalAPIException(String message) { + super(message); + } + + public PortalAPIException(Throwable cause) { + super(cause); + } + +} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/PortalTimeoutBindingListener.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/PortalTimeoutBindingListener.java index 4a6b43bc..f700f261 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/PortalTimeoutBindingListener.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/PortalTimeoutBindingListener.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.listener; +package org.onap.portalsdk.core.onboarding.listener; import java.io.Serializable; @@ -27,13 +45,13 @@ import javax.servlet.http.HttpSessionBindingListener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; public class PortalTimeoutBindingListener implements HttpSessionBindingListener, Serializable { - private final Log logger = LogFactory.getLog(getClass()); + private static final long serialVersionUID = -8036365986695276137L; - private static final long serialVersionUID = 1L; + private final Log logger = LogFactory.getLog(getClass()); @Override public void valueBound(HttpSessionBindingEvent event) { diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/PortalTimeoutHandler.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/PortalTimeoutHandler.java index 90a9121c..649fb747 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/PortalTimeoutHandler.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/PortalTimeoutHandler.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.listener; +package org.onap.portalsdk.core.onboarding.listener; import java.util.Calendar; import java.util.Hashtable; @@ -28,9 +46,9 @@ import javax.servlet.http.HttpSession; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.crossapi.SessionCommunicationService; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.restful.domain.PortalTimeoutVO; +import org.onap.portalsdk.core.onboarding.crossapi.SessionCommunicationService; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.restful.domain.PortalTimeoutVO; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; @@ -45,13 +63,13 @@ public class PortalTimeoutHandler { protected static final SessionCommInf sessionComm = new SessionComm(); public interface SessionCommInf { - public Integer fetchSessionSlotCheckInterval(String... params) throws Exception; + public Integer fetchSessionSlotCheckInterval(String... params); - public void extendSessionTimeOuts(String... sessionMap) throws Exception; + public void extendSessionTimeOuts(String... sessionMap); } public static class SessionComm implements SessionCommInf { - public Integer fetchSessionSlotCheckInterval(String... params) throws Exception { + public Integer fetchSessionSlotCheckInterval(String... params) { String ecompRestURL = params[0]; String userName = params[1]; @@ -65,7 +83,7 @@ public class PortalTimeoutHandler { return Integer.parseInt(sessionSlot); } - public void extendSessionTimeOuts(String... params) throws Exception { + public void extendSessionTimeOuts(String... params) { String ecompRestURL = params[0]; String userName = params[1]; @@ -95,8 +113,11 @@ public class PortalTimeoutHandler { * TODO: remove static * * @param portalJSessionId + * Portal (remote) session ID * @param jSessionId + * Local session ID * @param session + * HttpSession */ public static void sessionCreated(String portalJSessionId, String jSessionId, HttpSession session) { @@ -139,6 +160,7 @@ public class PortalTimeoutHandler { * TODO: remove static * * @param session + * HttpSession */ public static void sessionDestroyed(HttpSession session) { try { @@ -154,6 +176,7 @@ public class PortalTimeoutHandler { * TODO: remove static * * @param portalJSessionId + * Portal session ID * @return true on success, false if the session cannot be found, etc. */ public static boolean invalidateSession(String portalJSessionId) { @@ -223,10 +246,10 @@ public class PortalTimeoutHandler { * TODO: remove static * * @param sessionTimeoutMapStr + * Session timeout map as string * @return true on success, false otherwise - * @throws Exception */ - public static boolean updateSessionExtensions(String sessionTimeoutMapStr) throws Exception { + public static boolean updateSessionExtensions(String sessionTimeoutMapStr) { logger.debug("Session Management: updateSessionExtensions"); // Map<String,Object> sessionTimeoutMap = // mapper.readValue(sessionTimeoutMapStr, Map.class); @@ -279,10 +302,17 @@ public class PortalTimeoutHandler { * TODO: Remove static * * @param request + * HttpServletRequest * @param userName + * User name * @param pwd + * Password + * @param uebKey + * UEB key (application ID) * @param ecompRestURL + * Remote system URL * @param _sessionComm + * Session communication information */ public static void handleSessionUpdatesNative(HttpServletRequest request, String userName, String pwd, String uebKey, String ecompRestURL, SessionCommInf _sessionComm) { @@ -302,16 +332,22 @@ public class PortalTimeoutHandler { * TODO: remove Static * * @param request + * HttpServletRequest * @param ecompRestURL + * Remote URL * @param userName + * user name * @param pwd + * password + * @param uebKey + * UEB key * @param _sessionComm + * session information * @throws JsonProcessingException - * @throws Exception + * On failure to serialize */ public static void synchronizeSessionForLastMinuteRequests(HttpServletRequest request, String ecompRestURL, - String userName, String pwd, String uebKey, SessionCommInf _sessionComm) - throws JsonProcessingException, Exception { + String userName, String pwd, String uebKey, SessionCommInf _sessionComm) throws JsonProcessingException { HttpSession session = request.getSession(false); if (session == null) @@ -363,6 +399,7 @@ public class PortalTimeoutHandler { * TODO: remove static * * @param request + * HttpServletRequest */ public static void resetSessionMaxIdleTimeOut(HttpServletRequest request) { try { diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/UserContextListener.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/UserContextListener.java new file mode 100644 index 00000000..8599a67c --- /dev/null +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/UserContextListener.java @@ -0,0 +1,72 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.listener; + +import java.util.HashMap; + +import javax.servlet.ServletContext; +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import javax.servlet.annotation.WebListener; +import javax.servlet.http.HttpSession; + +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; + +@WebListener +public class UserContextListener implements ServletContextListener { + + public void contextInitialized(ServletContextEvent event) { + ServletContext context = event.getServletContext(); + // + // create a map to store references to all the active + // sessions and bind it to context scope. + // + HashMap<String, HttpSession> activeUsers = new HashMap<String, HttpSession>(); + context.setAttribute(PortalApiConstants.ACTIVE_USERS_NAME, activeUsers); + } + + /** + * Needed for the ServletContextListener interface. + */ + public void contextDestroyed(ServletContextEvent event) { + // To overcome the problem with losing the session references + // during server restarts, put code here to serialize the + // activeUsers HashMap. Then put code in the contextInitialized + // method that reads and reloads it if it exists... + } +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/UserSessionListener.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/UserSessionListener.java index 88934282..95b2d44e 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/UserSessionListener.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/listener/UserSessionListener.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.listener; +package org.onap.portalsdk.core.onboarding.listener; import java.util.HashMap; import java.util.Hashtable; @@ -32,7 +50,7 @@ import javax.servlet.http.HttpSessionListener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; /** * Listens to session-create and session-destroy events. diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/rest/FavoritesClient.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/FavoritesClient.java index eed49f2a..92ea75a8 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/rest/FavoritesClient.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/FavoritesClient.java @@ -1,23 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.rest; +package org.onap.portalsdk.core.onboarding.rest; + +import java.io.IOException; /** * Provides a convenience method for fetching the favorites for a user from the @@ -40,11 +60,11 @@ public class FavoritesClient { * @param appPassword * REST API decrypted password * @return JSON with favorites - * @throws Exception + * @throws IOException * on any failure */ public static String getFavorites(String userId, String appName, String requestId, String appUserName, - String appPassword) throws Exception { + String appPassword) throws IOException { return RestWebServiceClient.getInstance().getPortalContent("/getFavorites", userId, appName, requestId, appUserName, appPassword,true); } diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/rest/FunctionalMenuClient.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/FunctionalMenuClient.java index 90cbdcb4..7fc98c67 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/rest/FunctionalMenuClient.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/FunctionalMenuClient.java @@ -1,23 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.rest; +package org.onap.portalsdk.core.onboarding.rest; + +import java.io.IOException; /** * Provides a convenience method for fetching the functional menu for a user @@ -42,11 +62,11 @@ public class FunctionalMenuClient { * REST API password (in the clear, not encrypted), used by * Portal to authenticate the request * @return JSON with functional menu - * @throws Exception + * @throws IOException * on any failure */ public static String getFunctionalMenu(String userId, String appName, String requestId, String appUserName, - String appPassword) throws Exception { + String appPassword) throws IOException { return RestWebServiceClient.getInstance().getPortalContent("/functionalMenuItemsForUser", userId, appName, requestId, appUserName, appPassword,true); } diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/rest/RestWebServiceClient.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java index 44177466..7c9f72a1 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/rest/RestWebServiceClient.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java @@ -1,26 +1,44 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.rest; +package org.onap.portalsdk.core.onboarding.rest; -import java.io.BufferedReader; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; @@ -29,12 +47,12 @@ import java.util.UUID; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; /** - * Simple REST client for GET-ing content from and POST-ing content , Delete to the - * Portal application. + * Simple REST client for GET, POST and DELETE operations against the Portal + * application. */ public class RestWebServiceClient { @@ -46,15 +64,14 @@ public class RestWebServiceClient { private static RestWebServiceClient instance = null; /** - * Constructor is private. Clients should obtain an instance via - * getInstance(). + * Constructor is private. Clients should obtain an instance via getInstance(). */ private RestWebServiceClient() { } /** - * Gets the static instance of RestWebServiceClient; creates it if - * necessary. Synchronized to be thread safe. + * Gets the static instance of RestWebServiceClient; creates it if necessary. + * Synchronized to be thread safe. * * @return Static instance of RestWebServiceClient. */ @@ -65,8 +82,8 @@ public class RestWebServiceClient { } /** - * Convenience method that fetches the URL for the Portal REST API endpoint - * and the application UEB key, then calls + * Convenience method that fetches the URL for the Portal REST API endpoint and + * the application UEB key, then calls * {@link #get(String, String, String, String, String, String, String)} to * access the Portal's REST endpoint. * @@ -83,37 +100,33 @@ public class RestWebServiceClient { * @param appPassword * REST API password (in the clear, not encrypted) for Portal to * authenticate the request + * @param isBasicAuth + * If true, send credentials as HTTP Basic Authentication * @return Content from REST endpoint - * @throws Exception + * @throws IOException * on any failure */ - public String getPortalContent(String restPath,String userId, String appName, String requestId, String appUserName, String appPassword, boolean isBasicAuth) throws Exception { - String restURL = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REST_URL); - + public String getPortalContent(String restPath, String userId, String appName, String requestId, String appUserName, + String appPassword, boolean isBasicAuth) throws IOException { + String restURL = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REST_URL); if (restURL == null) { - // should never happen String msg = "getPortalContent: failed to get property " + PortalApiConstants.ECOMP_REST_URL; logger.error(msg); - throw new Exception(msg); + throw new IOException(msg); } String appUebKey = PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY); - if (appUebKey == null) { - // should never happen - String msg = "getPortalContent: failed to get property " + PortalApiConstants.UEB_APP_KEY; - + String msg = "getPortalContent: failed to get property " + PortalApiConstants.UEB_APP_KEY; logger.error(msg); - throw new Exception(msg); + throw new IOException(msg); } final String restEndpointUrl = restURL + restPath; - if(isBasicAuth) - { - return get(restEndpointUrl, userId,appName, requestId, appUebKey, appUserName, appPassword,isBasicAuth); + if (isBasicAuth) { + return get(restEndpointUrl, userId, appName, requestId, appUebKey, appUserName, appPassword, isBasicAuth); } - return get(restEndpointUrl, userId,appName, requestId, appUebKey, appUserName, appPassword); + return get(restEndpointUrl, userId, appName, requestId, appUebKey, appUserName, appPassword); } - /** * Makes a call to a Portal REST API using the specified URL and parameters. * @@ -125,26 +138,24 @@ public class RestWebServiceClient { * Application name for logging; if null or empty, defaulted to * Unknown. * @param requestId - * 128-bit UUID value to uniquely identify the transaction; if - * null or empty, one is generated. + * 128-bit UUID value to uniquely identify the transaction; if null + * or empty, one is generated. * @param appUebKey - * Unique key for the application, used by Portal to authenticate - * the request + * Unique key for the application, used by Portal to authenticate the + * request * @param appUserName * REST API user name, used by Portal to authenticate the request * @param appPassword * REST API password, used by Portal to authenticate the request * @return Content from REST endpoint - * @throws Exception + * @throws IOException * On any failure; e.g., unknown host. */ - public String get(String url, String loginId, String appName, String requestId, String appUebKey, - String appUserName, String appPassword) throws Exception { - return get(url, loginId, appName,requestId, appUebKey, appUserName, appPassword, false); + String appUserName, String appPassword) throws IOException { + return get(url, loginId, appName, requestId, appUebKey, appUserName, appPassword, false); } - - + /** * Makes a call to a Portal REST API using the specified URL and parameters. * @@ -156,21 +167,23 @@ public class RestWebServiceClient { * Application name for logging; if null or empty, defaulted to * Unknown. * @param requestId - * 128-bit UUID value to uniquely identify the transaction; if - * null or empty, one is generated. + * 128-bit UUID value to uniquely identify the transaction; if null + * or empty, one is generated. * @param appUebKey - * Unique key for the application, used by Portal to authenticate - * the request + * Unique key for the application, used by Portal to authenticate the + * request * @param appUserName * REST API user name, used by Portal to authenticate the request * @param appPassword * REST API password, used by Portal to authenticate the request + * @param useBasicAuth + * If true, send credentials as HTTP Basic Authentication * @return Content from REST endpoint - * @throws Exception + * @throws IOException * On any failure; e.g., unknown host. */ public String get(String url, String loginId, String appName, String requestId, String appUebKey, - String appUserName, String appPassword, Boolean useBasicAuth) throws Exception { + String appUserName, String appPassword, Boolean useBasicAuth) throws IOException { logger.debug("RestWebServiceClient.get (" + url + ") operation is started."); @@ -183,16 +196,16 @@ public class RestWebServiceClient { // Create the connection object HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); - + // if the portal property is set then gets the timeout value from portal + // properties con.setConnectTimeout(3000); - // if the portal property is set then gets the timeout value from portal properties - if(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT)!= null){ - con.setConnectTimeout(Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT))); - } + if (PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT) != null) + con.setConnectTimeout(Integer + .parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT))); con.setReadTimeout(8000); - if(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT)!= null){ - con.setReadTimeout(Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT))); - } + if (PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT) != null) + con.setReadTimeout( + Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT))); // add request header con.setRequestProperty("uebkey", appUebKey); @@ -201,42 +214,25 @@ public class RestWebServiceClient { con.setRequestProperty("X-ECOMP-RequestID", requestId); con.setRequestProperty("username", appUserName); con.setRequestProperty("password", appPassword); - - if(useBasicAuth){ + if (useBasicAuth) { String encoding = Base64.getEncoder().encodeToString((appUserName + ":" + appPassword).getBytes()); - con.setRequestProperty("Authorization", "Basic "+ encoding); - } - + con.setRequestProperty("Authorization", "Basic " + encoding); + } + int responseCode = con.getResponseCode(); logger.debug("get: received response code '" + responseCode + "' while getting the '" + url + "' for user: " + loginId); - StringBuffer sb = new StringBuffer(); - BufferedReader in = null; - try { - in = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8")); - String inputLine = null; - while ((inputLine = in.readLine()) != null) - sb.append(inputLine); - } finally { - try { - if (in != null) - in.close(); - } catch (IOException ex) { - logger.error("get: failed to close reader", ex); - } - } - - final String response = sb.toString(); + final String response = readAndCloseStream(con.getInputStream()); if (logger.isDebugEnabled()) logger.debug("get: url " + url + " yielded " + response); return response; } - + /** - * Convenience method that fetches the URL for the Portal REST API endpoint - * and the application UEB key, then calls - * {@link #post(String, String, String, String, String, String, String, String, String)} + * Convenience method that fetches the URL for the Portal REST API endpoint and + * the application UEB key, then calls + * {@link #post(String, String, String, String, String, String, String, String, String, boolean)} * to access the Portal's REST endpoint. * * @param restPath @@ -248,8 +244,8 @@ public class RestWebServiceClient { * @param requestId * 128-bit UUID value to uniquely identify the transaction. * @param appUserName - * REST API user name for Portal to authenticate the request; - * ignored if null + * REST API user name for Portal to authenticate the request; ignored + * if null * @param appPassword * REST API password (in the clear, not encrypted) for Portal to * authenticate the request; ignored if null @@ -257,35 +253,32 @@ public class RestWebServiceClient { * content type for header * @param content * String to post + * @param isBasicAuth + * If true, use HTTP Basic Authentication * @return Content from REST endpoint - * @throws Exception + * @throws IOException * on any failure */ public String postPortalContent(String restPath, String userId, String appName, String requestId, - String appUserName, String appPassword, String contentType, String content, boolean isBasicAuth) throws Exception { + String appUserName, String appPassword, String contentType, String content, boolean isBasicAuth) + throws IOException { String restURL = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REST_URL); - if (restURL == null) { - // should never happen String msg = "getPortalContent: failed to get property " + PortalApiConstants.ECOMP_REST_URL; - logger.error(msg); - throw new Exception(msg); + throw new IOException(msg); } String appUebKey = PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY); - if (appUebKey == null) { - // should never happen String msg = "getPortalContent: failed to get property " + PortalApiConstants.UEB_APP_KEY; - logger.error(msg); - throw new Exception(msg); + throw new IOException(msg); } final String separator = restURL.endsWith("/") || restPath.startsWith("/") ? "" : "/"; final String restEndpointUrl = restURL + separator + restPath; return post(restEndpointUrl, userId, appName, requestId, appUebKey, appUserName, appPassword, contentType, - content,isBasicAuth); + content, isBasicAuth); } /** @@ -300,11 +293,11 @@ public class RestWebServiceClient { * Application name for logging; if null or empty, defaulted to * Unknown. * @param requestId - * 128-bit UUID value to uniquely identify the transaction; if - * null or empty, one is generated. + * 128-bit UUID value to uniquely identify the transaction; if null + * or empty, one is generated. * @param appUebKey - * Unique key for the application, used by Portal to authenticate - * the request + * Unique key for the application, used by Portal to authenticate the + * request * @param appUserName * REST API user name used by Portal to authenticate the request; * ignored if null @@ -315,12 +308,15 @@ public class RestWebServiceClient { * MIME header * @param content * Content to POST + * @param isBasicAuth + * If true, use HTTP Basic Authentication * @return Any content read from the endpoint - * @throws Exception + * @throws IOException * On any error */ public String post(String url, String loginId, String appName, String requestId, String appUebKey, - String appUserName, String appPassword, String contentType, String content, boolean isBasicAuth) throws Exception { + String appUserName, String appPassword, String contentType, String content, boolean isBasicAuth) + throws IOException { if (logger.isDebugEnabled()) logger.debug("RestWebServiceClient.post to URL " + url); @@ -333,17 +329,18 @@ public class RestWebServiceClient { // Create the connection object HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); - + con.setConnectTimeout(3000); - // if the portal property is set then gets the timeout value from portal properties - if(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT)!= null){ - con.setConnectTimeout(Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT))); - } + // if the portal property is set then gets the timeout value from portal + // properties + if (PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT) != null) + con.setConnectTimeout(Integer + .parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT))); con.setReadTimeout(15000); - if(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT)!= null){ - con.setReadTimeout(Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT))); - } - + if (PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT) != null) + con.setReadTimeout( + Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT))); + // add request header con.setRequestProperty("uebkey", appUebKey); if (appUserName != null) @@ -354,72 +351,114 @@ public class RestWebServiceClient { con.setRequestProperty("user-agent", appName); con.setRequestProperty("X-ECOMP-RequestID", requestId); con.setRequestProperty("Content-Type", contentType); - if(isBasicAuth){ + if (isBasicAuth) { String encoding = Base64.getEncoder().encodeToString((appUserName + ":" + appPassword).getBytes()); - con.setRequestProperty("Authorization", "Basic "+ encoding); - } + con.setRequestProperty("Authorization", "Basic " + encoding); + } con.setDoInput(true); con.setDoOutput(true); - if( content != null) - { - con.getOutputStream().write(content.getBytes()); + if (content != null) { + con.getOutputStream().write(content.getBytes()); } con.getOutputStream().flush(); con.getOutputStream().close(); int responseCode = con.getResponseCode(); logger.debug("Response Code : " + responseCode); - - StringBuffer sb = new StringBuffer(); - InputStreamReader in = null; - char[] buf = new char[8196]; - int bytes; - try { - in = new InputStreamReader(con.getInputStream(), "UTF-8"); - while ((bytes = in.read(buf)) > 0) - sb.append(new String(buf, 0, bytes)); - } finally { - try { - if (in != null) - in.close(); - } catch (IOException ex) { - logger.warn("get: failed to close reader", ex); - } - } - - return sb.toString(); + final String response = readAndCloseStream(con.getInputStream()); + return response; } - - + + /** + * Convenience method that fetches the URL for the Portal REST API endpoint and + * the application UEB key, then calls + * {@link #delete(String, String, String, String, String, String, String, String, String, boolean)} + * to access the Portal's REST endpoint. + * + * @param restPath + * Complete URL of the REST endpoint. + * @param userId + * User who is fetching the data + * @param appName + * Application name for logging; if null or empty, defaulted to + * Unknown. + * @param requestId + * 128-bit UUID value to uniquely identify the transaction; if null + * or empty, one is generated. + * @param appUserName + * REST API user name used by Portal to authenticate the request; + * ignored if null + * @param appPassword + * REST API password used by Portal to authenticate the request; + * ignored if null + * @param contentType + * MIME header + * @param content + * Content + * @param isBasicAuth + * If true, use HTTP Basic Authentication + * @return Any content read from the endpoint + * @throws IOException + * On any error + */ public String deletePortalContent(String restPath, String userId, String appName, String requestId, - String appUserName, String appPassword, String contentType, String content, boolean isBasicAuth) throws Exception { + String appUserName, String appPassword, String contentType, String content, boolean isBasicAuth) + throws IOException { String restURL = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REST_URL); - if (restURL == null) { - // should never happen - String msg = "getPortalContent: failed to get property " + PortalApiConstants.ECOMP_REST_URL; - + String msg = "deletePortalContent: failed to get property " + PortalApiConstants.ECOMP_REST_URL; logger.error(msg); - throw new Exception(msg); + throw new IOException(msg); } String appUebKey = PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY); - if (appUebKey == null) { - // should never happen - String msg = "getPortalContent: failed to get property " + PortalApiConstants.UEB_APP_KEY; - + String msg = "deletePortalContent: failed to get property " + PortalApiConstants.UEB_APP_KEY; logger.error(msg); - throw new Exception(msg); + throw new IOException(msg); } final String separator = restURL.endsWith("/") || restPath.startsWith("/") ? "" : "/"; final String restEndpointUrl = restURL + separator + restPath; return delete(restEndpointUrl, userId, appName, requestId, appUebKey, appUserName, appPassword, contentType, - content,isBasicAuth); + content, isBasicAuth); } - + + /** + * Makes a DELETE call to a Portal REST API using the specified URL and + * parameters. + * + * @param url + * Complete URL of the REST endpoint. + * @param loginId + * User who is fetching the data + * @param appName + * Application name for logging; if null or empty, defaulted to + * Unknown. + * @param requestId + * 128-bit UUID value to uniquely identify the transaction; if null + * or empty, one is generated. + * @param appUebKey + * Unique key for the application, used by Portal to authenticate the + * request + * @param appUserName + * REST API user name used by Portal to authenticate the request; + * ignored if null + * @param appPassword + * REST API password used by Portal to authenticate the request; + * ignored if null + * @param contentType + * MIME header + * @param content + * Content + * @param isBasicAuth + * If true, use HTTP Basic Authentication + * @return Any content read from the endpoint + * @throws IOException + * On any error + */ public String delete(String url, String loginId, String appName, String requestId, String appUebKey, - String appUserName, String appPassword, String contentType, String content,boolean isBasicAuth) throws Exception { + String appUserName, String appPassword, String contentType, String content, boolean isBasicAuth) + throws IOException { if (logger.isDebugEnabled()) logger.debug("RestWebServiceClient.post to URL " + url); @@ -433,14 +472,16 @@ public class RestWebServiceClient { HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("DELETE"); con.setConnectTimeout(3000); - // if the portal property is set then gets the timeout value from portal properties - if(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT)!= null){ - con.setConnectTimeout(Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT))); - } + // if the portal property is set then gets the timeout value from portal + // properties + if (PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT) != null) + con.setConnectTimeout(Integer + .parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_CONNECTION_TIMEOUT))); con.setReadTimeout(15000); - if(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT)!= null){ - con.setReadTimeout(Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT))); - } + if (PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT) != null) + con.setReadTimeout( + Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT))); + // add request header con.setRequestProperty("uebkey", appUebKey); if (appUserName != null) @@ -451,52 +492,58 @@ public class RestWebServiceClient { con.setRequestProperty("user-agent", appName); con.setRequestProperty("X-ECOMP-RequestID", requestId); con.setRequestProperty("Content-Type", contentType); - if(isBasicAuth){ + if (isBasicAuth) { String encoding = Base64.getEncoder().encodeToString((appUserName + ":" + appPassword).getBytes()); - con.setRequestProperty("Authorization", "Basic "+ encoding); - } + con.setRequestProperty("Authorization", "Basic " + encoding); + } con.setDoInput(true); con.setDoOutput(true); - if( content != null) - { - con.getOutputStream().write(content.getBytes()); - } + if (content != null) + con.getOutputStream().write(content.getBytes()); con.getOutputStream().flush(); con.getOutputStream().close(); int responseCode = con.getResponseCode(); logger.debug("Response Code : " + responseCode); + final String response = readAndCloseStream(con.getInputStream()); + return response; + } + /** + * Reads content of string to a StringBuffer, decoded as UTF-8, and returns as + * string. + * + * @param inputStream + * Stream to read + * @return String read + * @throws IOException + */ + private String readAndCloseStream(InputStream inputStream) throws IOException { StringBuffer sb = new StringBuffer(); InputStreamReader in = null; char[] buf = new char[8196]; int bytes; try { - in = new InputStreamReader(con.getInputStream(), "UTF-8"); + in = new InputStreamReader(inputStream, "UTF-8"); while ((bytes = in.read(buf)) > 0) sb.append(new String(buf, 0, bytes)); } finally { - try { - if (in != null) - in.close(); - } catch (IOException ex) { - logger.warn("get: failed to close reader", ex); - } + if (in != null) + in.close(); } - return sb.toString(); } - /** * Basic unit test for the client to call Portal app on localhost. * * @param args * Ignored - * @throws Exception + * @throws IOException + * On failure */ - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws IOException { RestWebServiceClient client = RestWebServiceClient.getInstance(); final String getUrl = "http://www.ecomp.openecomp.org:8080/ecompportal/auxapi/analytics"; String get = client.get(getUrl, "userId", "appName", null, "appUebKey", "appUserName", "appPassword", null); diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/CipherUtil.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/CipherUtil.java new file mode 100644 index 00000000..f3125f03 --- /dev/null +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/CipherUtil.java @@ -0,0 +1,174 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.util; + +import java.io.UnsupportedEncodingException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import javax.crypto.spec.SecretKeySpec; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.onap.portalsdk.core.onboarding.exception.CipherUtilException; + +public class CipherUtil { + + private static final Log logger = LogFactory.getLog(CipherUtil.class); + + /** + * Default key. + */ + private final static String key = "AGLDdG4D04BKm2IxIWEr8o==!"; + + /** + * Encrypts the text using the specified secret key. + * + * @param plainText + * Text to encrypt + * @param secretKey + * Key to use for encryption + * @return encrypted version of plain text. + * @throws CipherUtilException + * if any encryption step fails + */ + public static String encrypt(String plainText, String secretKey) throws CipherUtilException { + String encryptedString = null; + try { + byte[] encryptText = plainText.getBytes("UTF-8"); + byte[] rawKey = Base64.decodeBase64(secretKey); + SecretKeySpec sKeySpec = new SecretKeySpec(rawKey, "AES"); + Cipher cipher = Cipher.getInstance("AES"); + cipher.init(Cipher.ENCRYPT_MODE, sKeySpec); + encryptedString = Base64.encodeBase64String(cipher.doFinal(encryptText)); + } catch (BadPaddingException | IllegalBlockSizeException | InvalidKeyException | NoSuchAlgorithmException + | NoSuchPaddingException | UnsupportedEncodingException ex) { + logger.error("encrypt failed", ex); + throw new CipherUtilException(ex); + } + return encryptedString; + } + + /** + * Encrypts the text using a default secret key. + * + * @param plainText + * Text to encrypt + * @return Encrypted Text + * @throws CipherUtilException + * if any decryption step fails + */ + public static String encrypt(String plainText) throws CipherUtilException { + return CipherUtil.encrypt(plainText, key); + } + + /** + * Decrypts the text using the specified secret key. + * + * @param encryptedText + * Text to decrypt + * @param secretKey + * Key to use for decryption + * @return plain text version of encrypted text + * @throws CipherUtilException + * if any decryption step fails + */ + public static String decrypt(String encryptedText, String secretKey) throws CipherUtilException { + String encryptedString = null; + try { + byte[] rawKey = Base64.decodeBase64(secretKey); + SecretKeySpec sKeySpec = new SecretKeySpec(rawKey, "AES"); + byte[] encryptText = Base64.decodeBase64(encryptedText.getBytes("UTF-8")); + Cipher cipher = Cipher.getInstance("AES"); + cipher.init(Cipher.DECRYPT_MODE, sKeySpec); + encryptedString = new String(cipher.doFinal(encryptText)); + } catch (BadPaddingException | IllegalBlockSizeException | InvalidKeyException | NoSuchAlgorithmException + | NoSuchPaddingException | UnsupportedEncodingException ex) { + logger.error("decrypt failed", ex); + throw new CipherUtilException(ex); + } + return encryptedString; + } + + /** + * Decrypts the text using a default secret key. + * + * @param encryptedText + * Text to decrypt + * @return Decrypted text + * @throws CipherUtilException + * if any decryption step fails + */ + public static String decrypt(String encryptedText) throws CipherUtilException { + return CipherUtil.decrypt(encryptedText, key); + } + + public static void main(String[] args) throws CipherUtilException { + + String password = "Welcome123"; + String encrypted; + String decrypted; + + if (args.length != 2) { + System.out.println("Default password testing... "); + System.out.println("Plain password: " + password); + encrypted = encrypt(password); + System.out.println("Encrypted password: " + encrypted); + decrypted = decrypt(encrypted); + System.out.println("Decrypted password: " + decrypted); + } else { + String whatToDo = args[0]; + if (whatToDo.equalsIgnoreCase("d")) { + encrypted = args[1]; + System.out.println("Encrypted Text: " + encrypted); + decrypted = decrypt(encrypted); + System.out.println("Decrypted Text: " + decrypted); + } else { + decrypted = args[1]; + System.out.println("Plain Text: " + decrypted); + encrypted = encrypt(decrypted); + System.out.println("Encrypted Text" + encrypted); + } + } + } +} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/PortalApiConstants.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/PortalApiConstants.java index 087d03d5..1419851a 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/PortalApiConstants.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/PortalApiConstants.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.util; +package org.onap.portalsdk.core.onboarding.util; public interface PortalApiConstants { public static final String API_PREFIX = "/api/v2"; diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/PortalApiProperties.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/PortalApiProperties.java index 93572ee9..3d5ddae8 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/PortalApiProperties.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/PortalApiProperties.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.util; +package org.onap.portalsdk.core.onboarding.util; import java.io.IOException; import java.io.InputStream; @@ -42,6 +60,8 @@ public class PortalApiProperties { private static Properties properties; private static String propertyFileName = "portal.properties"; + private static final Object lockObject = new Object(); + /** * Constructor is private. */ @@ -49,16 +69,17 @@ public class PortalApiProperties { } /** - * Gets the property value for the specified key. If a value is found, - * leading and trailing space is trimmed. + * Gets the property value for the specified key. If a value is found, leading + * and trailing space is trimmed. * * @param property + * Property key * @return Value for the named property; null if the property file was not * loaded or the key was not found. */ public static String getProperty(String property) { if (properties == null) { - synchronized (propertyFileName) { + synchronized (lockObject) { try { if (!initialize()) { logger.error("Failed to read property file " + propertyFileName); @@ -79,11 +100,12 @@ public class PortalApiProperties { /** * Reads properties from a portal.properties file on the classpath. * - * Clients do NOT need to call this method. Clients MAY call this method to - * test whether the properties file can be loaded successfully. + * Clients do NOT need to call this method. Clients MAY call this method to test + * whether the properties file can be loaded successfully. * * @return True if properties were successfully loaded, else false. * @throws IOException + * On failure */ public static boolean initialize() throws IOException { if (properties != null) diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/SSOFilter.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/SSOFilter.java index 1d8a9620..00afecaf 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/SSOFilter.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/SSOFilter.java @@ -1,24 +1,42 @@ -/* ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ - * + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.onboarding.util; +package org.onap.portalsdk.core.onboarding.util; import javax.servlet.Filter; import javax.servlet.FilterChain; @@ -31,8 +49,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.openecomp.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; public class SSOFilter implements Filter { @@ -48,7 +66,8 @@ public class SSOFilter implements Filter { (((HttpServletRequest) request).getRequestURI() .substring(((HttpServletRequest) request).getContextPath().length() + 1) + (((HttpServletRequest) request).getQueryString() != null - ? ("?" + ((HttpServletRequest) request).getQueryString()) : ""))); + ? ("?" + ((HttpServletRequest) request).getQueryString()) + : ""))); ((HttpServletResponse) response).sendRedirect(redirectURL); diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/SSOUtil.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/SSOUtil.java new file mode 100644 index 00000000..9a5428f4 --- /dev/null +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/SSOUtil.java @@ -0,0 +1,83 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.onboarding.util; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class SSOUtil { + + private static final Log logger = LogFactory.getLog(SSOUtil.class); + + /** + * Constructs a path for this server, this app's context, etc. + * + * @param request + * HttpServletRequest + * @param response + * HttpServletResponse + * @param forwardPath + * Path to forward user + * @return Redirect URL + */ + public static String getECOMPSSORedirectURL(HttpServletRequest request, HttpServletResponse response, + String forwardPath) { + String appURL = (request.isSecure() ? "https://" : "http://") + request.getServerName() + ":" + + request.getServerPort() + request.getContextPath() + "/" + forwardPath; + String encodedAppURL = null; + try { + encodedAppURL = URLEncoder.encode(appURL, "UTF-8"); + } catch (UnsupportedEncodingException ex) { + logger.error("getECOMPSSORedirectURL: Failed to encode app URL " + appURL); + } + String portalURL = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL); + if (portalURL == null || portalURL.length() == 0) { + logger.error("getECOMPSSORedirectURL: Failed to get property " + PortalApiConstants.ECOMP_REDIRECT_URL); + return null; + } + String redirectURL = portalURL + "?redirectUrl=" + encodedAppURL; + return redirectURL; + } + +} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/EcompRole.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRole.java index 28b74a86..5d757de7 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/EcompRole.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRole.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.restful.domain; +package org.onap.portalsdk.core.restful.domain; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -27,7 +45,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; */ @JsonIgnoreProperties(ignoreUnknown = true) -public class EcompRole implements Comparable<EcompRole>{ +public class EcompRole implements Comparable<EcompRole> { protected Long id; private String name; @@ -46,7 +64,7 @@ public class EcompRole implements Comparable<EcompRole>{ public void setName(String name) { this.name = name; - } + } @Override public int hashCode() { diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/EcompUser.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompUser.java index dde16df8..7c9ab8b3 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/EcompUser.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompUser.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.restful.domain; +package org.onap.portalsdk.core.restful.domain; import java.util.Set; @@ -29,7 +47,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; */ @JsonIgnoreProperties(ignoreUnknown = true) -public class EcompUser implements Comparable<EcompUser>{ +public class EcompUser implements Comparable<EcompUser> { private Long orgId; private String managerId; @@ -45,8 +63,7 @@ public class EcompUser implements Comparable<EcompUser>{ private String jobTitle; private String loginId; private boolean active; - - + private Set<EcompRole> roles; public Long getOrgId() { @@ -160,7 +177,7 @@ public class EcompUser implements Comparable<EcompUser>{ public void setRoles(Set<EcompRole> roles) { this.roles = roles; } - + public String getManagerId() { return managerId; } @@ -189,9 +206,8 @@ public class EcompUser implements Comparable<EcompUser>{ } @Override - public int compareTo(EcompUser o) { + public int compareTo(EcompUser o) { return this.loginId.compareTo(o.loginId); } - } diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/PortalTimeoutVO.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/PortalTimeoutVO.java new file mode 100644 index 00000000..ee075cf4 --- /dev/null +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/PortalTimeoutVO.java @@ -0,0 +1,76 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.core.restful.domain; + +public class PortalTimeoutVO implements Comparable<PortalTimeoutVO> { + + private String jSessionId; + private Long sessionTimOutMilliSec; + + public PortalTimeoutVO() { + + } + + public PortalTimeoutVO(String _jSessionId, Long _sessionTimOutMilliSec) { + setjSessionId(_jSessionId); + setSessionTimOutMilliSec(_sessionTimOutMilliSec); + + } + + public String getjSessionId() { + return jSessionId; + } + + public void setjSessionId(String jSessionId) { + this.jSessionId = jSessionId; + } + + public Long getSessionTimOutMilliSec() { + return sessionTimOutMilliSec; + } + + public void setSessionTimOutMilliSec(Long sessionTimOutMilliSec) { + this.sessionTimOutMilliSec = sessionTimOutMilliSec; + } + + @Override + public int compareTo(PortalTimeoutVO o) { + return sessionTimOutMilliSec.compareTo(o.sessionTimOutMilliSec); + } + +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/SharedContext.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/SharedContext.java index 80ed4859..c8087e7b 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/SharedContext.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/SharedContext.java @@ -1,23 +1,43 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.core.restful.domain; +package org.onap.portalsdk.core.restful.domain; + +import java.util.Objects; /** * Bean that represents shared-context data transferred in JSON objects. This is @@ -73,6 +93,7 @@ public class SharedContext { * Sets the database row ID. * * @param id + * Row ID */ public void setId(final Long id) { this.id = id; @@ -91,6 +112,7 @@ public class SharedContext { * Sets the creation time * * @param create_time + * Creation time */ public void setCreate_time(final Long create_time) { this.create_time = create_time; @@ -109,14 +131,15 @@ public class SharedContext { * Sets the context ID * * @param context_id + * Context ID */ public void setContext_id(final String context_id) { this.context_id = context_id; } /** - * Gets the key of the key-value pair. Called ckey because "key" is a - * reserved word in Mysql. + * Gets the key of the key-value pair. Called ckey because "key" is a reserved + * word in Mysql. * * @return The key */ @@ -128,6 +151,7 @@ public class SharedContext { * Sets the key of the key-value pair. * * @param ckey + * Context key */ public void setCkey(final String ckey) { this.ckey = ckey; @@ -147,6 +171,7 @@ public class SharedContext { * Sets the value of the key-value pair. * * @param cvalue + * Context value */ public void setCvalue(final String cvalue) { this.cvalue = cvalue; @@ -165,6 +190,7 @@ public class SharedContext { * Sets the created value. * * @param created + * Created value */ public void setCreated(String created) { this.created = created; @@ -183,6 +209,7 @@ public class SharedContext { * Sets the modified value. * * @param modified + * Modified value */ public void setModified(String modified) { this.modified = modified; @@ -201,6 +228,7 @@ public class SharedContext { * Sets the createdId value. * * @param createdId + * Created ID */ public void setCreatedId(String createdId) { this.createdId = createdId; @@ -219,6 +247,7 @@ public class SharedContext { * Sets the modifiedId value. * * @param modifiedId + * Modified ID */ public void setModifiedId(String modifiedId) { this.modifiedId = modifiedId; @@ -237,6 +266,7 @@ public class SharedContext { * Sets the audit user ID value. * * @param auditUserId + * Audit user ID */ public void setAuditUserId(String auditUserId) { this.auditUserId = auditUserId; @@ -255,6 +285,7 @@ public class SharedContext { * Sets the audit trail value. * * @param auditTrail + * Audit trail */ public void setAuditTrail(String auditTrail) { this.auditTrail = auditTrail; @@ -273,6 +304,7 @@ public class SharedContext { * Sets the row num value. * * @param rowNum + * row number */ public void setRowNum(String rowNum) { this.rowNum = rowNum; @@ -280,14 +312,16 @@ public class SharedContext { @Override public boolean equals(Object obj) { + if (obj == null || !(obj instanceof SharedContext)) + return false; SharedContext other = (SharedContext) obj; - return this.id == other.id && this.context_id.equals(other.context_id) && this.ckey.equals(other.ckey) - && this.cvalue.equals(other.cvalue); + return Objects.equals(id, other.id) && Objects.equals(context_id, other.context_id) && Objects.equals(ckey, other.ckey) + && Objects.equals(cvalue, other.cvalue); } @Override public int hashCode() { - return (int) (id + context_id.hashCode() + ckey.hashCode() + cvalue.hashCode()); + return Objects.hash(id, context_id, ckey, cvalue); } @Override diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/IPortalUebAPIService.java b/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/IPortalUebAPIService.java deleted file mode 100644 index b6e0150e..00000000 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/IPortalUebAPIService.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.crossapi; - -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; - -/** - * - * @author Ikram Ikramullah - * - * UEB API Interface for all the onboarding third party applications. - * - */ - -public interface IPortalUebAPIService { - //User Interface - public String pushUser(String userJson) throws PortalAPIException; - public String editUser(String loginId, String userJson) throws PortalAPIException; - public String getUser(String loginId) throws PortalAPIException; - public String getUsers() throws PortalAPIException; - - //Roles Interface - public String getAvailableRoles() throws PortalAPIException; - public String getAvailableFullRoles() throws PortalAPIException; - public String pushUserRole(String loginId, String rolesJson) throws PortalAPIException; - public String getUserRoles(String loginId) throws PortalAPIException; - - //Security Interface - public boolean isAppAuthenticated(String appUserName, String appPassword) throws PortalAPIException; -} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/PortalAPIResponse.java b/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/PortalAPIResponse.java deleted file mode 100644 index ad1eae8d..00000000 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/crossapi/PortalAPIResponse.java +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.crossapi; - -/** - * This bean holds a response that is returned by the role and user-management - * REST API. - */ -public class PortalAPIResponse { - - /** - * Either "ok" or "error" - */ - private String status; - /** - * Optional if status is ok - */ - private String message; - - public PortalAPIResponse(boolean isOk, String msg) { - status = (isOk? "ok" : "error"); - message = msg; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - -} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/exception/PortalAPIException.java b/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/exception/PortalAPIException.java deleted file mode 100644 index ea9b1c66..00000000 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/exception/PortalAPIException.java +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.exception; - -public class PortalAPIException extends Exception{ - - private static final long serialVersionUID = 4854048794984375707L; - - public PortalAPIException() { - super(); - } - - public PortalAPIException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } - - public PortalAPIException(String message, Throwable cause) { - super(message, cause); - } - - public PortalAPIException(String message) { - super(message); - } - - public PortalAPIException(Throwable cause) { - super(cause); - } - -} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/UserContextListener.java b/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/UserContextListener.java deleted file mode 100644 index d4793d27..00000000 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/listener/UserContextListener.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.listener; - -import java.util.HashMap; - -import javax.servlet.ServletContext; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; -import javax.servlet.annotation.WebListener; -import javax.servlet.http.HttpSession; - -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; - -@WebListener -public class UserContextListener implements ServletContextListener{ - - public void contextInitialized(ServletContextEvent event){ - ServletContext context = event.getServletContext(); - // - // instanciate a map to store references to all the active - // sessions and bind it to context scope. - // - HashMap<String, HttpSession> activeUsers = new HashMap<String, HttpSession>(); - context.setAttribute(PortalApiConstants.ACTIVE_USERS_NAME, activeUsers); - } - - /** - * Needed for the ServletContextListener interface. - */ - public void contextDestroyed(ServletContextEvent event){ - // To overcome the problem with losing the session references - // during server restarts, put code here to serialize the - // activeUsers HashMap. Then put code in the contextInitialized - // method that reads and reloads it if it exists... - } -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/CipherUtil.java b/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/CipherUtil.java deleted file mode 100644 index e376cd4c..00000000 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/CipherUtil.java +++ /dev/null @@ -1,125 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.onboarding.util; - -import javax.crypto.Cipher; -import javax.crypto.spec.SecretKeySpec; - -import org.apache.commons.codec.binary.Base64; - -public class CipherUtil { - - private final static String key = "AGLDdG4D04BKm2IxIWEr8o==!"; - - /** - * @param plainText - * @param secretKey - * @return encrypted version of plain text. - * @throws Exception - */ - public static String encrypt(String plainText, String secretKey) throws Exception{ - byte[] rawKey; - String encryptedString; - SecretKeySpec sKeySpec; - byte[] encryptText = plainText.getBytes("UTF-8"); - Cipher cipher; - rawKey = Base64.decodeBase64(secretKey); - sKeySpec = new SecretKeySpec(rawKey, "AES"); - cipher = Cipher.getInstance("AES"); - cipher.init(Cipher.ENCRYPT_MODE, sKeySpec); - encryptedString = Base64.encodeBase64String(cipher.doFinal(encryptText)); - - return encryptedString; - } - - /** - * - * @param plainText - * @return Encrypted Text - * @throws Exception - */ - public static String encrypt(String plainText) throws Exception - { - return CipherUtil.encrypt(plainText,key); - } - - /** - * @param encryptedText - * @param secretKey - * @return plain text version of encrypted text - * @throws Exception - */ - public static String decrypt(String encryptedText, String secretKey) throws Exception { - Cipher cipher; - String encryptedString; - byte[] encryptText = null; - byte[] rawKey; - SecretKeySpec sKeySpec; - - rawKey = Base64.decodeBase64(secretKey); - sKeySpec = new SecretKeySpec(rawKey, "AES"); - encryptText = Base64.decodeBase64(encryptedText.getBytes("UTF-8")); - cipher = Cipher.getInstance("AES"); - cipher.init(Cipher.DECRYPT_MODE, sKeySpec); - encryptedString = new String(cipher.doFinal(encryptText)); - - return encryptedString; - } - - /** - * @param encryptedText - * @return Decrypted Text - * @throws Exception - */ - public static String decrypt(String encryptedText) throws Exception - { - return CipherUtil.decrypt(encryptedText,key); - } - - - public static void main(String[] args) throws Exception { - - String password = "Welcome123"; - String encrypted; - String decrypted; - - if (args.length != 2) { - System.out.println("Default password testing... "); - System.out.println("Plain password: " + password); - encrypted = encrypt(password); - System.out.println("Encrypted password: " + encrypted); - decrypted = decrypt(encrypted); - System.out.println("Decrypted password: " + decrypted); - } else { - String whatToDo = args[0]; - if (whatToDo.equalsIgnoreCase("d")) { - encrypted = args[1]; - System.out.println("Encrypted Text: " + encrypted); - decrypted = decrypt(encrypted); - System.out.println("Decrypted Text: " + decrypted); - } else { - decrypted = args[1]; - System.out.println("Plain Text: " + decrypted); - encrypted = encrypt(decrypted); - System.out.println("Encrypted Text" + encrypted); - } - } - } -} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/SSOUtil.java b/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/SSOUtil.java deleted file mode 100644 index 87134d3c..00000000 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/onboarding/util/SSOUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.openecomp.portalsdk.core.onboarding.util; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -public class SSOUtil { - - private static final Log logger = LogFactory.getLog(SSOUtil.class); - - /** - * Constructs a path for this server, this app's context, etc. - * - * @param request - * HttpServletRequest - * @param response - * HttpServletResponse - * @param forwardPath - * Path to forward user - * @return Redirect URL - */ - public static String getECOMPSSORedirectURL(HttpServletRequest request, HttpServletResponse response, - String forwardPath) { - String appURL = (request.isSecure() ? "https://" : "http://") + request.getServerName() + ":" - + request.getServerPort() + request.getContextPath() + "/" + forwardPath; - String encodedAppURL = null; - try { - encodedAppURL = URLEncoder.encode(appURL, "UTF-8"); - } catch (UnsupportedEncodingException ex) { - logger.error("getECOMPSSORedirectURL: Failed to encode app URL " + appURL); - } - String portalURL = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL); - if (portalURL == null || portalURL.length() == 0) { - logger.error("getECOMPSSORedirectURL: Failed to get property " + PortalApiConstants.ECOMP_REDIRECT_URL); - return null; - } - String redirectURL = portalURL + "?redirectUrl=" + encodedAppURL; - return redirectURL; - } - -} diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/PortalTimeoutVO.java b/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/PortalTimeoutVO.java deleted file mode 100644 index a8e100e5..00000000 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/openecomp/portalsdk/core/restful/domain/PortalTimeoutVO.java +++ /dev/null @@ -1,63 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.core.restful.domain; - -public class PortalTimeoutVO implements Comparable<PortalTimeoutVO>{ - - private String jSessionId; - private Long sessionTimOutMilliSec; - - public PortalTimeoutVO(){ - - } - - public PortalTimeoutVO(String _jSessionId, Long _sessionTimOutMilliSec) { - setjSessionId(_jSessionId); - setSessionTimOutMilliSec(_sessionTimOutMilliSec); - - } - - public String getjSessionId() { - return jSessionId; - } - - public void setjSessionId(String jSessionId) { - this.jSessionId = jSessionId; - } - - public Long getSessionTimOutMilliSec() { - return sessionTimOutMilliSec; - } - - public void setSessionTimOutMilliSec(Long sessionTimOutMilliSec) { - this.sessionTimOutMilliSec = sessionTimOutMilliSec; - } - - @Override - public int compareTo(PortalTimeoutVO o) { - return sessionTimOutMilliSec.compareTo(o.sessionTimOutMilliSec); - } - - - - - - -}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-workflow/README.md b/ecomp-sdk/epsdk-workflow/README.md index 983d9ba1..262610ba 100644 --- a/ecomp-sdk/epsdk-workflow/README.md +++ b/ecomp-sdk/epsdk-workflow/README.md @@ -1,8 +1,8 @@ -# ECOMP Portal SDK Workflow +# ONAP Portal SDK Workflow ## Overview -This is the Maven project for the ECOMP Portal SDK Workflow library, +This is the Maven project for the ONAP Portal SDK Workflow library, which is distributed as epsdk-workflow-N.N.N.jar. This library requires Hibernate and Spring, and provides features including schedulers, workflows and R Cloud integration. @@ -11,11 +11,17 @@ schedulers, workflows and R Cloud integration. ### ONAP Distributions -Version 1.3.0 -- [Portal-19] Renaming the Group Id in the POM file to org.onap.portal.sdk +Version 1.4.0 +- PORTAL-19 Rename Java package base to org.onap +- PORTAL-42 Use OParent as parent POM +- PORTAL-72 Address Sonar Scan code issues +- PORTAL-90 Use approved ONAP license text + +Version 1.3.0, 28 August 2017 +- Portal-19 Renaming the Group Id in the POM file to org.onap.portal.sdk Version 1.1.0 -- [Portal-7] Improvements added as part of the rebasing process +- Portal-7 Improvements added as part of the rebasing process Version 1.0.0 - Initial release diff --git a/ecomp-sdk/epsdk-workflow/pom.xml b/ecomp-sdk/epsdk-workflow/pom.xml index b43b387b..09b1eb36 100644 --- a/ecomp-sdk/epsdk-workflow/pom.xml +++ b/ecomp-sdk/epsdk-workflow/pom.xml @@ -5,16 +5,18 @@ <parent> <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-project</artifactId> - <version>1.3.0-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> </parent> <!-- GroupId is inherited from parent --> <artifactId>epsdk-workflow</artifactId> <!-- Version is inherited from parent --> <packaging>jar</packaging> - <name>ECOMP Portal SDK Workflow</name> + <name>ONAP Portal SDK Workflow</name> <description>Provides workflow features for SDK applications</description> + <!-- properties are inherited from parent --> + <!-- repositories are inherited from parent --> <dependencies> diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookController.java new file mode 100644 index 00000000..d5f4288d --- /dev/null +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookController.java @@ -0,0 +1,68 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.rnotebookintegration.controller; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.UserProfileService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +@Controller +@RequestMapping("/") +public class NotebookController extends RestrictedBaseController{ + + @RequestMapping(value = {"/notebook" }, method = RequestMethod.GET) + public ModelAndView noteBook(HttpServletRequest request) { + + try { + + } catch (Exception e) { + + + } + return new ModelAndView(getViewName()); + } + + +} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookTestController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookTestController.java new file mode 100644 index 00000000..973f8d05 --- /dev/null +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookTestController.java @@ -0,0 +1,60 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ + + +package org.onap.portalsdk.rnotebookintegration.controller; + +import javax.servlet.http.HttpServletRequest; + +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +@Controller +@RequestMapping("/") +public class NotebookTestController extends RestrictedBaseController{ + + @RequestMapping(value = {"/nbooktest" }, method = RequestMethod.GET) + public ModelAndView noteBook(HttpServletRequest request) { + return new ModelAndView(getViewName()); + } + + +} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/RNoteBookController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookController.java index 00d97268..9a178450 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/RNoteBookController.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.rnotebookintegration.controller; +package org.onap.portalsdk.rnotebookintegration.controller; import java.util.HashMap; @@ -25,15 +43,15 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.hibernate.validator.internal.util.privilegedactions.GetMethodFromPropertyName; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.controller.RestrictedRESTfulBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.restful.domain.EcompUser; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.JsonMessage; -import org.openecomp.portalsdk.core.web.support.UserUtils; -import org.openecomp.portalsdk.rnotebookintegration.exception.RNotebookIntegrationException; -import org.openecomp.portalsdk.rnotebookintegration.service.RNoteBookIntegrationService; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedRESTfulBaseController; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.JsonMessage; +import org.onap.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.rnotebookintegration.exception.RNotebookIntegrationException; +import org.onap.portalsdk.rnotebookintegration.service.RNoteBookIntegrationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java index 3b0fcc49..0268284c 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.rnotebookintegration.controller; +package org.onap.portalsdk.rnotebookintegration.controller; import java.util.HashMap; import java.util.Iterator; @@ -26,13 +44,13 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.restful.domain.EcompUser; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.UserUtils; -import org.openecomp.portalsdk.rnotebookintegration.exception.RNotebookIntegrationException; -import org.openecomp.portalsdk.rnotebookintegration.service.RNoteBookIntegrationService; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.rnotebookintegration.exception.RNotebookIntegrationException; +import org.onap.portalsdk.rnotebookintegration.service.RNoteBookIntegrationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/domain/RNoteBookCredentials.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/domain/RNoteBookCredentials.java index d2928495..0744aab3 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/domain/RNoteBookCredentials.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/domain/RNoteBookCredentials.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.rnotebookintegration.domain; +package org.onap.portalsdk.rnotebookintegration.domain; import java.util.Date; import java.util.Map; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.domain.support.DomainVo; -import org.openecomp.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.restful.domain.EcompUser; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/exception/RNotebookIntegrationException.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/exception/RNotebookIntegrationException.java new file mode 100644 index 00000000..ff576725 --- /dev/null +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/exception/RNotebookIntegrationException.java @@ -0,0 +1,59 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.rnotebookintegration.exception; + +public class RNotebookIntegrationException extends Exception { + public static final String ERROR_CODE_TOKEN_EXPIRED = "ERROR_CODE_TOKEN_EXPIRED"; + public static final String ERROR_CODE_TOKEN_INVALID = "ERROR_CODE_TOKEN_INVALID"; + + String errorCode; + + public RNotebookIntegrationException(String errorCodeStr){ + super(errorCodeStr); + this.errorCode = errorCodeStr; + } + + public String getErrorCode() { + return errorCode; + } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + +} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/service/RNoteBookIntegrationService.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/service/RNoteBookIntegrationService.java new file mode 100644 index 00000000..11de7d25 --- /dev/null +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/service/RNoteBookIntegrationService.java @@ -0,0 +1,49 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.rnotebookintegration.service; + +import java.util.Map; + +import org.onap.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.rnotebookintegration.exception.RNotebookIntegrationException; + +public interface RNoteBookIntegrationService { + public String getRNotebookCredentials(String token) throws RNotebookIntegrationException, Exception; + + public String saveRNotebookCredentials(String notebookId, EcompUser user, Map<String, String> params) throws RNotebookIntegrationException, Exception; +} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/service/RNoteBookIntegrationServiceImpl.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/service/RNoteBookIntegrationServiceImpl.java index fe21cd13..8a21b71a 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/service/RNoteBookIntegrationServiceImpl.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/service/RNoteBookIntegrationServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.rnotebookintegration.service; +package org.onap.portalsdk.rnotebookintegration.service; import java.security.SecureRandom; import java.util.Date; @@ -25,12 +43,12 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.restful.domain.EcompUser; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.web.support.UserUtils; -import org.openecomp.portalsdk.rnotebookintegration.domain.RNoteBookCredentials; -import org.openecomp.portalsdk.rnotebookintegration.exception.RNotebookIntegrationException; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.restful.domain.EcompUser; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.rnotebookintegration.domain.RNoteBookCredentials; +import org.onap.portalsdk.rnotebookintegration.exception.RNotebookIntegrationException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -45,8 +63,7 @@ public class RNoteBookIntegrationServiceImpl implements RNoteBookIntegrationServ private final long tokenTTL = 50000L; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RNoteBookIntegrationServiceImpl.class); - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RNoteBookIntegrationServiceImpl.class); @Autowired private DataAccessService dataAccessService; diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/controllers/WorkflowController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/controllers/WorkflowController.java index ca2b3885..2566868e 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/controllers/WorkflowController.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/controllers/WorkflowController.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.controllers; +package org.onap.portalsdk.workflow.controllers; import java.io.PrintWriter; import java.text.SimpleDateFormat; @@ -30,12 +48,13 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.workflow.domain.WorkflowSchedule; -import org.openecomp.portalsdk.workflow.models.Workflow; -import org.openecomp.portalsdk.workflow.models.WorkflowLite; -import org.openecomp.portalsdk.workflow.services.WorkflowService; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.workflow.domain.WorkflowSchedule; +import org.onap.portalsdk.workflow.models.Workflow; +import org.onap.portalsdk.workflow.models.WorkflowLite; +import org.onap.portalsdk.workflow.services.WorkflowService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; @@ -54,6 +73,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; @Controller @RequestMapping("/") public class WorkflowController extends RestrictedBaseController { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WorkflowController.class); @Autowired private WorkflowService workflowService; @@ -162,7 +183,7 @@ public class WorkflowController extends RestrictedBaseController { request.setCharacterEncoding("UTF-8"); out = response.getWriter(); } catch (Exception e) { - e.printStackTrace(); + logger.error(EELFLoggerDelegate.errorLogger, "removeWorkflow failed", e); } JSONObject j = new JSONObject("{removed: 123}"); diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/dao/WorkflowDAO.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/dao/WorkflowDAO.java new file mode 100644 index 00000000..cb7b27a3 --- /dev/null +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/dao/WorkflowDAO.java @@ -0,0 +1,50 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.workflow.dao; + +import java.util.List; + +import org.onap.portalsdk.workflow.models.Workflow; +import org.onap.portalsdk.workflow.models.WorkflowLite; + +public interface WorkflowDAO { + public List<Workflow> getWorkflows(); + public Workflow save(Workflow workflow, String creatorId); + public Workflow edit(WorkflowLite workflow, String creatorId); + public void delete(Long workflow); +} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/dao/WorkflowDAOImpl.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/dao/WorkflowDAOImpl.java index a3382dbb..8fdb64fc 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/dao/WorkflowDAOImpl.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/dao/WorkflowDAOImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.dao; +package org.onap.portalsdk.workflow.dao; import java.util.Date; import java.util.List; @@ -26,9 +44,9 @@ import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.workflow.models.Workflow; -import org.openecomp.portalsdk.workflow.models.WorkflowLite; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.workflow.models.Workflow; +import org.onap.portalsdk.workflow.models.WorkflowLite; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/domain/WorkflowSchedule.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/domain/WorkflowSchedule.java index e8c619f5..58f1377a 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/domain/WorkflowSchedule.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/domain/WorkflowSchedule.java @@ -1,26 +1,44 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.domain; +package org.onap.portalsdk.workflow.domain; import java.util.Date; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; public class WorkflowSchedule extends DomainVo{ /** * diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/models/Workflow.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/models/Workflow.java index 3193f9cd..734b356f 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/models/Workflow.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/models/Workflow.java @@ -1,24 +1,42 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.models; +package org.onap.portalsdk.workflow.models; import java.io.Serializable; import java.util.Date; @@ -32,7 +50,7 @@ import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Table; -import org.openecomp.portalsdk.core.domain.User; +import org.onap.portalsdk.core.domain.User; @Entity @Table(name = "fn_workflow") diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/models/WorkflowLite.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/models/WorkflowLite.java index c3b727d9..3f689095 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/models/WorkflowLite.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/models/WorkflowLite.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.models; +package org.onap.portalsdk.workflow.models; import java.io.Serializable; diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/scheduler/WorkFlowScheduleJob.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/scheduler/WorkFlowScheduleJob.java new file mode 100644 index 00000000..3882865a --- /dev/null +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/scheduler/WorkFlowScheduleJob.java @@ -0,0 +1,62 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.workflow.scheduler; + +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.workflow.services.WorkflowScheduleExecutor; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.springframework.scheduling.quartz.QuartzJobBean; + +public class WorkFlowScheduleJob extends QuartzJobBean{ + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WorkFlowScheduleJob.class); + + @Override + protected void executeInternal(JobExecutionContext context) + throws JobExecutionException { + + String serverUrl = (String)context.getMergedJobDataMap().get("serverUrl"); + String workflowKey = (String)context.getMergedJobDataMap().get("workflowKey"); + //String arguments = (String)context.getMergedJobDataMap().get("arguments"); + logger.info(EELFLoggerDelegate.debugLogger, ("Executing the job for the workflow " + workflowKey)); + WorkflowScheduleExecutor executor = new WorkflowScheduleExecutor(serverUrl, workflowKey); + executor.execute(); + } + +} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/scheduler/WorkFlowScheduleRegistry.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/scheduler/WorkFlowScheduleRegistry.java index bf29f59a..2412b992 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/scheduler/WorkFlowScheduleRegistry.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/scheduler/WorkFlowScheduleRegistry.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.scheduler; +package org.onap.portalsdk.workflow.scheduler; import java.util.Calendar; import java.util.Date; @@ -25,7 +43,7 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.quartz.impl.triggers.CronTriggerImpl; import org.springframework.context.annotation.DependsOn; import org.springframework.scheduling.quartz.CronTriggerFactoryBean; @@ -35,10 +53,8 @@ import org.springframework.stereotype.Component; @Component @DependsOn({"systemProperties"}) public class WorkFlowScheduleRegistry{ - - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WorkFlowScheduleRegistry.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WorkFlowScheduleRegistry.class); public WorkFlowScheduleRegistry() { diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowScheduleExecutor.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowScheduleExecutor.java index ea04e69e..90b9e96a 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowScheduleExecutor.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowScheduleExecutor.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.services; +package org.onap.portalsdk.workflow.services; import java.io.BufferedReader; import java.io.InputStreamReader; @@ -27,7 +45,12 @@ import java.net.URL; import java.net.URLConnection; import java.nio.charset.Charset; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; + public class WorkflowScheduleExecutor { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WorkflowScheduleExecutor.class); + private String serverURL; private String workflowKey; private String myUrl; @@ -50,7 +73,7 @@ public class WorkflowScheduleExecutor { } public static String get_fromURL(String myURL) { - System.out.println("Requeted URL:" + myURL); + logger.debug(EELFLoggerDelegate.debugLogger, "get_fromURL: Requested URL {}", myURL); StringBuilder sb = new StringBuilder(); URLConnection urlConn = null; InputStreamReader in = null; @@ -63,18 +86,24 @@ public class WorkflowScheduleExecutor { in = new InputStreamReader(urlConn.getInputStream(), Charset.defaultCharset()); BufferedReader bufferedReader = new BufferedReader(in); - if (bufferedReader != null) { - int cp; - while ((cp = bufferedReader.read()) != -1) { - sb.append((char) cp); - } - bufferedReader.close(); - } + int cp; + while ((cp = bufferedReader.read()) != -1) + sb.append((char) cp); + bufferedReader.close(); + in.close(); } - in.close(); } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "get_fromURL failed", e); throw new RuntimeException("Exception while calling URL:"+ myURL, e); } + finally { + try { + if (in != null) + in.close(); + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "get_fromURL close failed", e); + } + } return sb.toString(); } @@ -101,7 +130,8 @@ public class WorkflowScheduleExecutor { br.close(); connection.disconnect(); } catch (Exception e) { - throw new RuntimeException(e.getMessage()); + logger.error(EELFLoggerDelegate.errorLogger, "POST_fromURL failed", e); + throw new RuntimeException(e.getMessage()); } return jsonString.toString(); } diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowScheduleService.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowScheduleService.java new file mode 100644 index 00000000..1a64812d --- /dev/null +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowScheduleService.java @@ -0,0 +1,52 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.workflow.services; + +import java.util.List; + +import org.onap.portalsdk.workflow.domain.WorkflowSchedule; +import org.quartz.Trigger; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; + +public interface WorkflowScheduleService { + List<WorkflowSchedule> findAll(); + WorkflowSchedule getWorkflowScheduleByKey(Long key); + void saveWorkflowSchedule(WorkflowSchedule ws); + public void triggerWorkflowScheduling(SchedulerFactoryBean schedulerBean, WorkflowSchedule ws); + public List<Trigger> triggerWorkflowScheduling(); +} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowScheduleServiceImpl.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowScheduleServiceImpl.java index 1d0c58a7..73da941c 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowScheduleServiceImpl.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowScheduleServiceImpl.java @@ -1,23 +1,41 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.services; +package org.onap.portalsdk.workflow.services; import java.text.DateFormat; import java.text.SimpleDateFormat; @@ -25,10 +43,10 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.workflow.domain.WorkflowSchedule; -import org.openecomp.portalsdk.workflow.scheduler.WorkFlowScheduleRegistry; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.workflow.domain.WorkflowSchedule; +import org.onap.portalsdk.workflow.scheduler.WorkFlowScheduleRegistry; import org.quartz.JobDetail; import org.quartz.Trigger; import org.springframework.beans.factory.annotation.Autowired; @@ -45,8 +63,7 @@ import org.springframework.transaction.annotation.Transactional; public class WorkflowScheduleServiceImpl implements WorkflowScheduleService{ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WorkflowScheduleServiceImpl.class); - + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WorkflowScheduleServiceImpl.class); @Autowired private DataAccessService dataAccessService; diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowService.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowService.java new file mode 100644 index 00000000..a246273b --- /dev/null +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowService.java @@ -0,0 +1,56 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalsdk.workflow.services; + +import java.util.List; + +import org.onap.portalsdk.workflow.domain.WorkflowSchedule; +import org.onap.portalsdk.workflow.models.Workflow; +import org.onap.portalsdk.workflow.models.WorkflowLite; + +public interface WorkflowService { + public void saveCronJob(WorkflowSchedule domainCronJobData); + + public Workflow addWorkflow(Workflow workflow, String creatorId); + + public Workflow editWorkflow(WorkflowLite worklow, String creatorId); + + public void deleteWorkflow(Long worklow); + + public List<Workflow> getAllWorkflows(); +} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowServiceImpl.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowServiceImpl.java index b27d2e2d..b12aba87 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowServiceImpl.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/services/WorkflowServiceImpl.java @@ -1,30 +1,48 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ================================================================================ + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalsdk.workflow.services; +package org.onap.portalsdk.workflow.services; import java.util.List; -import org.openecomp.portalsdk.workflow.dao.WorkflowDAO; -import org.openecomp.portalsdk.workflow.domain.WorkflowSchedule; -import org.openecomp.portalsdk.workflow.models.Workflow; -import org.openecomp.portalsdk.workflow.models.WorkflowLite; +import org.onap.portalsdk.workflow.dao.WorkflowDAO; +import org.onap.portalsdk.workflow.domain.WorkflowSchedule; +import org.onap.portalsdk.workflow.models.Workflow; +import org.onap.portalsdk.workflow.models.WorkflowLite; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/NotebookController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/NotebookController.java deleted file mode 100644 index 8b8ad5c9..00000000 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/NotebookController.java +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.rnotebookintegration.controller; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.UserProfileService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -@Controller -@RequestMapping("/") -public class NotebookController extends RestrictedBaseController{ - @Autowired - UserProfileService service; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(NotebookController.class); - - @RequestMapping(value = {"/notebook" }, method = RequestMethod.GET) - public ModelAndView noteBook(HttpServletRequest request) { - - try { - - } catch (Exception e) { - - - } - return new ModelAndView(getViewName()); - } - - -} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/NotebookTestController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/NotebookTestController.java deleted file mode 100644 index ac56b6c6..00000000 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/controller/NotebookTestController.java +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ - - -package org.openecomp.portalsdk.rnotebookintegration.controller; - -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.UserProfileService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -@Controller -@RequestMapping("/") -public class NotebookTestController extends RestrictedBaseController{ - @Autowired - UserProfileService service; - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(NotebookTestController.class); - - @RequestMapping(value = {"/nbooktest" }, method = RequestMethod.GET) - public ModelAndView noteBook(HttpServletRequest request) { - - try { - - } catch (Exception e) { - - - } - return new ModelAndView(getViewName()); - } - - -} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/exception/RNotebookIntegrationException.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/exception/RNotebookIntegrationException.java deleted file mode 100644 index b2742641..00000000 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/exception/RNotebookIntegrationException.java +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.rnotebookintegration.exception; - -public class RNotebookIntegrationException extends Exception { - public static final String ERROR_CODE_TOKEN_EXPIRED = "ERROR_CODE_TOKEN_EXPIRED"; - public static final String ERROR_CODE_TOKEN_INVALID = "ERROR_CODE_TOKEN_INVALID"; - - String errorCode; - - public RNotebookIntegrationException(String errorCodeStr){ - super(errorCodeStr); - this.errorCode = errorCodeStr; - } - - public String getErrorCode() { - return errorCode; - } - - public void setErrorCode(String errorCode) { - this.errorCode = errorCode; - } - -} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/service/RNoteBookIntegrationService.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/service/RNoteBookIntegrationService.java deleted file mode 100644 index 2b1e3c9e..00000000 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/rnotebookintegration/service/RNoteBookIntegrationService.java +++ /dev/null @@ -1,31 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.rnotebookintegration.service; - -import java.util.Map; - -import org.openecomp.portalsdk.core.restful.domain.EcompUser; -import org.openecomp.portalsdk.rnotebookintegration.exception.RNotebookIntegrationException; - -public interface RNoteBookIntegrationService { - public String getRNotebookCredentials(String token) throws RNotebookIntegrationException, Exception; - - public String saveRNotebookCredentials(String notebookId, EcompUser user, Map<String, String> params) throws RNotebookIntegrationException, Exception; -} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/dao/WorkflowDAO.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/dao/WorkflowDAO.java deleted file mode 100644 index 435ac9a6..00000000 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/dao/WorkflowDAO.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.workflow.dao; - -import java.util.List; - -import org.openecomp.portalsdk.workflow.models.Workflow; -import org.openecomp.portalsdk.workflow.models.WorkflowLite; - -public interface WorkflowDAO { - public List<Workflow> getWorkflows(); - public Workflow save(Workflow workflow, String creatorId); - public Workflow edit(WorkflowLite workflow, String creatorId); - public void delete(Long workflow); -} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/scheduler/WorkFlowScheduleJob.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/scheduler/WorkFlowScheduleJob.java deleted file mode 100644 index d90ee05b..00000000 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/scheduler/WorkFlowScheduleJob.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.workflow.scheduler; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.workflow.services.WorkflowScheduleExecutor; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.springframework.scheduling.quartz.QuartzJobBean; - -public class WorkFlowScheduleJob extends QuartzJobBean{ - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WorkFlowScheduleJob.class); - - - @Override - protected void executeInternal(JobExecutionContext context) - throws JobExecutionException { - - String serverUrl = (String)context.getMergedJobDataMap().get("serverUrl"); - String workflowKey = (String)context.getMergedJobDataMap().get("workflowKey"); - //String arguments = (String)context.getMergedJobDataMap().get("arguments"); - logger.info(EELFLoggerDelegate.debugLogger, ("Executing the job for the workflow " + workflowKey)); - WorkflowScheduleExecutor executor = new WorkflowScheduleExecutor(serverUrl, workflowKey); - executor.execute(); - } - -} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowScheduleService.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowScheduleService.java deleted file mode 100644 index d04b72be..00000000 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowScheduleService.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalsdk.workflow.services; - -import java.util.List; - -import org.openecomp.portalsdk.workflow.domain.WorkflowSchedule; -import org.quartz.Trigger; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; - -public interface WorkflowScheduleService { - List<WorkflowSchedule> findAll(); - WorkflowSchedule getWorkflowScheduleByKey(Long key); - void saveWorkflowSchedule(WorkflowSchedule ws); - public void triggerWorkflowScheduling(SchedulerFactoryBean schedulerBean, WorkflowSchedule ws); - public List<Trigger> triggerWorkflowScheduling(); -} diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowService.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowService.java deleted file mode 100644 index 7bf133a7..00000000 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/openecomp/portalsdk/workflow/services/WorkflowService.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.openecomp.portalsdk.workflow.services; - -import java.util.List; - -import org.openecomp.portalsdk.workflow.domain.WorkflowSchedule; -import org.openecomp.portalsdk.workflow.models.Workflow; -import org.openecomp.portalsdk.workflow.models.WorkflowLite; - - -public interface WorkflowService { - public void saveCronJob(WorkflowSchedule domainCronJobData); - public Workflow addWorkflow(Workflow workflow, String creatorId); - public Workflow editWorkflow(WorkflowLite worklow, String creatorId); - public void deleteWorkflow(Long worklow); - public List<Workflow> getAllWorkflows(); -} diff --git a/ecomp-sdk/epsdk-workflow/src/main/resources/RNoteBookIntegration.hbm.xml b/ecomp-sdk/epsdk-workflow/src/main/resources/RNoteBookIntegration.hbm.xml index 44b7986f..a93fc863 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/resources/RNoteBookIntegration.hbm.xml +++ b/ecomp-sdk/epsdk-workflow/src/main/resources/RNoteBookIntegration.hbm.xml @@ -1,29 +1,47 @@ <?xml version="1.0"?> <!-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property - ================================================================================ - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ============LICENSE_END============================================ + + ECOMP is a trademark and service mark of AT&T Intellectual Property. --> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> -<hibernate-mapping package="org.openecomp.portalsdk.rnotebookintegration.domain"> +<hibernate-mapping package="org.onap.portalsdk.rnotebookintegration.domain"> <!-- WorkflowSchedule mapping details --> diff --git a/ecomp-sdk/pom.xml b/ecomp-sdk/pom.xml index 092e2ba4..c687234d 100644 --- a/ecomp-sdk/pom.xml +++ b/ecomp-sdk/pom.xml @@ -3,14 +3,24 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <!-- ECOMP Portal SDK Maven parent project --> + <!-- Portal SDK Maven parent project --> <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-project</artifactId> - <version>1.3.0-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>ECOMP Portal SDK Project (parent)</name> + <name>ONAP Portal SDK Project (parent)</name> <url>https://wiki.onap.org/display/DW/Portal</url> + <!-- OParent provides license audit, code audit, distribution management, + etc. + But jenkins build fails, so comment out for now. + <parent> + <groupId>org.onap.oparent</groupId> + <artifactId>oparent</artifactId> + <version>0.1.0</version> + </parent> + --> + <modules> <module>epsdk-fw</module> <module>epsdk-core</module> @@ -25,28 +35,33 @@ <encoding>UTF-8</encoding> <springframework.version>4.2.0.RELEASE</springframework.version> <hibernate.version>4.3.11.Final</hibernate.version> + <skiptests>true</skiptests> <nexusproxy>https://nexus.onap.org</nexusproxy> <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath> + <stagingNexusPath>content/repositories/staging/</stagingNexusPath> <releaseNexusPath>content/repositories/releases/</releaseNexusPath> </properties> <repositories> <repository> - <!-- Releases repository has ECOMP release artifacts --> - <id>ecomp-releases</id> - <name>OpenECOMP - Release Repository</name> + <id>releases</id> + <name>ONAP - Release Repository</name> <url>${nexusproxy}/${releaseNexusPath}</url> </repository> <repository> - <!-- Snapshots repository has ECOMP snapshot artifacts --> - <id>ecomp-snapshots</id> - <name>OpenECOMP - Snapshot Repository</name> + <id>staging</id> + <name>ONAP - Staging Repository</name> + <url>${nexusproxy}/${stagingNexusPath}</url> + </repository> + <repository> + <id>snapshots</id> + <name>ONAP - Snapshot Repository</name> <url>${nexusproxy}/${snapshotNexusPath}</url> </repository> <repository> - <id>ecomp-public</id> - <name>ecomp onap public Repository</name> - <url>https://nexus.onap.org/content/groups/public</url> + <id>public</id> + <name>ONAP public Repository</name> + <url>${nexusproxy}/content/groups/public</url> </repository> </repositories> @@ -73,6 +88,37 @@ </profiles> <build> + + <pluginManagement> + <plugins> + <!-- Silence Eclipse/m2e complaints about checkstyle plugin brought in by OParent --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <versionRange>2.17,)</versionRange> + <goals> + <goal>check</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> <!-- Compile to Java 1.8 class output format --> @@ -131,6 +177,18 @@ </plugin> <plugin> + <groupId>org.sonatype.plugins</groupId> + <artifactId>nexus-staging-maven-plugin</artifactId> + <version>1.6.7</version> + <extensions>true</extensions> + <configuration> + <nexusUrl>${nexusproxy}</nexusUrl> + <stagingProfileId>176c31dfe190a</stagingProfileId> + <serverId>ecomp-staging</serverId> + </configuration> + </plugin> + + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.5.3</version> diff --git a/version.properties b/version.properties index fa08032a..663379d3 100644 --- a/version.properties +++ b/version.properties @@ -4,7 +4,7 @@ # major=1 -minor=1 +minor=4 patch=0 base_version=${major}.${minor}.${patch} |