summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion
diff options
context:
space:
mode:
authorChristopher Lott (Christopher) (cl778h) <clott@vm-ep-dev2.client.research.att.com>2017-06-12 09:49:00 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-06-12 13:42:43 -0400
commit627badaf69987c01811c477219fd943757a635f5 (patch)
tree97df9449a411d1ecf830cc76d8afd6f9b5677bda /ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion
parentba838f2e13f1e8050c75e68bd3733d56d8f416d5 (diff)
[PORTAL-16 PORTAL-18] Widget ms; staging
Remove staging repositories from poms. Add widget microservice code base. Add portal unit tests. Repair defects. Normalize line endings. Change-Id: Ia5e48da2a3141b352439ecd548cddf918f4df585 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion')
-rw-r--r--ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml392
-rw-r--r--ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml160
-rw-r--r--ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml670
-rw-r--r--ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml96
4 files changed, 712 insertions, 606 deletions
diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml
index 433fec8a..4749dbb3 100644
--- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml
+++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml
@@ -1,203 +1,189 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ================================================================================
- ECOMP Portal
- ================================================================================
- Copyright (C) 2017 AT&T 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.
- ================================================================================
- -->
-
-<!DOCTYPE tiles-definitions PUBLIC
- "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
- "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
-<tiles-definitions>
-
- <definition name="ebz_template" template="/WEB-INF/fusion/jsp/ebz_template.jsp">
- <put-attribute name="title" value=""></put-attribute>
- <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header.jsp"></put-attribute>
- <put-attribute name="body" value=""></put-attribute>
- <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp"></put-attribute>
- </definition>
-
- <definition name="ebz_template_raptor" template="/WEB-INF/fusion/jsp/ebz_template_raptor.jsp">
- <put-attribute name="title" value=""></put-attribute>
- <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header_raptor.jsp"></put-attribute>
- <put-attribute name="body" value=""></put-attribute>
- <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer_raptor.jsp"></put-attribute>
- </definition>
-
- <definition name="ebz_template_noheader_nofooter" template="/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp">
- <put-attribute name="body" value=""></put-attribute>
- </definition>
-
- <definition name="ebz_template_report_embedded"
- template="/WEB-INF/fusion/jsp/ebz/ebz_template_report_embedded.jsp">
- <put-attribute name="body" value=""></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="user_profile">
- <put-attribute name="body" value="/WEB-INF/jsp/user_profile.jsp"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="profile_search">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile_search.jsp"></put-attribute>
- <put-attribute name="viewName" value="profile_search"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="profile">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile.jsp"></put-attribute>
- <put-attribute name="viewName" value="profile"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="menu">
- <put-attribute name="body" value="/WEB-INF/jsp/menu.jsp"></put-attribute>
- <put-attribute name="viewName" value="menu"></put-attribute>
- </definition>
-
-
- <definition extends="ebz_template" name="welcome">
- <put-attribute name="body" value="/WEB-INF/jsp/welcome.jsp"></put-attribute>
- <put-attribute name="viewName" value="welcome"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="role_list">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_list.jsp"></put-attribute>
- <put-attribute name="viewName" value="role_list"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="role">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/role.jsp"></put-attribute>
- <put-attribute name="viewName" value="role"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="role_function_list">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_function_list.jsp"></put-attribute>
- <put-attribute name="viewName" value="role_function_list"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="post_search">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/post_search.jsp"></put-attribute>
- <put-attribute name="viewName" value="post_search"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="error">
- <put-attribute name="body" value="/WEB-INF/jsp/error.jsp"></put-attribute>
- <put-attribute name="viewName" value="error"></put-attribute>
- </definition>
-
- <definition extends="ebz_template_raptor" name="report">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_ebz.jsp"></put-attribute>
- <put-attribute name="viewName"
- value="report"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="report_wizard">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_wizard.jsp"></put-attribute>
- <put-attribute name="viewName" value="report_wizard"></put-attribute>
- </definition>
-
- <definition extends="ebz_template_report_embedded" name="report_embedded">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_ebz_embedded.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template" name="report_sample">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_sample.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="test_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/test_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="date_start_field_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/date_start_field_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="date_end_field_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/date_end_field_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="test_field_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/test_field_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="default_field_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/default_field_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_testrun_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_testrun_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_semaphore">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_semaphore.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_import_semaphore">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_import_semaphore.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_table_cols">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_table_cols.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_drill_down_report">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_drill_down_report.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_sql.jsp"></put-attribute>
- </definition>
-
- <definition name="raptor/error_page.jsp" template="/WEB-INF/fusion/raptor/error_page.jsp"/>
-
- <definition extends="ebz_template_raptor" name="wizard_schedule_only">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/wizard_schedule_only.jsp"></put-attribute>
- <put-attribute name="viewName" value="wizard_schedule_only"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="report_import">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_import.jsp"></put-attribute>
- <put-attribute name="viewName" value="report_import"></put-attribute>
- </definition>
-
- <definition name="data_out" template="/WEB-INF/fusion/jsp/data_out.jsp" />
- <definition extends="ebz_template" name="collaborate_list">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/collaborateList.jsp"></put-attribute>
- </definition>
-
-
- <definition extends="ebz_template" name="jcs_admin">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/jcs_admin.jsp"></put-attribute>
- <put-attribute name="viewName" value="jcs_admin"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="usage_list">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/usage_list.jsp"></put-attribute>
- <put-attribute name="viewName" value="usage_list"></put-attribute>
- </definition>
- <!--
- <definition extends="ebz_template_noheader_nofooter" name="collaboration">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"></put-attribute>
- </definition>
- -->
- <definition name="collaboration" template="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"/>
-
-
-</tiles-definitions>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ================================================================================
+ ECOMP Portal
+ ================================================================================
+ Copyright (C) 2017 AT&T 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.
+ ================================================================================
+ -->
+
+<!DOCTYPE tiles-definitions PUBLIC
+ "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+ "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+<tiles-definitions>
+
+ <definition name="ebz_template" template="/WEB-INF/fusion/jsp/ebz_template.jsp">
+ <put-attribute name="title" value=""></put-attribute>
+ <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header.jsp"></put-attribute>
+ <put-attribute name="body" value=""></put-attribute>
+ <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp"></put-attribute>
+ </definition>
+
+ <definition name="ebz_template_raptor" template="/WEB-INF/fusion/jsp/ebz_template_raptor.jsp">
+ <put-attribute name="title" value=""></put-attribute>
+ <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header_raptor.jsp"></put-attribute>
+ <put-attribute name="body" value=""></put-attribute>
+ <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer_raptor.jsp"></put-attribute>
+ </definition>
+
+ <definition name="ebz_template_noheader_nofooter" template="/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp">
+ <put-attribute name="body" value=""></put-attribute>
+ </definition>
+
+ <definition name="ebz_template_report_embedded"
+ template="/WEB-INF/fusion/jsp/ebz/ebz_template_report_embedded.jsp">
+ <put-attribute name="body" value=""></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="user_profile">
+ <put-attribute name="body" value="/WEB-INF/jsp/user_profile.jsp"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="profile_search">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile_search.jsp"></put-attribute>
+ <put-attribute name="viewName" value="profile_search"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="profile">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile.jsp"></put-attribute>
+ <put-attribute name="viewName" value="profile"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="menu">
+ <put-attribute name="body" value="/WEB-INF/jsp/menu.jsp"></put-attribute>
+ <put-attribute name="viewName" value="menu"></put-attribute>
+ </definition>
+
+
+ <definition extends="ebz_template" name="welcome">
+ <put-attribute name="body" value="/WEB-INF/jsp/welcome.jsp"></put-attribute>
+ <put-attribute name="viewName" value="welcome"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="role_list">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_list.jsp"></put-attribute>
+ <put-attribute name="viewName" value="role_list"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="role">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/role.jsp"></put-attribute>
+ <put-attribute name="viewName" value="role"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="role_function_list">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_function_list.jsp"></put-attribute>
+ <put-attribute name="viewName" value="role_function_list"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="post_search">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/post_search.jsp"></put-attribute>
+ <put-attribute name="viewName" value="post_search"></put-attribute>
+ </definition>
+
+ <definition name="error" template="/WEB-INF/jsp/error.jsp"/>
+
+ <definition name="report" template="/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html" />
+
+ <definition extends="ebz_template" name="report_wizard">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/report_wizard.jsp"></put-attribute>
+ <put-attribute name="viewName" value="report_wizard"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template_report_embedded" name="report_embedded">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/report_ebz_embedded.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template" name="report_sample">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/report_sample.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="test_run_sql">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/test_run_sql.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="date_start_field_run_sql">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/date_start_field_run_sql.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="date_end_field_run_sql">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/date_end_field_run_sql.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="test_field_run_sql">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/test_field_run_sql.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="default_field_run_sql">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/default_field_run_sql.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="popup_testrun_sql">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/popup_testrun_sql.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="popup_semaphore">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/popup_semaphore.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="popup_import_semaphore">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/popup_import_semaphore.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="popup_table_cols">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/popup_table_cols.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="popup_drill_down_report">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/popup_drill_down_report.jsp"></put-attribute>
+ </definition>
+ <definition extends="ebz_template_noheader_nofooter" name="popup_sql">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/popup_sql.jsp"></put-attribute>
+ </definition>
+
+ <definition name="raptor/error_page.jsp" template="/WEB-INF/fusion/raptor/error_page.jsp"/>
+
+ <definition extends="ebz_template_raptor" name="wizard_schedule_only">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/wizard_schedule_only.jsp"></put-attribute>
+ <put-attribute name="viewName" value="wizard_schedule_only"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="report_import">
+ <put-attribute name="body"
+ value="/WEB-INF/fusion/raptor/report_import.jsp"></put-attribute>
+ <put-attribute name="viewName" value="report_import"></put-attribute>
+ </definition>
+
+ <definition name="data_out" template="/WEB-INF/fusion/jsp/data_out.jsp" />
+ <definition extends="ebz_template" name="collaborate_list">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/collaborateList.jsp"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="jcs_admin">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/jcs_admin.jsp"></put-attribute>
+ <put-attribute name="viewName" value="jcs_admin"></put-attribute>
+ </definition>
+
+ <definition extends="ebz_template" name="usage_list">
+ <put-attribute name="body" value="/WEB-INF/fusion/jsp/usage_list.jsp"></put-attribute>
+ <put-attribute name="viewName" value="usage_list"></put-attribute>
+ </definition>
+
+ <definition name="collaboration" template="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"/>
+
+</tiles-definitions>
diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml
index bda281c2..84f7b7ed 100644
--- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml
+++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml
@@ -621,7 +621,8 @@
select user_id, notification_id, is_for_online_users, is_for_all_roles, msg_header, msg_description,msg_source,start_Time, end_time, priority, created_date, creator_ID,active_YN
from
(
- select a.*, b.role_id,b.recv_user_id
+ select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN,
+ a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date,b.role_id,b.recv_user_id
from ep_notification a, ep_role_notification b
where a.notification_id = b.notification_id
and (end_time is null || SYSDATE() <= end_time )
@@ -639,7 +640,23 @@
)b
where
(
- a.role_id = b.role_id||a.recv_user_id=:user_id
+ a.role_id = b.role_id
+ )
+ union
+ select :user_id, notification_id, is_for_online_users, is_for_all_roles, msg_header, msg_description,msg_source,start_Time, end_time, priority, created_date, creator_ID,active_YN
+ from
+ (
+ select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN,
+ a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date, b.role_id,b.recv_user_id
+ from ep_notification a, ep_role_notification b
+ where a.notification_id = b.notification_id
+ and (end_time is null || SYSDATE() <= end_time )
+ and (start_time is null || SYSDATE() >= start_time)
+ and a.is_for_all_roles = 'N'
+ ) a
+ where
+ (
+ a.recv_user_id=:user_id
)
union
(
@@ -656,9 +673,9 @@
and
not exists
(
- select * from ep_user_notification m where user_id = :user_id and m.notification_id = a.notification_id and is_viewed = 'Y'
+ select ID,User_ID,notification_ID,is_viewed,updated_time from ep_user_notification m where user_id = :user_id and m.notification_id = a.notification_id and is_viewed = 'Y'
)
- order by priority desc, start_Time desc,created_date desc
+ order by priority desc, created_date desc,start_Time desc
) t,
@@ -682,7 +699,8 @@
<return alias="adminNotificationHistoryVOResult"
class="org.openecomp.portalapp.portal.transport.EpNotificationItemVO" />
<![CDATA[
- SELECT
+ SELECT * from (
+SELECT
n.notification_ID AS notificationId,
n.is_for_online_users AS isForOnlineUsers,
n.is_for_all_roles AS isForAllRoles,
@@ -701,7 +719,33 @@
LEFT JOIN
fn_user u on u.user_id = n.creator_id
WHERE
- n.active_YN='Y' order by n.start_time desc
+ n.active_YN='Y' and msg_source='EP'
+
+ UNION
+
+ SELECT
+ n.notification_ID AS notificationId,
+ n.is_for_online_users AS isForOnlineUsers,
+ n.is_for_all_roles AS isForAllRoles,
+ n.active_YN AS activeYn,
+ n.msg_header AS msgHeader,
+ n.msg_description AS msgDescription,
+ n.msg_source AS msgSource,
+ n.start_Time AS startTime,
+ n.end_time AS endTime,
+ n.priority,
+ n.creator_ID AS creatorId,
+ n.created_date AS createdDate,
+ u.org_user_id AS loginId
+ FROM
+ ep_notification n
+ LEFT JOIN
+ fn_user u on u.user_id = n.creator_id
+ JOIN
+ ep_role_notification r on r.notification_ID=n.notification_ID
+ WHERE
+ n.active_YN='Y' and r.recv_user_id = :user_id and msg_source!='EP'
+ )n order by n.startTime desc
]]>
</sql-query>
@@ -757,7 +801,9 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
creator_ID,active_YN
from
(
- select a.*, b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id
+ select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN,
+ a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date,
+ b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id
ELSE NULL
END AS login_id,b.recv_user_id
@@ -785,8 +831,38 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
) b
where
(
- a.role_id = b.role_id||a.recv_user_id=:user_id
+ a.role_id = b.role_id
)
+ UNION
+ select
+ :user_id, login_id,notification_id, is_for_online_users, is_for_all_roles,
+ msg_header, msg_description,msg_source, start_Time, end_time, priority, created_date,
+ creator_ID,active_YN
+ from
+ (
+ select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN,
+ a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date,
+ b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id
+
+ ELSE NULL
+ END AS login_id,b.recv_user_id
+ from ep_notification a, ep_role_notification b,fn_user u
+ where a.notification_id = b.notification_id and (u.user_id=a.creator_ID OR a.creator_ID IS NULL)
+ and a.is_for_all_roles = 'N'
+ and (
+ (start_time is null and end_time is null and a.created_date >= DATE_ADD(curdate(),INTERVAL-31 DAY))
+ or
+ (start_time is not null and end_time is null and start_time >= DATE_ADD(curdate(),INTERVAL -31 DAY))
+ or
+ (start_time is null and end_time is not null and end_time >= DATE_ADD(curdate(),INTERVAL -31 DAY))
+ or
+ (start_time is not null and end_time is not null and end_time >= DATE_ADD(curdate(),INTERVAL -31 DAY))
+ )
+ ) a
+ where
+ (
+ a.recv_user_id=:user_id
+ )
union
(
select
@@ -973,6 +1049,20 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
]]>
</sql-query>
+ <sql-query name="getAppsAdmins">
+ <return alias="adminUserApp" class="org.openecomp.portalapp.portal.domain.AdminUserApp" />
+ <![CDATA[
+ SELECT apps.APP_NAME, apps.APP_ID, user.USER_ID, user.FIRST_NAME, user.LAST_NAME, user.org_user_id FROM fn_user_role userrole INNER JOIN fn_user user ON user.USER_ID = userrole.USER_ID INNER JOIN fn_app apps ON apps.APP_ID = userrole.APP_ID WHERE user.active_yn='Y' AND userrole.ROLE_ID = :accountAdminRoleId AND (apps.ENABLED = 'Y' OR apps.APP_ID=1)
+ ]]>
+ </sql-query>
+
+ <sql-query name="getPortalAdmins">
+ <return alias="portalAdmin" class="org.openecomp.portalapp.portal.transport.PortalAdmin" />
+ <![CDATA[
+ SELECT u.user_id, u.first_name, u.last_name, u.login_id FROM fn_user u, fn_user_role ur WHERE u.active_yn = 'Y' AND u.user_id = ur.user_id AND ur.role_id= :adminRoleId
+ ]]>
+ </sql-query>
+
<!-- Gets personalized list of enabled and accessible apps for regular user -->
<sql-query name="getPersUserApps">
<return alias="persUserApps" class="org.openecomp.portalapp.portal.domain.EPApp" />
@@ -1322,7 +1412,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
<![CDATA[
select
distinct -- multiple roles yield multiple rows
- a.APP_ID as id, a.APP_NAME as name, a.APP_IMAGE_URL as imageUrl,
+ a.APP_ID as id, a.APP_NAME as name, a.ML_APP_NAME as mlAppName, a.APP_IMAGE_URL as imageUrl,
a.APP_DESCRIPTION as description, a.APP_NOTES as notes,
a.APP_URL as url, a.APP_ALTERNATE_URL as alternateUrl,
IF(a.app_type = '2', TRUE, FALSE) as restricted,
@@ -1361,12 +1451,11 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
]]>
</sql-query>
- <sql-query name="getAppDetails">
- <return alias="appDetails" class="org.openecomp.portalapp.portal.domain.EPApp" />
+ <sql-query name="getMyloginAppDetails">
+ <return alias="myloginAppDetails" class="org.openecomp.portalapp.portal.domain.EPApp" />
<![CDATA[
-
- SELECT * FROM fn_app where app_name =:appName
+ SELECT * FROM fn_app where ml_app_name =:appName
;
]]>
</sql-query>
@@ -1374,7 +1463,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
<sql-query name="deleteAccountEndpoint">
<![CDATA[
-
DELETE FROM ep_endpoints_basic_auth_account WHERE account_id =:accountId
;
]]>
@@ -1382,7 +1470,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
<sql-query name="deleteAccountEndpointRecord">
<![CDATA[
-
DELETE FROM ep_endpoints_basic_auth_account WHERE account_id =:accountId AND ep_id =:epId
;
]]>
@@ -1390,7 +1477,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
<sql-query name="deleteEPEndpoint">
<![CDATA[
-
DELETE FROM ep_endpoints WHERE id =:epId
;
]]>
@@ -1398,7 +1484,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
<sql-query name="deleteBasicAuthAccount">
<![CDATA[
-
DELETE FROM ep_basic_auth_account WHERE id =:accountId
;
]]>
@@ -1408,12 +1493,20 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
<return alias="appRoles" class="org.openecomp.portalapp.portal.domain.EPRole" />
<![CDATA[
-
SELECT * FROM fn_role where role_name =:roleName and app_id =:appId
;
]]>
</sql-query>
-
+
+ <sql-query name="getPortalAppRoles">
+ <return alias="appRoles" class="org.openecomp.portalapp.portal.domain.EPRole" />
+
+ <![CDATA[
+
+ SELECT * FROM fn_role where role_name =:appRoleName and app_id is null
+ ;
+ ]]>
+ </sql-query>
<sql-query name="deleteMicroserviceParameter">
<![CDATA[
@@ -1523,7 +1616,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
<![CDATA[
select
distinct -- multiple roles yield multiple rows
- a.APP_ID as id, a.APP_NAME as name, a.APP_IMAGE_URL as imageUrl,
+ a.APP_ID as id, a.APP_NAME as name, a.ML_APP_NAME as mlAppName, a.APP_IMAGE_URL as imageUrl,
a.APP_DESCRIPTION as description, a.APP_NOTES as notes,
a.APP_URL as url, a.APP_ALTERNATE_URL as alternateUrl,
IF(a.app_type = '2', TRUE, FALSE) as restricted,
@@ -1540,6 +1633,8 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
case
-- regular app, user has a role, no personalization
when a.OPEN = 'N' and r.ROLE_ID is not null and p.STATUS_CD is null then TRUE
+ -- regular app, user has role, admin forced a personalization
+ when a.OPEN = 'N' and r.ROLE_ID is not null and p.STATUS_CD = 'S' then TRUE
-- regular app, user has no role, admin forced a personalization
when a.OPEN = 'N' and r.ROLE_ID is null and p.STATUS_CD = 'S' then TRUE
-- open app and has personalization
@@ -1591,5 +1686,30 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
]]>
</sql-query>
+
+ <!--delete the records from ep_notification table when the endtime is more than 3 months-->
+ <sql-query name="deleteNotificationsFromEpNotificationTable">
+
+ <![CDATA[
+ delete from ep_notification where curdate() >= DATE_ADD(end_time,INTERVAL 3 MONTH)
+ ]]>
+ </sql-query>
+
+
+ <!-- delete the records from ep_role_notification table when the endtime is more than 3 months -->
+ <sql-query name="deleteNotificationsFromEpRoleNotificationTable">
+
+ <![CDATA[
+ delete from ep_role_notification where notification_id in (select notification_id from ep_notification where curdate() >= DATE_ADD(end_time,INTERVAL 3 MONTH))
+ ]]>
+ </sql-query>
+
+ <!-- delete the records from ep_user_notification table when the endtime is more than 3 months-->
+ <sql-query name="deleteNotificationsFromEpUserNotificationTable">
+
+ <![CDATA[
+ delete from ep_user_notification where notification_id in (select notification_id from ep_notification where curdate() >= DATE_ADD(end_time,INTERVAL 3 MONTH))
+ ]]>
+ </sql-query>
</hibernate-mapping>
diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml
index f6d22a27..c1d6fa17 100644
--- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml
+++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml
@@ -1,335 +1,335 @@
-<?xml version="1.0"?>
-<!--
- ================================================================================
- ECOMP Portal
- ================================================================================
- Copyright (C) 2017 AT&T 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.
- ================================================================================
- -->
-
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<!--
-Publishes mappings and queries for EP SDK library features ONLY.
-Portal app mappings and features are in EP.hbm.xml.
--->
-<hibernate-mapping package="org.openecomp.portalsdk.core.domain">
-
- <!-- User class mapping details -->
- <class name="User" table="FN_USER">
- <id name="id" column="user_id" >
- <generator class="native">
- <param name="sequence">seq_fn_user</param>
- </generator>
- </id>
-
- <property name="orgId" column="org_id"/>
- <property name="managerId" column="manager_id"/>
- <property name="firstName" column="first_name"/>
- <property name="middleInitial" column="middle_name"/>
- <property name="lastName" column="last_name"/>
- <property name="phone" column="phone"/>
- <property name="fax" column="fax"/>
- <property name="cellular" column="cellular"/>
- <property name="email" column="email"/>
- <property name="addressId" column="address_id"/>
- <property name="alertMethodCd" column="alert_method_cd"/>
-
- <property name="address1" column="address_line_1"/>
- <property name="address2" column="address_line_2"/>
- <property name="city" column="city"/>
- <property name="state" column="state_cd"/>
- <property name="zipCode" column="zip_code"/>
- <property name="country" column="country_cd"/>
-
- <property name="hrid" column="hrid"/>
- <property name="orgUserId" column="org_user_id"/>
- <property name="orgCode" column="org_code"/>
- <property name="loginId" column="login_id"/>
- <property name="loginPwd" column="login_pwd"/>
- <property name="lastLoginDate" column="last_login_date" type="timestamp"/>
-
- <property name="locationClli" column="location_clli" />
- <property name="orgManagerUserId" column="org_manager_userid" />
- <property name="company" column="company" />
- <property name="department" column="department" />
- <property name="departmentName" column="department_name" />
- <property name="businessUnit" column="business_unit" />
- <property name="businessUnitName" column="business_unit_name" />
- <property name="jobTitle" column="job_title" />
- <property name="siloStatus" column="silo_status" />
- <property name="financialLocCode" column="fin_loc_code" />
-
- <property name="active" column="active_yn" type="yes_no"/>
- <property name="internal" column="is_internal_yn" type="yes_no"/>
-
- <property name="created" type="timestamp" column="created_date" />
- <property name="modified" type="timestamp" column="modified_date" />
-
- <property name="createdId" column="created_id" />
- <property name="modifiedId" column="modified_id" />
- <property name="timeZoneId" column="timezone" />
-
- <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" />
- </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" />
- </set>
- </class>
-
- <class name="UserApp" table="fn_user_role">
- <composite-id>
- <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" />
- </composite-id>
- <property name="priority" type="java.lang.Short">
- <column name="priority" precision="4" scale="0" />
- </property>
- </class>
-
- <!-- User App class mapping details -->
- <class name="App" table="fn_app">
- <id name="id" column="app_id"/>
- <property name="name" column="app_name"/>
- <property name="appPassword" column="app_password"/>
- <property name="username" column="app_username"/>
-
- </class>
-
- <!-- User Role class mapping details -->
- <class name="Role" table="FN_ROLE_V">
- <id name="id" column="role_id">
- <generator class="native">
- <param name="sequence">seq_fn_role</param>
- </generator>
- </id>
-
- <property name="name" column="role_name"/>
- <property name="priority" column="priority" />
- <property name="active" column="active_yn" type="yes_no"/>
-
- <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"/>
- </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"/>
- </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"/>
- </set>
-
- </class>
-
-
-
- <!-- User Role Function class mapping details -->
- <class name="RoleFunction" table="FN_FUNCTION">
- <id name="code" column="function_cd" />
- <property name="name" column="function_name" />
- </class>
-
- <!-- Menu class mapping details -->
- <class name="Menu" table="FN_MENU">
- <id name="id" column="menu_id">
- <generator class="native">
- <param name="sequence">seq_fn_menu</param>
- </generator>
- </id>
-
- <property name="menuLevel" column="level-1"/>
- <property name="label" column="label"/>
- <property name="parentId" column="parent_id"/>
- <property name="action" column="action"/>
- <property name="functionCd" column="function_cd"/>
- <property name="sortOrder" column="sort_order"/>
- <property name="servlet" column="servlet"/>
- <property name="queryString" column="query_string"/>
- <property name="externalUrl" column="external_url"/>
- <property name="target" column="target"/>
- <property name="active" column="active_yn" type="yes_no"/>
- <property name="separator" column="separator_yn" type="yes_no"/>
- <property name="imageSrc" column="image_src" />
- </class>
-
- <class name="MenuData" table="FN_MENU">
- <!-- <id name="id" column="menu_id"/> -->
- <id name="id" column="menu_id">
- <generator class="native">
- <param name="sequence">seq_fn_menu</param>
- </generator>
- </id>
- <property name="label" column="label"/>
- <property name="action" column="action"/>
- <property name="functionCd" column="function_cd"/>
- <property name="sortOrder" column="sort_order"/>
- <property name="servlet" column="servlet"/>
- <property name="queryString" column="query_string"/>
- <property name="externalUrl" column="external_url"/>
- <property name="target" column="target"/>
- <property name="active" column="active_yn" type="yes_no"/>
- <property name="separator" column="separator_yn" type="yes_no"/>
- <property name="imageSrc" column="image_src" />
- <property name="menuSetCode" column="menu_set_cd" />
-
- <many-to-one name="parentMenu" column="parent_id" class="MenuData"/>
-
- <set name="childMenus" lazy="false" sort="natural" inverse="true" where="active_yn = 'Y'">
- <key column="parent_id"/>
- <one-to-many class="MenuData"/>
- </set>
- </class>
-
- <!-- Broadcast Message class mapping details -->
- <class name="BroadcastMessage" table="fn_broadcast_message">
- <id name="id" column="message_id">
- <generator class="native">
- <param name="sequence">seq_fn_broadcast_message</param>
- </generator>
- </id>
- <property name="messageText" column="message_text"/>
- <property name="locationId" column="message_location_id"/>
-
- <property name="startDate" column="broadcast_start_date" type="timestamp"/>
- <property name="endDate" column="broadcast_end_date" type="timestamp"/>
-
- <property name="sortOrder" column="sort_order"/>
- <property name="active" column="active_yn" type="yes_no"/>
-
- <property name="siteCd" column="broadcast_site_cd" />
- </class>
-
- <!-- State Lookup class mapping details -->
- <class name="LuState" table="FN_LU_STATE">
- <id name="abbr" column="state_cd" />
- <property name="state" />
- </class>
-
- <!-- Country Lookup class mapping details -->
- <class name="LuCountry" table="FN_LU_COUNTRY">
- <id name="abbr" column="country_cd" />
- <property name="country" />
- <property name="fullName" column="full_name" />
- <property name="webphoneCountryLabel" column="fullwebphone_country_label_name" />
- </class>
-
- <class name="LuTimeZone" table="FN_LU_TIMEZONE">
- <id name="timezoneId" column="timezone_id" />
- <property name="name" column="timezone_name" />
- <property name="value" column="timezone_value" />
- </class>
-
- <!-- Audit Log class mapping details -->
- <class name="AuditLog" table="fn_audit_log">
- <id name="id" column="log_id">
- <generator class="native">
- <param name="sequence">seq_fn_audit_log</param>
- </generator>
- </id>
- <property name="activityCode" column="activity_cd"/>
- <property name="affectedRecordId" column="affected_record_id" />
- <property name="comments" column="comments" />
- <property name="userId" column="user_id" />
- </class>
-
- <!-- Lookup (id/value bean) class mapping details -->
- <class name="Lookup">
- <composite-id name="nameValueId" class="org.openecomp.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">
- <key-property name="url" column="url"/>
- <key-property name="functionCd" column="function_cd"/>
- </composite-id>
- </class>
-
- <query name="functionCDlist">
- select distinct functionCd from MenuData
- </query>
-
- <query name="menuData">
- from MenuData where menuSetCode = :menu_set_cd and parentMenu is null
- </query>
- <query name="restrictedUrls">
- FROM UrlsAccessible A where upper(A.urlsAccessibleKey.url) = upper(:current_url)
- </query>
-
- <query name="getUserNameById">
- select firstName, lastName from User where id = :user_id
- </query>
-
- <query name="getUserEmail">
- select email from User where id = :user_id
- </query>
-
- <query name="getAllUsers">
- select id, firstName, lastName from User where active = true order by lastName, firstName
- </query>
-
- <query name="getRoleNameById">
- select name from Role where id = :role_id
- </query>
-
- <query name="getAllRoles">
- select id, name from Role order by name
- </query>
-
- <sql-query name="getBytesPublishedDelivered">
- <return-scalar column="Published" type="java.lang.String"/>
- <return-scalar column="Delivered" type="java.lang.String"/>
- <![CDATA[
- select concat(Round(sum(bytespublished)/(1024*1024*1024*1024), 0), ' Pb') 'Published', concat(Round(sum(bytesdelivered)/(1024*1024*1024*1024), 0), ' Pb') ' Delivered' from kpi_drvolumes where day = (select max(day) from kpi_drvolumes)
- ]]>
- </sql-query>
-
- <sql-query name="getDataRouterFeedStats">
- <return-scalar column="TOTAL_FEEDS" type="java.lang.Long"/>
- <return-scalar column="ACTIVE_FEEDS" type="java.lang.Long"/>
- <return-scalar column="ACTIVE_SUBS" type="java.lang.Long"/>
- <![CDATA[
- SELECT SUM(TOTALFEEDS) TOTAL_FEEDS, SUM(ACTIVEFEEDS) ACTIVE_FEEDS, SUM(ACTIVESUBS) ACTIVE_SUBS FROM kpi_drsumm where day = (select max(day) from kpi_drvolumes)
- ]]>
- </sql-query>
-
- <sql-query name="getLOCStatsCat">
- <![CDATA[
- select CATEGORY1 CATEGORY from demo_kpi_sourcecode_stats group by category1
- ]]>
- </sql-query>
-
- <sql-query name="getLOCStats">
- <![CDATA[
- select sum(total_lines) TOTAL_LINES from demo_kpi_sourcecode_stats group by category1
- ]]>
- </sql-query>
-
-</hibernate-mapping>
+<?xml version="1.0"?>
+<!--
+ ================================================================================
+ ECOMP Portal
+ ================================================================================
+ Copyright (C) 2017 AT&T 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.
+ ================================================================================
+ -->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+Publishes mappings and queries for EP SDK library features ONLY.
+Portal app mappings and features are in EP.hbm.xml.
+-->
+<hibernate-mapping package="org.openecomp.portalsdk.core.domain">
+
+ <!-- User class mapping details -->
+ <class name="User" table="FN_USER">
+ <id name="id" column="user_id" >
+ <generator class="native">
+ <param name="sequence">seq_fn_user</param>
+ </generator>
+ </id>
+
+ <property name="orgId" column="org_id"/>
+ <property name="managerId" column="manager_id"/>
+ <property name="firstName" column="first_name"/>
+ <property name="middleInitial" column="middle_name"/>
+ <property name="lastName" column="last_name"/>
+ <property name="phone" column="phone"/>
+ <property name="fax" column="fax"/>
+ <property name="cellular" column="cellular"/>
+ <property name="email" column="email"/>
+ <property name="addressId" column="address_id"/>
+ <property name="alertMethodCd" column="alert_method_cd"/>
+
+ <property name="address1" column="address_line_1"/>
+ <property name="address2" column="address_line_2"/>
+ <property name="city" column="city"/>
+ <property name="state" column="state_cd"/>
+ <property name="zipCode" column="zip_code"/>
+ <property name="country" column="country_cd"/>
+
+ <property name="hrid" column="hrid"/>
+ <property name="orgUserId" column="org_user_id"/>
+ <property name="orgCode" column="org_code"/>
+ <property name="loginId" column="login_id"/>
+ <property name="loginPwd" column="login_pwd"/>
+ <property name="lastLoginDate" column="last_login_date" type="timestamp"/>
+
+ <property name="locationClli" column="location_clli" />
+ <property name="orgManagerUserId" column="org_manager_userid" />
+ <property name="company" column="company" />
+ <property name="department" column="department" />
+ <property name="departmentName" column="department_name" />
+ <property name="businessUnit" column="business_unit" />
+ <property name="businessUnitName" column="business_unit_name" />
+ <property name="jobTitle" column="job_title" />
+ <property name="siloStatus" column="silo_status" />
+ <property name="financialLocCode" column="fin_loc_code" />
+
+ <property name="active" column="active_yn" type="yes_no"/>
+ <property name="internal" column="is_internal_yn" type="yes_no"/>
+
+ <property name="created" type="timestamp" column="created_date" />
+ <property name="modified" type="timestamp" column="modified_date" />
+
+ <property name="createdId" column="created_id" />
+ <property name="modifiedId" column="modified_id" />
+ <property name="timeZoneId" column="timezone" />
+
+ <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" />
+ </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" />
+ </set>
+ </class>
+
+ <class name="UserApp" table="fn_user_role">
+ <composite-id>
+ <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" />
+ </composite-id>
+ <property name="priority" type="java.lang.Short">
+ <column name="priority" precision="4" scale="0" />
+ </property>
+ </class>
+
+ <!-- User App class mapping details -->
+ <class name="App" table="fn_app">
+ <id name="id" column="app_id"/>
+ <property name="name" column="app_name"/>
+ <property name="appPassword" column="app_password"/>
+ <property name="username" column="app_username"/>
+
+ </class>
+
+ <!-- User Role class mapping details -->
+ <class name="Role" table="FN_ROLE_V">
+ <id name="id" column="role_id">
+ <generator class="native">
+ <param name="sequence">seq_fn_role</param>
+ </generator>
+ </id>
+
+ <property name="name" column="role_name"/>
+ <property name="priority" column="priority" />
+ <property name="active" column="active_yn" type="yes_no"/>
+
+ <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"/>
+ </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"/>
+ </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"/>
+ </set>
+
+ </class>
+
+
+
+ <!-- User Role Function class mapping details -->
+ <class name="RoleFunction" table="FN_FUNCTION">
+ <id name="code" column="function_cd" />
+ <property name="name" column="function_name" />
+ </class>
+
+ <!-- Menu class mapping details -->
+ <class name="Menu" table="FN_MENU">
+ <id name="id" column="menu_id">
+ <generator class="native">
+ <param name="sequence">seq_fn_menu</param>
+ </generator>
+ </id>
+
+ <property name="menuLevel" column="level-1"/>
+ <property name="label" column="label"/>
+ <property name="parentId" column="parent_id"/>
+ <property name="action" column="action"/>
+ <property name="functionCd" column="function_cd"/>
+ <property name="sortOrder" column="sort_order"/>
+ <property name="servlet" column="servlet"/>
+ <property name="queryString" column="query_string"/>
+ <property name="externalUrl" column="external_url"/>
+ <property name="target" column="target"/>
+ <property name="active" column="active_yn" type="yes_no"/>
+ <property name="separator" column="separator_yn" type="yes_no"/>
+ <property name="imageSrc" column="image_src" />
+ </class>
+
+ <class name="MenuData" table="FN_MENU">
+ <!-- <id name="id" column="menu_id"/> -->
+ <id name="id" column="menu_id">
+ <generator class="native">
+ <param name="sequence">seq_fn_menu</param>
+ </generator>
+ </id>
+ <property name="label" column="label"/>
+ <property name="action" column="action"/>
+ <property name="functionCd" column="function_cd"/>
+ <property name="sortOrder" column="sort_order"/>
+ <property name="servlet" column="servlet"/>
+ <property name="queryString" column="query_string"/>
+ <property name="externalUrl" column="external_url"/>
+ <property name="target" column="target"/>
+ <property name="active" column="active_yn" type="yes_no"/>
+ <property name="separator" column="separator_yn" type="yes_no"/>
+ <property name="imageSrc" column="image_src" />
+ <property name="menuSetCode" column="menu_set_cd" />
+
+ <many-to-one name="parentMenu" column="parent_id" class="MenuData"/>
+
+ <set name="childMenus" lazy="false" sort="natural" inverse="true" where="active_yn = 'Y'">
+ <key column="parent_id"/>
+ <one-to-many class="MenuData"/>
+ </set>
+ </class>
+
+ <!-- Broadcast Message class mapping details -->
+ <class name="BroadcastMessage" table="fn_broadcast_message">
+ <id name="id" column="message_id">
+ <generator class="native">
+ <param name="sequence">seq_fn_broadcast_message</param>
+ </generator>
+ </id>
+ <property name="messageText" column="message_text"/>
+ <property name="locationId" column="message_location_id"/>
+
+ <property name="startDate" column="broadcast_start_date" type="timestamp"/>
+ <property name="endDate" column="broadcast_end_date" type="timestamp"/>
+
+ <property name="sortOrder" column="sort_order"/>
+ <property name="active" column="active_yn" type="yes_no"/>
+
+ <property name="siteCd" column="broadcast_site_cd" />
+ </class>
+
+ <!-- State Lookup class mapping details -->
+ <class name="LuState" table="FN_LU_STATE">
+ <id name="abbr" column="state_cd" />
+ <property name="state" />
+ </class>
+
+ <!-- Country Lookup class mapping details -->
+ <class name="LuCountry" table="FN_LU_COUNTRY">
+ <id name="abbr" column="country_cd" />
+ <property name="country" />
+ <property name="fullName" column="full_name" />
+ <property name="webphoneCountryLabel" column="fullwebphone_country_label_name" />
+ </class>
+
+ <class name="LuTimeZone" table="FN_LU_TIMEZONE">
+ <id name="timezoneId" column="timezone_id" />
+ <property name="name" column="timezone_name" />
+ <property name="value" column="timezone_value" />
+ </class>
+
+ <!-- Audit Log class mapping details -->
+ <class name="AuditLog" table="fn_audit_log">
+ <id name="id" column="log_id">
+ <generator class="native">
+ <param name="sequence">seq_fn_audit_log</param>
+ </generator>
+ </id>
+ <property name="activityCode" column="activity_cd"/>
+ <property name="affectedRecordId" column="affected_record_id" />
+ <property name="comments" column="comments" />
+ <property name="userId" column="user_id" />
+ </class>
+
+ <!-- Lookup (id/value bean) class mapping details -->
+ <class name="Lookup">
+ <composite-id name="nameValueId" class="org.openecomp.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">
+ <key-property name="url" column="url"/>
+ <key-property name="functionCd" column="function_cd"/>
+ </composite-id>
+ </class>
+
+ <query name="functionCDlist">
+ select distinct functionCd from MenuData
+ </query>
+
+ <query name="menuData">
+ from MenuData where menuSetCode = :menu_set_cd and parentMenu is null
+ </query>
+ <query name="restrictedUrls">
+ FROM UrlsAccessible A where upper(A.urlsAccessibleKey.url) = upper(:current_url)
+ </query>
+
+ <query name="getUserNameById">
+ select firstName, lastName from User where id = :user_id
+ </query>
+
+ <query name="getUserEmail">
+ select email from User where id = :user_id
+ </query>
+
+ <query name="getAllUsers">
+ select id, firstName, lastName from User where active = true order by lastName, firstName
+ </query>
+
+ <query name="getRoleNameById">
+ select name from Role where id = :role_id
+ </query>
+
+ <query name="getAllRoles">
+ select id, name from Role order by name
+ </query>
+
+ <sql-query name="getBytesPublishedDelivered">
+ <return-scalar column="Published" type="java.lang.String"/>
+ <return-scalar column="Delivered" type="java.lang.String"/>
+ <![CDATA[
+ select concat(Round(sum(bytespublished)/(1024*1024*1024*1024), 0), ' Pb') 'Published', concat(Round(sum(bytesdelivered)/(1024*1024*1024*1024), 0), ' Pb') ' Delivered' from kpi_drvolumes where day = (select max(day) from kpi_drvolumes)
+ ]]>
+ </sql-query>
+
+ <sql-query name="getDataRouterFeedStats">
+ <return-scalar column="TOTAL_FEEDS" type="java.lang.Long"/>
+ <return-scalar column="ACTIVE_FEEDS" type="java.lang.Long"/>
+ <return-scalar column="ACTIVE_SUBS" type="java.lang.Long"/>
+ <![CDATA[
+ SELECT SUM(TOTALFEEDS) TOTAL_FEEDS, SUM(ACTIVEFEEDS) ACTIVE_FEEDS, SUM(ACTIVESUBS) ACTIVE_SUBS FROM kpi_drsumm where day = (select max(day) from kpi_drvolumes)
+ ]]>
+ </sql-query>
+
+ <sql-query name="getLOCStatsCat">
+ <![CDATA[
+ select CATEGORY1 CATEGORY from demo_kpi_sourcecode_stats group by category1
+ ]]>
+ </sql-query>
+
+ <sql-query name="getLOCStats">
+ <![CDATA[
+ select sum(total_lines) TOTAL_LINES from demo_kpi_sourcecode_stats group by category1
+ ]]>
+ </sql-query>
+
+</hibernate-mapping>
diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml
index 9a853e7f..b1ea7a4a 100644
--- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml
+++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml
@@ -1,48 +1,48 @@
-<?xml version="1.0"?>
-<!--
- ================================================================================
- ECOMP Portal
- ================================================================================
- Copyright (C) 2017 AT&T 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.
- ================================================================================
- -->
-
-<!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">
-
-
- <!-- WorkflowSchedule mapping details -->
- <class name="WorkflowSchedule" table="fn_schedule_workflows">
- <id name="id" column="id_schedule_workflows">
- <generator class="native">
- </generator>
- </id>
-
- <property name="serverUrl" column="workflow_server_url"/>
- <property name="workflowKey" column="workflow_key"/>
- <property name="arguments" column="workflow_arguments"/>
- <property name="cronDetails" column="startDateTimeCron"/>
- <property name="startDateTime" column="start_date_time"/>
- <property name="endDateTime" column="endDateTime"/>
- <property name="recurrence" column="recurrence"/>
-
- </class>
-
-
-
-</hibernate-mapping>
+<?xml version="1.0"?>
+<!--
+ ================================================================================
+ ECOMP Portal
+ ================================================================================
+ Copyright (C) 2017 AT&T 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.
+ ================================================================================
+ -->
+
+<!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">
+
+
+ <!-- WorkflowSchedule mapping details -->
+ <class name="WorkflowSchedule" table="fn_schedule_workflows">
+ <id name="id" column="id_schedule_workflows">
+ <generator class="native">
+ </generator>
+ </id>
+
+ <property name="serverUrl" column="workflow_server_url"/>
+ <property name="workflowKey" column="workflow_key"/>
+ <property name="arguments" column="workflow_arguments"/>
+ <property name="cronDetails" column="startDateTimeCron"/>
+ <property name="startDateTime" column="start_date_time"/>
+ <property name="endDateTime" column="endDateTime"/>
+ <property name="recurrence" column="recurrence"/>
+
+ </class>
+
+
+
+</hibernate-mapping>