From fe90c47edd026adfb4341a0a31f79ea7345f62ec Mon Sep 17 00:00:00 2001 From: JhonSGIzquierdo Date: Mon, 26 Feb 2024 15:01:34 -0500 Subject: [PATCH 1/3] Revert ":wrench: chore(Responsive): Update dates of files ftl" This reverts commit 341ab5bc19b33b5f8b71d804d884e732dd96543c. --- .../src/main/webapp/WEB-INF/crp/views/home/dashboard.ftl | 4 ++-- .../main/webapp/WEB-INF/crp/views/projects/projectsList.ftl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/home/dashboard.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/home/dashboard.ftl index 87ed03b8bf..e04c3d2961 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/home/dashboard.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/home/dashboard.ftl @@ -3,12 +3,12 @@ [#assign currentSectionString = "${actionName?replace('/','-')}-phase-${(actualPhase.id)!}" /] [#assign pageLibs = ["jQuery-Timelinr","cytoscape","cytoscape-panzoom","cytoscape-qtip","qtip2","datatables.net", "datatables.net-bs"] /] [#assign customJS = [ - "${baseUrlMedia}/js/home/dashboard.js?20240226", + "${baseUrlMedia}/js/home/dashboard.js?20230824", "${baseUrlCdn}/global/js/impactGraphic.js" ] /] [#assign customCSS = [ - "${baseUrlMedia}/css/home/dashboard.css?20240226", + "${baseUrlMedia}/css/home/dashboard.css?20240201", "${baseUrlCdn}/global/css/customDataTable.css", "${baseUrlCdn}/global/css/impactGraphic.css", "https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectsList.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectsList.ftl index 43af4e7a1a..d06ad8aa35 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectsList.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectsList.ftl @@ -6,12 +6,12 @@ "https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js", "//cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js", "//cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js", - "${baseUrlMedia}/js/projects/projectsList.js?20240226" + "${baseUrlMedia}/js/projects/projectsList.js?20230302" ] /] [#assign customCSS = [ "${baseUrlCdn}/global/css/customDataTable.css", - "${baseUrlMedia}/css/projects/projectsList.css?20240226"] + "${baseUrlMedia}/css/projects/projectsList.css?20230724"] /] [#if !action.isAiccra()] From 72bd41622b908936c0736acd90bfcc624ddf865f Mon Sep 17 00:00:00 2001 From: JhonSGIzquierdo Date: Mon, 26 Feb 2024 15:03:38 -0500 Subject: [PATCH 2/3] Revert "Merge branch 'aiccra-dev' into aiccra-dev-responsive" This reverts commit 2b3471ce0b7d066791354e552f9bb9c16b9f793c, reversing changes made to d20c58c450a7a5c416a6638750666248ce0c7c9a. --- .../cgiar/ccafs/marlo/config/APConstants.java | 3 - .../DeliverableShfrmPriorityActionDAO.java | 75 -- .../dao/DeliverableShfrmSubActionDAO.java | 75 -- .../data/dao/ShfrmPriorityActionDAO.java | 67 - .../marlo/data/dao/ShfrmSubActionDAO.java | 67 - .../marlo/data/dao/SoilIndicatorDAO.java | 67 - ...eliverableShfrmPriorityActionMySQLDAO.java | 113 -- .../DeliverableShfrmSubActionMySQLDAO.java | 117 -- .../mysql/ShfrmPriorityActionMySQLDAO.java | 89 -- .../dao/mysql/ShfrmSubActionMySQLDAO.java | 88 -- .../data/dao/mysql/SoilIndicatorMySQLDAO.java | 84 -- ...DeliverableShfrmPriorityActionManager.java | 82 -- .../DeliverableShfrmSubActionManager.java | 80 -- .../manager/ShfrmPriorityActionManager.java | 74 -- .../data/manager/ShfrmSubActionManager.java | 74 -- .../data/manager/SoilIndicatorManager.java | 74 -- ...verableShfrmPriorityActionManagerImpl.java | 189 --- .../DeliverableShfrmSubActionManagerImpl.java | 202 --- .../impl/ShfrmPriorityActionManagerImpl.java | 77 -- .../impl/ShfrmSubActionManagerImpl.java | 77 -- .../impl/SoilIndicatorManagerImpl.java | 77 -- .../ccafs/marlo/data/model/Deliverable.java | 83 +- .../marlo/data/model/DeliverableInfo.java | 49 +- .../model/DeliverableShfrmPriorityAction.java | 84 -- .../data/model/DeliverableShfrmSubAction.java | 60 - .../cgiar/ccafs/marlo/data/model/Phase.java | 44 +- .../marlo/data/model/ShfrmPriorityAction.java | 87 -- .../marlo/data/model/ShfrmSubAction.java | 83 -- .../ccafs/marlo/data/model/SoilIndicator.java | 87 -- .../ccafs/marlo/data/model/TipParameters.java | 11 - .../src/main/resources/hibernate.cfg.xml | 5 - .../DeliverableShfrmPriorityActions.hbm.xml | 44 - .../xmls/DeliverableShfrmSubActions.hbm.xml | 36 - .../main/resources/xmls/Deliverables.hbm.xml | 8 - .../resources/xmls/DeliverablesInfo.hbm.xml | 9 - .../src/main/resources/xmls/Phases.hbm.xml | 16 - .../xmls/ShfrmPriorityActions.hbm.xml | 33 - .../resources/xmls/ShfrmSubActions.hbm.xml | 36 - .../resources/xmls/SoilIndicators.hbm.xml | 21 - .../main/resources/xmls/TipParameters.hbm.xml | 3 - .../cgiar/ccafs/marlo/action/BaseAction.java | 69 +- .../crp/admin/ShfrmManagementAction.java | 321 ----- .../action/json/bi/BiReportsTokenAction.java | 2 +- .../project/SubActionsByPriorityAction.java | 102 -- .../tip/TipDinamicUrlGenerationAction.java | 30 +- .../action/projects/DeliverableAction.java | 525 +------- .../superadmin/TIPManagementAction.java | 3 - .../cgiar/ccafs/marlo/config/APConstants.java | 3 - .../projects/DeliverableValidator.java | 122 +- .../main/resources/custom/aicrra.properties | 31 - ...0126_1508__UpdateDeliverablesInfoTable.sql | 2 - ..._1509__CreateShfrmPriorityActionsTable.sql | 15 - ...40126_1510__CreateShfrmSubActionsTable.sql | 17 - ...teDeliverableShfrmPriorityActionsTable.sql | 20 - ..._CreateDeliverableShfrmSubActionsTable.sql | 20 - ...2_6_0_20240202_0728__UpdateShfrmTables.sql | 10 - ...202_0840__AddSpecifityForShfrmFunction.sql | 6 - ...2_0841__CreateShfrmSoilIndicatorsTable.sql | 11 - ...2_1445__UpdateShfrmSoilIndicatorsField.sql | 1 - ...02_1625__UpdateShfrmDeliverablesTables.sql | 2 - ..._UpdateShfrmDeliverablesSubActionTable.sql | 1 - ...240207_0900__UpdateShfrmSubActionTable.sql | 1 - ...frmPriorityActionTableDescriptionField.sql | 1 - ...ateShfrmSubActionTableDescriptionField.sql | 1 - ...240216_1022__UpdateSoilIndicatorsTable.sql | 1 - ..._1415__AddURLfieldinTipParametersTable.sql | 1 - ...40221_1043__UpdateDeliverableInfoTable.sql | 1 - ...40221_1420__CreateContributionARColumn.sql | 1 - .../src/main/resources/global.properties | 33 - marlo-web/src/main/resources/struts-admin.xml | 13 - marlo-web/src/main/resources/struts-json.xml | 8 - .../crp/macros/relationsPopupMacro.ftl | 4 +- .../WEB-INF/crp/views/admin/menu-admin.ftl | 35 - .../crp/views/admin/shfrmManagement.ftl | 215 --- .../crp/views/projects/deliverableInfo.ftl | 24 +- .../crp/views/projects/projectDeliverable.ftl | 7 +- .../WEB-INF/crp/views/tip/tipEmbedded.ftl | 4 +- .../global/macros/deliverableMacros.ftl | 182 +-- .../WEB-INF/global/macros/homeDashboard.ftl | 2 +- .../global/views/superadmin/tipManagement.ftl | 4 - .../crp/css/projects/projectDeliverable.css | 14 - .../webapp/crp/js/admin/shfrmManagement.js | 1183 ----------------- .../projects/deliverables/deliverableInfo.js | 387 +++--- .../projects/deliverables/deliverableShfrm.js | 1105 --------------- .../webapp/crp/js/projects/projectPartners.js | 1 + marlo-web/src/main/webapp/global/js/global.js | 576 ++++---- 86 files changed, 540 insertions(+), 7227 deletions(-) delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmPriorityActionDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmSubActionDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ShfrmPriorityActionDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ShfrmSubActionDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/SoilIndicatorDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmPriorityActionMySQLDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmSubActionMySQLDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/ShfrmPriorityActionMySQLDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/ShfrmSubActionMySQLDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/SoilIndicatorMySQLDAO.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmPriorityActionManager.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmSubActionManager.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ShfrmPriorityActionManager.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ShfrmSubActionManager.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/SoilIndicatorManager.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmPriorityActionManagerImpl.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmSubActionManagerImpl.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/ShfrmPriorityActionManagerImpl.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/ShfrmSubActionManagerImpl.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/SoilIndicatorManagerImpl.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableShfrmPriorityAction.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableShfrmSubAction.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ShfrmPriorityAction.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ShfrmSubAction.java delete mode 100644 marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/SoilIndicator.java delete mode 100644 marlo-data/src/main/resources/xmls/DeliverableShfrmPriorityActions.hbm.xml delete mode 100644 marlo-data/src/main/resources/xmls/DeliverableShfrmSubActions.hbm.xml delete mode 100644 marlo-data/src/main/resources/xmls/ShfrmPriorityActions.hbm.xml delete mode 100644 marlo-data/src/main/resources/xmls/ShfrmSubActions.hbm.xml delete mode 100644 marlo-data/src/main/resources/xmls/SoilIndicators.hbm.xml delete mode 100644 marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java delete mode 100644 marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/project/SubActionsByPriorityAction.java delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1508__UpdateDeliverablesInfoTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1509__CreateShfrmPriorityActionsTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1510__CreateShfrmSubActionsTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1511__CreateDeliverableShfrmPriorityActionsTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1512__CreateDeliverableShfrmSubActionsTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0728__UpdateShfrmTables.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0840__AddSpecifityForShfrmFunction.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0841__CreateShfrmSoilIndicatorsTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_1445__UpdateShfrmSoilIndicatorsField.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_1625__UpdateShfrmDeliverablesTables.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240204_0600__UpdateShfrmDeliverablesSubActionTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240207_0900__UpdateShfrmSubActionTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1000__UpdateShfrmPriorityActionTableDescriptionField.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1010__UpdateShfrmSubActionTableDescriptionField.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1022__UpdateSoilIndicatorsTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1415__AddURLfieldinTipParametersTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1043__UpdateDeliverableInfoTable.sql delete mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1420__CreateContributionARColumn.sql delete mode 100644 marlo-web/src/main/webapp/WEB-INF/crp/views/admin/shfrmManagement.ftl delete mode 100644 marlo-web/src/main/webapp/crp/js/admin/shfrmManagement.js delete mode 100644 marlo-web/src/main/webapp/crp/js/projects/deliverables/deliverableShfrm.js diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java index d7c56425cc..1573156562 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java @@ -155,7 +155,6 @@ public final class APConstants { public static final String HIGHLIGHT_COMMENTS_ACTIVE = "highlight_comments_active"; public static final String TIP_SECTION_ACTIVE = "tip_section_active"; - public static final String SHFRM_CONTRIBUTION_ACTIVE = "shfrm_contribution_active"; public static final String IS_EXPECTED_DELIVERABLE_REPORT_All_YEARS_VISIBLE = "is_expected_deliverable_report_all_years_visible"; @@ -176,8 +175,6 @@ public final class APConstants { public static final String DELIVERABLE_FILE_LOCALLY_HOSTED_STR = "Locally"; public static final String DELIVERABLE_ID = "deliverableId"; - public static final String PRIORITY_ACTION_ID = "priorityActionId"; - public static final String SUB_ACTION_ID = "subActionId"; public static final int DELIVERABLE_QUALITY_ANSWER_NO = 3; public static final int DELIVERABLE_QUALITY_ANSWER_YES = 2; public static final int DELIVERABLE_QUALITY_ANSWER_YES_BUT_NO = 1; diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmPriorityActionDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmPriorityActionDAO.java deleted file mode 100644 index 76f4292b05..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmPriorityActionDAO.java +++ /dev/null @@ -1,75 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao; - -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmPriorityAction; - -import java.util.List; - - -public interface DeliverableShfrmPriorityActionDAO { - - /** - * This method removes a specific deliverableShfrmPriorityAction value from the database. - * - * @param deliverableShfrmPriorityActionId is the deliverableShfrmPriorityAction identifier. - * @return true if the deliverableShfrmPriorityAction was successfully deleted, false otherwise. - */ - public void deleteDeliverableShfrmPriorityAction(long deliverableShfrmPriorityActionId); - - /** - * This method validate if the deliverableShfrmPriorityAction identify with the given id exists in the system. - * - * @param deliverableShfrmPriorityActionID is a deliverableShfrmPriorityAction identifier. - * @return true if the deliverableShfrmPriorityAction exists, false otherwise. - */ - public boolean existDeliverableShfrmPriorityAction(long deliverableShfrmPriorityActionID); - - /** - * This method gets a deliverableShfrmPriorityAction object by a given deliverableShfrmPriorityAction identifier. - * - * @param deliverableShfrmPriorityActionID is the deliverableShfrmPriorityAction identifier. - * @return a DeliverableShfrmPriorityAction object. - */ - public DeliverableShfrmPriorityAction find(long id); - - /** - * This method gets a list of deliverableShfrmPriorityAction that are active - * - * @return a list from DeliverableShfrmPriorityAction null if no exist records - */ - public List findAll(); - - - public List findByDeliverableAndPhase(long deliverableId, long phaseId); - - public List findByDeliverablePriorityActionAndPhase(long deliverableId, - long priorityActionId, long phaseId); - - - /** - * This method saves the information of the given deliverableShfrmPriorityAction - * - * @param deliverableShfrmPriorityAction - is the deliverableShfrmPriorityAction object with the new information to be - * added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the - * deliverableShfrmPriorityAction was - * updated - * or -1 is some error occurred. - */ - public DeliverableShfrmPriorityAction save(DeliverableShfrmPriorityAction deliverableShfrmPriorityAction); -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmSubActionDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmSubActionDAO.java deleted file mode 100644 index 0f0b1979df..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmSubActionDAO.java +++ /dev/null @@ -1,75 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao; - -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmSubAction; - -import java.util.List; - - -public interface DeliverableShfrmSubActionDAO { - - /** - * This method removes a specific deliverableShfrmSubAction value from the database. - * - * @param deliverableShfrmSubActionId is the deliverableShfrmSubAction identifier. - * @return true if the deliverableShfrmSubAction was successfully deleted, false otherwise. - */ - public void deleteDeliverableShfrmSubAction(long deliverableShfrmSubActionId); - - /** - * This method validate if the deliverableShfrmSubAction identify with the given id exists in the system. - * - * @param deliverableShfrmSubActionID is a deliverableShfrmSubAction identifier. - * @return true if the deliverableShfrmSubAction exists, false otherwise. - */ - public boolean existDeliverableShfrmSubAction(long deliverableShfrmSubActionID); - - /** - * This method gets a deliverableShfrmSubAction object by a given deliverableShfrmSubAction identifier. - * - * @param deliverableShfrmSubActionID is the deliverableShfrmSubAction identifier. - * @return a DeliverableShfrmSubAction object. - */ - public DeliverableShfrmSubAction find(long id); - - /** - * This method gets a list of deliverableShfrmSubAction that are active - * - * @return a list from DeliverableShfrmSubAction null if no exist records - */ - public List findAll(); - - - public List findByPriorityActionAndPhase(long priorityActionId, long phaseId); - - public List findByPriorityActionPhaseAndSubAction(long priorityActionId, long phaseId, - long shfrmSubActionId); - - - /** - * This method saves the information of the given deliverableShfrmSubAction - * - * @param deliverableShfrmSubAction - is the deliverableShfrmSubAction object with the new information to be - * added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the - * deliverableShfrmSubAction was - * updated - * or -1 is some error occurred. - */ - public DeliverableShfrmSubAction save(DeliverableShfrmSubAction deliverableShfrmSubAction); -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ShfrmPriorityActionDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ShfrmPriorityActionDAO.java deleted file mode 100644 index 5f03fe1b24..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ShfrmPriorityActionDAO.java +++ /dev/null @@ -1,67 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao; - -import org.cgiar.ccafs.marlo.data.model.ShfrmPriorityAction; - -import java.util.List; - - -public interface ShfrmPriorityActionDAO { - - /** - * This method removes a specific shfrmPriorityAction value from the database. - * - * @param shfrmPriorityActionId is the shfrmPriorityAction identifier. - * @return true if the shfrmPriorityAction was successfully deleted, false otherwise. - */ - public void deleteShfrmPriorityAction(long shfrmPriorityActionId); - - /** - * This method validate if the shfrmPriorityAction identify with the given id exists in the system. - * - * @param shfrmPriorityActionID is a shfrmPriorityAction identifier. - * @return true if the shfrmPriorityAction exists, false otherwise. - */ - public boolean existShfrmPriorityAction(long shfrmPriorityActionID); - - /** - * This method gets a shfrmPriorityAction object by a given shfrmPriorityAction identifier. - * - * @param shfrmPriorityActionID is the shfrmPriorityAction identifier. - * @return a ShfrmPriorityAction object. - */ - public ShfrmPriorityAction find(long id); - - /** - * This method gets a list of shfrmPriorityAction that are active - * - * @return a list from ShfrmPriorityAction null if no exist records - */ - public List findAll(); - - - /** - * This method saves the information of the given shfrmPriorityAction - * - * @param shfrmPriorityAction - is the shfrmPriorityAction object with the new information to be added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the shfrmPriorityAction was - * updated - * or -1 is some error occurred. - */ - public ShfrmPriorityAction save(ShfrmPriorityAction shfrmPriorityAction); -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ShfrmSubActionDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ShfrmSubActionDAO.java deleted file mode 100644 index b1713c1bd6..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ShfrmSubActionDAO.java +++ /dev/null @@ -1,67 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao; - -import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; - -import java.util.List; - - -public interface ShfrmSubActionDAO { - - /** - * This method removes a specific shfrmSubAction value from the database. - * - * @param shfrmSubActionId is the shfrmSubAction identifier. - * @return true if the shfrmSubAction was successfully deleted, false otherwise. - */ - public void deleteShfrmSubAction(long shfrmSubActionId); - - /** - * This method validate if the shfrmSubAction identify with the given id exists in the system. - * - * @param shfrmSubActionID is a shfrmSubAction identifier. - * @return true if the shfrmSubAction exists, false otherwise. - */ - public boolean existShfrmSubAction(long shfrmSubActionID); - - /** - * This method gets a shfrmSubAction object by a given shfrmSubAction identifier. - * - * @param shfrmSubActionID is the shfrmSubAction identifier. - * @return a ShfrmSubAction object. - */ - public ShfrmSubAction find(long id); - - /** - * This method gets a list of shfrmSubAction that are active - * - * @return a list from ShfrmSubAction null if no exist records - */ - public List findAll(); - - - /** - * This method saves the information of the given shfrmSubAction - * - * @param shfrmSubAction - is the shfrmSubAction object with the new information to be added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the shfrmSubAction was - * updated - * or -1 is some error occurred. - */ - public ShfrmSubAction save(ShfrmSubAction shfrmSubAction); -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/SoilIndicatorDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/SoilIndicatorDAO.java deleted file mode 100644 index f6e8bc75fd..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/SoilIndicatorDAO.java +++ /dev/null @@ -1,67 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao; - -import org.cgiar.ccafs.marlo.data.model.SoilIndicator; - -import java.util.List; - - -public interface SoilIndicatorDAO { - - /** - * This method removes a specific soilIndicator value from the database. - * - * @param soilIndicatorId is the soilIndicator identifier. - * @return true if the soilIndicator was successfully deleted, false otherwise. - */ - public void deleteSoilIndicator(long soilIndicatorId); - - /** - * This method validate if the soilIndicator identify with the given id exists in the system. - * - * @param soilIndicatorID is a soilIndicator identifier. - * @return true if the soilIndicator exists, false otherwise. - */ - public boolean existSoilIndicator(long soilIndicatorID); - - /** - * This method gets a soilIndicator object by a given soilIndicator identifier. - * - * @param soilIndicatorID is the soilIndicator identifier. - * @return a SoilIndicator object. - */ - public SoilIndicator find(long id); - - /** - * This method gets a list of soilIndicator that are active - * - * @return a list from SoilIndicator null if no exist records - */ - public List findAll(); - - - /** - * This method saves the information of the given soilIndicator - * - * @param soilIndicator - is the soilIndicator object with the new information to be added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the soilIndicator was - * updated - * or -1 is some error occurred. - */ - public SoilIndicator save(SoilIndicator soilIndicator); -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmPriorityActionMySQLDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmPriorityActionMySQLDAO.java deleted file mode 100644 index a84e0d6020..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmPriorityActionMySQLDAO.java +++ /dev/null @@ -1,113 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao.mysql; - -import org.cgiar.ccafs.marlo.data.dao.DeliverableShfrmPriorityActionDAO; -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmPriorityAction; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.hibernate.SessionFactory; - -@Named -public class DeliverableShfrmPriorityActionMySQLDAO extends AbstractMarloDAO - implements DeliverableShfrmPriorityActionDAO { - - - @Inject - public DeliverableShfrmPriorityActionMySQLDAO(SessionFactory sessionFactory) { - super(sessionFactory); - } - - @Override - public void deleteDeliverableShfrmPriorityAction(long deliverableShfrmPriorityActionId) { - DeliverableShfrmPriorityAction deliverableShfrmPriorityAction = this.find(deliverableShfrmPriorityActionId); - /* - * deliverableShfrmPriorityAction.setActive(false); - * this.update(deliverableShfrmPriorityAction); - */ - this.delete(deliverableShfrmPriorityAction); - - } - - @Override - public boolean existDeliverableShfrmPriorityAction(long deliverableShfrmPriorityActionID) { - DeliverableShfrmPriorityAction deliverableShfrmPriorityAction = this.find(deliverableShfrmPriorityActionID); - if (deliverableShfrmPriorityAction == null) { - return false; - } - return true; - - } - - @Override - public DeliverableShfrmPriorityAction find(long id) { - return super.find(DeliverableShfrmPriorityAction.class, id); - - } - - @Override - public List findAll() { - String query = "from " + DeliverableShfrmPriorityAction.class.getName() + " where is_active=1"; - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - - } - - @Override - public List findByDeliverableAndPhase(long deliverableId, long phaseId) { - String query = "from " + DeliverableShfrmPriorityAction.class.getName() + " where is_active=1 and deliverable_id=" - + deliverableId + " and id_phase=" + phaseId; - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - } - - @Override - public List findByDeliverablePriorityActionAndPhase(long deliverableId, - long priorityActionId, long phaseId) { - String query = "from " + DeliverableShfrmPriorityAction.class.getName() + " where is_active=1 and deliverable_id=" - + deliverableId + " and shfrm_priority_action_id=" + priorityActionId + " and id_phase=" + phaseId; - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - } - - @Override - public DeliverableShfrmPriorityAction save(DeliverableShfrmPriorityAction deliverableShfrmPriorityAction) { - if (deliverableShfrmPriorityAction.getId() == null) { - super.saveEntity(deliverableShfrmPriorityAction); - } else { - deliverableShfrmPriorityAction = super.update(deliverableShfrmPriorityAction); - } - - - return deliverableShfrmPriorityAction; - } - - -} \ No newline at end of file diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmSubActionMySQLDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmSubActionMySQLDAO.java deleted file mode 100644 index 3c87150e4a..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmSubActionMySQLDAO.java +++ /dev/null @@ -1,117 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao.mysql; - -import org.cgiar.ccafs.marlo.data.dao.DeliverableShfrmSubActionDAO; -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmSubAction; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.hibernate.SessionFactory; - -@Named -public class DeliverableShfrmSubActionMySQLDAO extends AbstractMarloDAO - implements DeliverableShfrmSubActionDAO { - - - @Inject - public DeliverableShfrmSubActionMySQLDAO(SessionFactory sessionFactory) { - super(sessionFactory); - } - - @Override - public void deleteDeliverableShfrmSubAction(long deliverableShfrmSubActionId) { - DeliverableShfrmSubAction deliverableShfrmSubAction = this.find(deliverableShfrmSubActionId); - /* - * deliverableShfrmSubAction.setActive(false); - * this.update(deliverableShfrmSubAction); - */ - this.delete(deliverableShfrmSubAction); - - } - - @Override - public boolean existDeliverableShfrmSubAction(long deliverableShfrmSubActionID) { - DeliverableShfrmSubAction deliverableShfrmSubAction = this.find(deliverableShfrmSubActionID); - if (deliverableShfrmSubAction == null) { - return false; - } - return true; - - } - - @Override - public DeliverableShfrmSubAction find(long id) { - return super.find(DeliverableShfrmSubAction.class, id); - - } - - @Override - public List findAll() { - String query = "from " + DeliverableShfrmSubAction.class.getName() + " where is_active=1"; - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - - } - - - @Override - public List findByPriorityActionAndPhase(long priorityActionId, long phaseId) { - String query = "from " + DeliverableShfrmSubAction.class.getName() - + " where is_active=1 and deliverable_shfrm_priority_action_id=" + priorityActionId + " and id_phase=" + phaseId; - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - - } - - @Override - public List findByPriorityActionPhaseAndSubAction(long priorityActionId, long phaseId, - long shfrmSubActionId) { - String query = "from " + DeliverableShfrmSubAction.class.getName() - + " where is_active=1 and deliverable_shfrm_priority_action_id=" + priorityActionId + " and id_phase=" + phaseId - + " and shfrm_sub_action_id=" + shfrmSubActionId; - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - - } - - @Override - public DeliverableShfrmSubAction save(DeliverableShfrmSubAction deliverableShfrmSubAction) { - if (deliverableShfrmSubAction.getId() == null) { - super.saveEntity(deliverableShfrmSubAction); - } else { - deliverableShfrmSubAction = super.update(deliverableShfrmSubAction); - } - - - return deliverableShfrmSubAction; - } - - -} \ No newline at end of file diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/ShfrmPriorityActionMySQLDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/ShfrmPriorityActionMySQLDAO.java deleted file mode 100644 index 796cf45d58..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/ShfrmPriorityActionMySQLDAO.java +++ /dev/null @@ -1,89 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao.mysql; - -import org.cgiar.ccafs.marlo.data.dao.ShfrmPriorityActionDAO; -import org.cgiar.ccafs.marlo.data.model.ShfrmPriorityAction; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.hibernate.SessionFactory; - -@Named -public class ShfrmPriorityActionMySQLDAO extends AbstractMarloDAO - implements ShfrmPriorityActionDAO { - - - @Inject - public ShfrmPriorityActionMySQLDAO(SessionFactory sessionFactory) { - super(sessionFactory); - } - - @Override - public void deleteShfrmPriorityAction(long shfrmPriorityActionId) { - ShfrmPriorityAction shfrmPriorityAction = this.find(shfrmPriorityActionId); - /* - * shfrmPriorityAction.setActive(false); - * this.update(shfrmPriorityAction); - */ - this.delete(shfrmPriorityAction); - } - - @Override - public boolean existShfrmPriorityAction(long shfrmPriorityActionID) { - ShfrmPriorityAction shfrmPriorityAction = this.find(shfrmPriorityActionID); - if (shfrmPriorityAction == null) { - return false; - } - return true; - - } - - @Override - public ShfrmPriorityAction find(long id) { - return super.find(ShfrmPriorityAction.class, id); - - } - - @Override - public List findAll() { - String query = "from " + ShfrmPriorityAction.class.getName() + " where is_active=1"; - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - - } - - @Override - public ShfrmPriorityAction save(ShfrmPriorityAction shfrmPriorityAction) { - if (shfrmPriorityAction.getId() == null) { - super.saveEntity(shfrmPriorityAction); - } else { - shfrmPriorityAction = super.update(shfrmPriorityAction); - } - - - return shfrmPriorityAction; - } - - -} \ No newline at end of file diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/ShfrmSubActionMySQLDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/ShfrmSubActionMySQLDAO.java deleted file mode 100644 index aabe72299e..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/ShfrmSubActionMySQLDAO.java +++ /dev/null @@ -1,88 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao.mysql; - -import org.cgiar.ccafs.marlo.data.dao.ShfrmSubActionDAO; -import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.hibernate.SessionFactory; - -@Named -public class ShfrmSubActionMySQLDAO extends AbstractMarloDAO implements ShfrmSubActionDAO { - - - @Inject - public ShfrmSubActionMySQLDAO(SessionFactory sessionFactory) { - super(sessionFactory); - } - - @Override - public void deleteShfrmSubAction(long shfrmSubActionId) { - ShfrmSubAction shfrmSubAction = this.find(shfrmSubActionId); - /* - * shfrmSubAction.setActive(false); - * this.update(shfrmSubAction); - */ - this.delete(shfrmSubAction); - } - - @Override - public boolean existShfrmSubAction(long shfrmSubActionID) { - ShfrmSubAction shfrmSubAction = this.find(shfrmSubActionID); - if (shfrmSubAction == null) { - return false; - } - return true; - - } - - @Override - public ShfrmSubAction find(long id) { - return super.find(ShfrmSubAction.class, id); - - } - - @Override - public List findAll() { - String query = "from " + ShfrmSubAction.class.getName() + " where is_active=1"; - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - - } - - @Override - public ShfrmSubAction save(ShfrmSubAction shfrmSubAction) { - if (shfrmSubAction.getId() == null) { - super.saveEntity(shfrmSubAction); - } else { - shfrmSubAction = super.update(shfrmSubAction); - } - - - return shfrmSubAction; - } - - -} \ No newline at end of file diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/SoilIndicatorMySQLDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/SoilIndicatorMySQLDAO.java deleted file mode 100644 index 04f9275ac2..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/SoilIndicatorMySQLDAO.java +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - - -package org.cgiar.ccafs.marlo.data.dao.mysql; - -import org.cgiar.ccafs.marlo.data.dao.SoilIndicatorDAO; -import org.cgiar.ccafs.marlo.data.model.SoilIndicator; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.hibernate.SessionFactory; - -@Named -public class SoilIndicatorMySQLDAO extends AbstractMarloDAO implements SoilIndicatorDAO { - - - @Inject - public SoilIndicatorMySQLDAO(SessionFactory sessionFactory) { - super(sessionFactory); - } - - @Override - public void deleteSoilIndicator(long soilIndicatorId) { - SoilIndicator soilIndicator = this.find(soilIndicatorId); - this.delete(soilIndicator); - } - - @Override - public boolean existSoilIndicator(long soilIndicatorID) { - SoilIndicator soilIndicator = this.find(soilIndicatorID); - if (soilIndicator == null) { - return false; - } - return true; - - } - - @Override - public SoilIndicator find(long id) { - return super.find(SoilIndicator.class, id); - - } - - @Override - public List findAll() { - String query = "from " + SoilIndicator.class.getName(); - List list = super.findAll(query); - if (list.size() > 0) { - return list; - } - return null; - - } - - @Override - public SoilIndicator save(SoilIndicator soilIndicator) { - if (soilIndicator.getId() == null) { - super.saveEntity(soilIndicator); - } else { - soilIndicator = super.update(soilIndicator); - } - - - return soilIndicator; - } - - -} \ No newline at end of file diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmPriorityActionManager.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmPriorityActionManager.java deleted file mode 100644 index 1b15093969..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmPriorityActionManager.java +++ /dev/null @@ -1,82 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager; - -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmPriorityAction; - -import java.util.List; - - -/** - * @author CCAFS - */ - -public interface DeliverableShfrmPriorityActionManager { - - - /** - * This method removes a specific deliverableShfrmPriorityAction value from the database. - * - * @param deliverableShfrmPriorityActionId is the deliverableShfrmPriorityAction identifier. - * @return true if the deliverableShfrmPriorityAction was successfully deleted, false otherwise. - */ - public void deleteDeliverableShfrmPriorityAction(long deliverableShfrmPriorityActionId); - - - /** - * This method validate if the deliverableShfrmPriorityAction identify with the given id exists in the system. - * - * @param deliverableShfrmPriorityActionID is a deliverableShfrmPriorityAction identifier. - * @return true if the deliverableShfrmPriorityAction exists, false otherwise. - */ - public boolean existDeliverableShfrmPriorityAction(long deliverableShfrmPriorityActionID); - - - /** - * This method gets a list of deliverableShfrmPriorityAction that are active - * - * @return a list from DeliverableShfrmPriorityAction null if no exist records - */ - public List findAll(); - - public List findByDeliverableAndPhase(long deliverableId, long phaseId); - - public List findByDeliverablePriorityActionAndPhase(long deliverableId, - long priorityActionId, long phaseId); - - - /** - * This method gets a deliverableShfrmPriorityAction object by a given deliverableShfrmPriorityAction identifier. - * - * @param deliverableShfrmPriorityActionID is the deliverableShfrmPriorityAction identifier. - * @return a DeliverableShfrmPriorityAction object. - */ - public DeliverableShfrmPriorityAction getDeliverableShfrmPriorityActionById(long deliverableShfrmPriorityActionID); - - /** - * This method saves the information of the given deliverableShfrmPriorityAction - * - * @param deliverableShfrmPriorityAction - is the deliverableShfrmPriorityAction object with the new information to be - * added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the - * deliverableShfrmPriorityAction was - * updated - * or -1 is some error occurred. - */ - public DeliverableShfrmPriorityAction - saveDeliverableShfrmPriorityAction(DeliverableShfrmPriorityAction deliverableShfrmPriorityAction); - - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmSubActionManager.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmSubActionManager.java deleted file mode 100644 index 7b5e69a8a5..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmSubActionManager.java +++ /dev/null @@ -1,80 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager; - -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmSubAction; - -import java.util.List; - - -/** - * @author CCAFS - */ - -public interface DeliverableShfrmSubActionManager { - - - /** - * This method removes a specific deliverableShfrmSubAction value from the database. - * - * @param deliverableShfrmSubActionId is the deliverableShfrmSubAction identifier. - * @return true if the deliverableShfrmSubAction was successfully deleted, false otherwise. - */ - public void deleteDeliverableShfrmSubAction(long deliverableShfrmSubActionId); - - - /** - * This method validate if the deliverableShfrmSubAction identify with the given id exists in the system. - * - * @param deliverableShfrmSubActionID is a deliverableShfrmSubAction identifier. - * @return true if the deliverableShfrmSubAction exists, false otherwise. - */ - public boolean existDeliverableShfrmSubAction(long deliverableShfrmSubActionID); - - - /** - * This method gets a list of deliverableShfrmSubAction that are active - * - * @return a list from DeliverableShfrmSubAction null if no exist records - */ - public List findAll(); - - - public List findByPriorityActionAndPhase(long priorityActionId, long phaseId); - - public List findByPriorityActionPhaseAndSubAction(long priorityActionId, long phaseId, - long shfrmSubActionId); - - /** - * This method gets a deliverableShfrmSubAction object by a given deliverableShfrmSubAction identifier. - * - * @param deliverableShfrmSubActionID is the deliverableShfrmSubAction identifier. - * @return a DeliverableShfrmSubAction object. - */ - public DeliverableShfrmSubAction getDeliverableShfrmSubActionById(long deliverableShfrmSubActionID); - - /** - * This method saves the information of the given deliverableShfrmSubAction - * - * @param deliverableShfrmSubAction - is the deliverableShfrmSubAction object with the new information to be - * added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the - * deliverableShfrmSubAction was - * updated - * or -1 is some error occurred. - */ - public DeliverableShfrmSubAction saveDeliverableShfrmSubAction(DeliverableShfrmSubAction deliverableShfrmSubAction); - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ShfrmPriorityActionManager.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ShfrmPriorityActionManager.java deleted file mode 100644 index d66307f022..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ShfrmPriorityActionManager.java +++ /dev/null @@ -1,74 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager; - -import org.cgiar.ccafs.marlo.data.model.ShfrmPriorityAction; - -import java.util.List; - - -/** - * @author CCAFS - */ - -public interface ShfrmPriorityActionManager { - - - /** - * This method removes a specific shfrmPriorityAction value from the database. - * - * @param shfrmPriorityActionId is the shfrmPriorityAction identifier. - * @return true if the shfrmPriorityAction was successfully deleted, false otherwise. - */ - public void deleteShfrmPriorityAction(long shfrmPriorityActionId); - - - /** - * This method validate if the shfrmPriorityAction identify with the given id exists in the system. - * - * @param shfrmPriorityActionID is a shfrmPriorityAction identifier. - * @return true if the shfrmPriorityAction exists, false otherwise. - */ - public boolean existShfrmPriorityAction(long shfrmPriorityActionID); - - - /** - * This method gets a list of shfrmPriorityAction that are active - * - * @return a list from ShfrmPriorityAction null if no exist records - */ - public List findAll(); - - - /** - * This method gets a shfrmPriorityAction object by a given shfrmPriorityAction identifier. - * - * @param shfrmPriorityActionID is the shfrmPriorityAction identifier. - * @return a ShfrmPriorityAction object. - */ - public ShfrmPriorityAction getShfrmPriorityActionById(long shfrmPriorityActionID); - - /** - * This method saves the information of the given shfrmPriorityAction - * - * @param shfrmPriorityAction - is the shfrmPriorityAction object with the new information to be added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the shfrmPriorityAction was - * updated - * or -1 is some error occurred. - */ - public ShfrmPriorityAction saveShfrmPriorityAction(ShfrmPriorityAction shfrmPriorityAction); - - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ShfrmSubActionManager.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ShfrmSubActionManager.java deleted file mode 100644 index e9817bd989..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ShfrmSubActionManager.java +++ /dev/null @@ -1,74 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager; - -import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; - -import java.util.List; - - -/** - * @author CCAFS - */ - -public interface ShfrmSubActionManager { - - - /** - * This method removes a specific shfrmSubAction value from the database. - * - * @param shfrmSubActionId is the shfrmSubAction identifier. - * @return true if the shfrmSubAction was successfully deleted, false otherwise. - */ - public void deleteShfrmSubAction(long shfrmSubActionId); - - - /** - * This method validate if the shfrmSubAction identify with the given id exists in the system. - * - * @param shfrmSubActionID is a shfrmSubAction identifier. - * @return true if the shfrmSubAction exists, false otherwise. - */ - public boolean existShfrmSubAction(long shfrmSubActionID); - - - /** - * This method gets a list of shfrmSubAction that are active - * - * @return a list from ShfrmSubAction null if no exist records - */ - public List findAll(); - - - /** - * This method gets a shfrmSubAction object by a given shfrmSubAction identifier. - * - * @param shfrmSubActionID is the shfrmSubAction identifier. - * @return a ShfrmSubAction object. - */ - public ShfrmSubAction getShfrmSubActionById(long shfrmSubActionID); - - /** - * This method saves the information of the given shfrmSubAction - * - * @param shfrmSubAction - is the shfrmSubAction object with the new information to be added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the shfrmSubAction was - * updated - * or -1 is some error occurred. - */ - public ShfrmSubAction saveShfrmSubAction(ShfrmSubAction shfrmSubAction); - - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/SoilIndicatorManager.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/SoilIndicatorManager.java deleted file mode 100644 index 64000356a1..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/SoilIndicatorManager.java +++ /dev/null @@ -1,74 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager; - -import org.cgiar.ccafs.marlo.data.model.SoilIndicator; - -import java.util.List; - - -/** - * @author CCAFS - */ - -public interface SoilIndicatorManager { - - - /** - * This method removes a specific soilIndicator value from the database. - * - * @param soilIndicatorId is the soilIndicator identifier. - * @return true if the soilIndicator was successfully deleted, false otherwise. - */ - public void deleteSoilIndicator(long soilIndicatorId); - - - /** - * This method validate if the soilIndicator identify with the given id exists in the system. - * - * @param soilIndicatorID is a soilIndicator identifier. - * @return true if the soilIndicator exists, false otherwise. - */ - public boolean existSoilIndicator(long soilIndicatorID); - - - /** - * This method gets a list of soilIndicator that are active - * - * @return a list from SoilIndicator null if no exist records - */ - public List findAll(); - - - /** - * This method gets a soilIndicator object by a given soilIndicator identifier. - * - * @param soilIndicatorID is the soilIndicator identifier. - * @return a SoilIndicator object. - */ - public SoilIndicator getSoilIndicatorById(long soilIndicatorID); - - /** - * This method saves the information of the given soilIndicator - * - * @param soilIndicator - is the soilIndicator object with the new information to be added/updated. - * @return a number greater than 0 representing the new ID assigned by the database, 0 if the soilIndicator was - * updated - * or -1 is some error occurred. - */ - public SoilIndicator saveSoilIndicator(SoilIndicator soilIndicator); - - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmPriorityActionManagerImpl.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmPriorityActionManagerImpl.java deleted file mode 100644 index 350a513f78..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmPriorityActionManagerImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager.impl; - - -import org.cgiar.ccafs.marlo.data.dao.DeliverableShfrmPriorityActionDAO; -import org.cgiar.ccafs.marlo.data.dao.PhaseDAO; -import org.cgiar.ccafs.marlo.data.manager.DeliverableShfrmPriorityActionManager; -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmPriorityAction; -import org.cgiar.ccafs.marlo.data.model.Phase; - -import java.util.List; -import java.util.stream.Collectors; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @author CCAFS - */ -@Named -public class DeliverableShfrmPriorityActionManagerImpl implements DeliverableShfrmPriorityActionManager { - - private final Logger logger = LoggerFactory.getLogger(DeliverableShfrmPriorityActionManagerImpl.class); - - // Managers - private DeliverableShfrmPriorityActionDAO deliverableShfrmPriorityActionDAO; - private PhaseDAO phaseDAO; - - - @Inject - public DeliverableShfrmPriorityActionManagerImpl(DeliverableShfrmPriorityActionDAO deliverableShfrmPriorityActionDAO, - PhaseDAO phaseDAO) { - this.deliverableShfrmPriorityActionDAO = deliverableShfrmPriorityActionDAO; - this.phaseDAO = phaseDAO; - } - - @Override - public void deleteDeliverableShfrmPriorityAction(long deliverableShfrmPriorityActionId) { - - DeliverableShfrmPriorityAction deliverableShfrmPriorityAction = - this.getDeliverableShfrmPriorityActionById(deliverableShfrmPriorityActionId); - Phase currentPhase = phaseDAO.find(deliverableShfrmPriorityAction.getPhase().getId()); - - if (currentPhase.getNext() != null && currentPhase.getNext().getNext() != null) { - - this.deleteDeliverableShfrmPriorityActionPhase(currentPhase.getNext(), - deliverableShfrmPriorityAction.getDeliverable().getId(), deliverableShfrmPriorityAction); - } - - deliverableShfrmPriorityActionDAO.deleteDeliverableShfrmPriorityAction(deliverableShfrmPriorityActionId); - } - - public void deleteDeliverableShfrmPriorityActionPhase(Phase next, long deliverableId, - DeliverableShfrmPriorityAction deliverableShfrmPriorityAction) { - Phase phase = phaseDAO.find(next.getId()); - - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionDelete = new DeliverableShfrmPriorityAction(); - - try { - deliverableShfrmPriorityActionDelete = deliverableShfrmPriorityActionDAO - .findByDeliverableAndPhase(deliverableId, phase.getId()).stream() - .filter(d -> d != null && deliverableShfrmPriorityAction != null - && deliverableShfrmPriorityAction.getShfrmPriorityAction() != null - && deliverableShfrmPriorityAction.getShfrmPriorityAction().getId() != null - && d.getShfrmPriorityAction() != null && d.getShfrmPriorityAction().getId() != null - && d.getShfrmPriorityAction().getId().equals(deliverableShfrmPriorityAction.getShfrmPriorityAction().getId())) - .collect(Collectors.toList()).get(0); - } catch (Exception e) { - logger.info("No priority actions " + e); - } - - if (deliverableShfrmPriorityActionDelete != null) { - deliverableShfrmPriorityActionDAO - .deleteDeliverableShfrmPriorityAction(deliverableShfrmPriorityActionDelete.getId()); - } - if (phase.getNext() != null) { - this.deleteDeliverableShfrmPriorityActionPhase(phase.getNext(), deliverableId, deliverableShfrmPriorityAction); - } - } - - @Override - public boolean existDeliverableShfrmPriorityAction(long deliverableShfrmPriorityActionID) { - - return deliverableShfrmPriorityActionDAO.existDeliverableShfrmPriorityAction(deliverableShfrmPriorityActionID); - } - - @Override - public List findAll() { - - return deliverableShfrmPriorityActionDAO.findAll(); - - } - - @Override - public List findByDeliverableAndPhase(long deliverableId, long phaseId) { - - return deliverableShfrmPriorityActionDAO.findByDeliverableAndPhase(deliverableId, phaseId); - - } - - @Override - public List findByDeliverablePriorityActionAndPhase(long deliverableId, - long priorityActionId, long phaseId) { - return deliverableShfrmPriorityActionDAO.findByDeliverablePriorityActionAndPhase(deliverableId, priorityActionId, - phaseId); - - } - - - @Override - public DeliverableShfrmPriorityAction getDeliverableShfrmPriorityActionById(long deliverableShfrmPriorityActionID) { - - return deliverableShfrmPriorityActionDAO.find(deliverableShfrmPriorityActionID); - } - - @Override - public DeliverableShfrmPriorityAction - saveDeliverableShfrmPriorityAction(DeliverableShfrmPriorityAction deliverableShfrmPriorityAction) { - - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionResult = - deliverableShfrmPriorityActionDAO.save(deliverableShfrmPriorityAction); - Phase currentPhase = phaseDAO.find(deliverableShfrmPriorityActionResult.getPhase().getId()); - - if (currentPhase.getNext() != null && currentPhase.getNext().getNext() != null) { - - this.saveDeliverableShfrmPriorityActionPhase(currentPhase.getNext(), - deliverableShfrmPriorityActionResult.getDeliverable().getId(), deliverableShfrmPriorityActionResult); - } - return deliverableShfrmPriorityActionResult; - } - - public void saveDeliverableShfrmPriorityActionPhase(Phase next, long deliverableId, - DeliverableShfrmPriorityAction deliverableShfrmPriorityAction) { - Phase phase = phaseDAO.find(next.getId()); - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionPhase = null; - try { - deliverableShfrmPriorityActionPhase = deliverableShfrmPriorityActionDAO - .findByDeliverableAndPhase(deliverableId, phase.getId()).stream() - .filter(d -> d != null && deliverableShfrmPriorityAction != null - && deliverableShfrmPriorityAction.getShfrmPriorityAction() != null - && deliverableShfrmPriorityAction.getShfrmPriorityAction().getId() != null - && d.getShfrmPriorityAction() != null && d.getShfrmPriorityAction().getId() != null - && d.getShfrmPriorityAction().getId().equals(deliverableShfrmPriorityAction.getShfrmPriorityAction().getId())) - .collect(Collectors.toList()).get(0); - } catch (Exception e) { - logger.error("error getting deliverableShfrmPriorityActionPhase: " + e); - } - - try { - if (deliverableShfrmPriorityActionPhase != null) { - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionAdd = deliverableShfrmPriorityActionPhase; - deliverableShfrmPriorityActionAdd.setDeliverable(deliverableShfrmPriorityAction.getDeliverable()); - deliverableShfrmPriorityActionAdd.setPhase(phase); - deliverableShfrmPriorityActionAdd - .setShfrmPriorityAction(deliverableShfrmPriorityAction.getShfrmPriorityAction()); - deliverableShfrmPriorityActionDAO.save(deliverableShfrmPriorityActionAdd); - } else { - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionAdd = new DeliverableShfrmPriorityAction(); - deliverableShfrmPriorityActionAdd.setDeliverable(deliverableShfrmPriorityAction.getDeliverable()); - deliverableShfrmPriorityActionAdd.setPhase(phase); - deliverableShfrmPriorityActionAdd - .setShfrmPriorityAction(deliverableShfrmPriorityAction.getShfrmPriorityAction()); - deliverableShfrmPriorityActionDAO.save(deliverableShfrmPriorityActionAdd); - } - } catch (Exception e) { - logger.error("error saving replication in DeliverableShfrmPriorityActionManagerImpl " + e); - } - if (phase.getNext() != null) { - this.saveDeliverableShfrmPriorityActionPhase(phase.getNext(), deliverableId, deliverableShfrmPriorityAction); - } - } - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmSubActionManagerImpl.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmSubActionManagerImpl.java deleted file mode 100644 index 3ac04b5666..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmSubActionManagerImpl.java +++ /dev/null @@ -1,202 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager.impl; - - -import org.cgiar.ccafs.marlo.data.dao.DeliverableShfrmPriorityActionDAO; -import org.cgiar.ccafs.marlo.data.dao.DeliverableShfrmSubActionDAO; -import org.cgiar.ccafs.marlo.data.dao.PhaseDAO; -import org.cgiar.ccafs.marlo.data.manager.DeliverableShfrmSubActionManager; -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmPriorityAction; -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmSubAction; -import org.cgiar.ccafs.marlo.data.model.Phase; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @author CCAFS - */ -@Named -public class DeliverableShfrmSubActionManagerImpl implements DeliverableShfrmSubActionManager { - - private final Logger logger = LoggerFactory.getLogger(DeliverableShfrmSubActionManagerImpl.class); - - // Managers - private DeliverableShfrmSubActionDAO deliverableShfrmSubActionDAO; - private DeliverableShfrmPriorityActionDAO deliverableShfrmPriorityActionDAO; - private PhaseDAO phaseDAO; - - @Inject - public DeliverableShfrmSubActionManagerImpl(DeliverableShfrmSubActionDAO deliverableShfrmSubActionDAO, - PhaseDAO phaseDAO, DeliverableShfrmPriorityActionDAO deliverableShfrmPriorityActionDAO) { - this.deliverableShfrmSubActionDAO = deliverableShfrmSubActionDAO; - this.deliverableShfrmPriorityActionDAO = deliverableShfrmPriorityActionDAO; - this.phaseDAO = phaseDAO; - } - - @Override - public void deleteDeliverableShfrmSubAction(long deliverableShfrmSubActionId) { - - DeliverableShfrmSubAction deliverableShfrmSubAction = - this.getDeliverableShfrmSubActionById(deliverableShfrmSubActionId); - Phase currentPhase = phaseDAO.find(deliverableShfrmSubAction.getPhase().getId()); - - if (currentPhase.getNext() != null && currentPhase.getNext().getNext() != null) { - this.deleteDeliverableShfrmSubActionPhase(currentPhase.getNext(), deliverableShfrmSubAction); - } - - deliverableShfrmSubActionDAO.deleteDeliverableShfrmSubAction(deliverableShfrmSubActionId); - } - - public void deleteDeliverableShfrmSubActionPhase(Phase next, DeliverableShfrmSubAction deliverableShfrmSubAction) { - Phase phase = phaseDAO.find(next.getId()); - - DeliverableShfrmPriorityAction deliverablePriorityActionPhase = - this.findDeliverablePriorityActionByDeliverablePriorityActionAndPhase(deliverableShfrmSubAction, phase); - DeliverableShfrmSubAction deliverableShfrmSubActionDelete = new DeliverableShfrmSubAction(); - - if (deliverablePriorityActionPhase != null && deliverablePriorityActionPhase.getId() != null) { - deliverableShfrmSubActionDelete = - deliverableShfrmSubActionDAO.findByPriorityActionPhaseAndSubAction(deliverablePriorityActionPhase.getId(), - phase.getId(), deliverableShfrmSubAction.getShfrmSubAction().getId()).get(0); - } - if (deliverableShfrmSubActionDelete != null) { - deliverableShfrmSubActionDAO.deleteDeliverableShfrmSubAction(deliverableShfrmSubActionDelete.getId()); - } - if (phase.getNext() != null) { - this.deleteDeliverableShfrmSubActionPhase(phase.getNext(), deliverableShfrmSubAction); - } - } - - @Override - public boolean existDeliverableShfrmSubAction(long deliverableShfrmSubActionID) { - - return deliverableShfrmSubActionDAO.existDeliverableShfrmSubAction(deliverableShfrmSubActionID); - } - - @Override - public List findAll() { - - return deliverableShfrmSubActionDAO.findAll(); - - } - - @Override - public List findByPriorityActionAndPhase(long priorityActionId, long phaseId) { - - return deliverableShfrmSubActionDAO.findByPriorityActionAndPhase(priorityActionId, phaseId); - - } - - @Override - public List findByPriorityActionPhaseAndSubAction(long priorityActionId, long phaseId, - long shfrmSubActionId) { - return deliverableShfrmSubActionDAO.findByPriorityActionPhaseAndSubAction(priorityActionId, phaseId, - shfrmSubActionId); - } - - public DeliverableShfrmPriorityAction findDeliverablePriorityActionByDeliverablePriorityActionAndPhase( - DeliverableShfrmSubAction deliverableShfrmSubAction, Phase phase) { - DeliverableShfrmPriorityAction deliverableshfrmPriorityActionPhase = null; - try { - if (phase != null && phase.getId() != null && deliverableShfrmSubAction != null - && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction() != null - && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getShfrmPriorityAction() != null - && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getShfrmPriorityAction().getId() != null - && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getDeliverable() != null - && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getDeliverable().getId() != null) { - deliverableshfrmPriorityActionPhase = deliverableShfrmPriorityActionDAO.findByDeliverablePriorityActionAndPhase( - deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getDeliverable().getId(), - deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getShfrmPriorityAction().getId(), phase.getId()) - .get(0); - } - } catch (Exception e) { - logger.error("error getting deliverableShfrmPriorityActionPhase in subActionsavePhase: " + e); - } - return deliverableshfrmPriorityActionPhase; - } - - @Override - public DeliverableShfrmSubAction getDeliverableShfrmSubActionById(long deliverableShfrmSubActionID) { - - return deliverableShfrmSubActionDAO.find(deliverableShfrmSubActionID); - } - - @Override - public DeliverableShfrmSubAction saveDeliverableShfrmSubAction(DeliverableShfrmSubAction deliverableShfrmSubAction) { - - DeliverableShfrmSubAction deliverableShfrmSubActionResult = - deliverableShfrmSubActionDAO.save(deliverableShfrmSubAction); - Phase currentPhase = phaseDAO.find(deliverableShfrmSubActionResult.getPhase().getId()); - - if (currentPhase.getNext() != null && currentPhase.getNext().getNext() != null) { - - this.saveDeliverableShfrmSubActionPhase(currentPhase.getNext(), deliverableShfrmSubActionResult); - } - return deliverableShfrmSubActionResult; - } - - public void saveDeliverableShfrmSubActionPhase(Phase next, DeliverableShfrmSubAction deliverableShfrmSubAction) { - Phase phase = phaseDAO.find(next.getId()); - DeliverableShfrmSubAction deliverableShfrmSubActionPhase = new DeliverableShfrmSubAction(); - - - // get priority action - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionPhase = null; - try { - deliverableShfrmPriorityActionPhase = - this.findDeliverablePriorityActionByDeliverablePriorityActionAndPhase(deliverableShfrmSubAction, phase); - } catch (Exception e) { - logger.error("error getting deliverable priority action " + e); - } - - try { - if (deliverableShfrmPriorityActionPhase != null && deliverableShfrmPriorityActionPhase.getId() != null) { - deliverableShfrmSubActionPhase = deliverableShfrmSubActionDAO - .findByPriorityActionPhaseAndSubAction(deliverableShfrmPriorityActionPhase.getId(), phase.getId(), - deliverableShfrmSubAction.getShfrmSubAction().getId()) - .get(0); - } - } catch (Exception e) { - logger.error("error getting deliverableShfrmSubActionPhase: " + e); - } - - if (deliverableShfrmPriorityActionPhase != null) { - if (deliverableShfrmSubActionPhase != null) { - DeliverableShfrmSubAction deliverableShfrmSubActionAdd = deliverableShfrmSubActionPhase; - deliverableShfrmSubActionAdd.setPhase(phase); - deliverableShfrmSubActionAdd.setShfrmSubAction(deliverableShfrmSubAction.getShfrmSubAction()); - deliverableShfrmSubActionAdd.setDeliverableShfrmPriorityAction(deliverableShfrmPriorityActionPhase); - deliverableShfrmSubActionDAO.save(deliverableShfrmSubActionAdd); - } else { - DeliverableShfrmSubAction deliverableShfrmSubActionAdd = new DeliverableShfrmSubAction(); - deliverableShfrmSubActionAdd.setPhase(phase); - deliverableShfrmSubActionAdd.setShfrmSubAction(deliverableShfrmSubAction.getShfrmSubAction()); - deliverableShfrmSubActionAdd.setDeliverableShfrmPriorityAction(deliverableShfrmPriorityActionPhase); - deliverableShfrmSubActionDAO.save(deliverableShfrmSubActionAdd); - } - } - if (phase.getNext() != null) { - this.saveDeliverableShfrmSubActionPhase(phase.getNext(), deliverableShfrmSubAction); - } - } - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/ShfrmPriorityActionManagerImpl.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/ShfrmPriorityActionManagerImpl.java deleted file mode 100644 index f0d833da7a..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/ShfrmPriorityActionManagerImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager.impl; - - -import org.cgiar.ccafs.marlo.data.dao.ShfrmPriorityActionDAO; -import org.cgiar.ccafs.marlo.data.manager.ShfrmPriorityActionManager; -import org.cgiar.ccafs.marlo.data.model.ShfrmPriorityAction; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -/** - * @author CCAFS - */ -@Named -public class ShfrmPriorityActionManagerImpl implements ShfrmPriorityActionManager { - - - private ShfrmPriorityActionDAO shfrmPriorityActionDAO; - // Managers - - - @Inject - public ShfrmPriorityActionManagerImpl(ShfrmPriorityActionDAO shfrmPriorityActionDAO) { - this.shfrmPriorityActionDAO = shfrmPriorityActionDAO; - - - } - - @Override - public void deleteShfrmPriorityAction(long shfrmPriorityActionId) { - - shfrmPriorityActionDAO.deleteShfrmPriorityAction(shfrmPriorityActionId); - } - - @Override - public boolean existShfrmPriorityAction(long shfrmPriorityActionID) { - - return shfrmPriorityActionDAO.existShfrmPriorityAction(shfrmPriorityActionID); - } - - @Override - public List findAll() { - - return shfrmPriorityActionDAO.findAll(); - - } - - @Override - public ShfrmPriorityAction getShfrmPriorityActionById(long shfrmPriorityActionID) { - - return shfrmPriorityActionDAO.find(shfrmPriorityActionID); - } - - @Override - public ShfrmPriorityAction saveShfrmPriorityAction(ShfrmPriorityAction shfrmPriorityAction) { - - return shfrmPriorityActionDAO.save(shfrmPriorityAction); - } - - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/ShfrmSubActionManagerImpl.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/ShfrmSubActionManagerImpl.java deleted file mode 100644 index f1e5e9e89d..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/ShfrmSubActionManagerImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager.impl; - - -import org.cgiar.ccafs.marlo.data.dao.ShfrmSubActionDAO; -import org.cgiar.ccafs.marlo.data.manager.ShfrmSubActionManager; -import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -/** - * @author CCAFS - */ -@Named -public class ShfrmSubActionManagerImpl implements ShfrmSubActionManager { - - - private ShfrmSubActionDAO shfrmSubActionDAO; - // Managers - - - @Inject - public ShfrmSubActionManagerImpl(ShfrmSubActionDAO shfrmSubActionDAO) { - this.shfrmSubActionDAO = shfrmSubActionDAO; - - - } - - @Override - public void deleteShfrmSubAction(long shfrmSubActionId) { - - shfrmSubActionDAO.deleteShfrmSubAction(shfrmSubActionId); - } - - @Override - public boolean existShfrmSubAction(long shfrmSubActionID) { - - return shfrmSubActionDAO.existShfrmSubAction(shfrmSubActionID); - } - - @Override - public List findAll() { - - return shfrmSubActionDAO.findAll(); - - } - - @Override - public ShfrmSubAction getShfrmSubActionById(long shfrmSubActionID) { - - return shfrmSubActionDAO.find(shfrmSubActionID); - } - - @Override - public ShfrmSubAction saveShfrmSubAction(ShfrmSubAction shfrmSubAction) { - - return shfrmSubActionDAO.save(shfrmSubAction); - } - - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/SoilIndicatorManagerImpl.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/SoilIndicatorManagerImpl.java deleted file mode 100644 index f1508bc6b0..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/SoilIndicatorManagerImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ -package org.cgiar.ccafs.marlo.data.manager.impl; - - -import org.cgiar.ccafs.marlo.data.dao.SoilIndicatorDAO; -import org.cgiar.ccafs.marlo.data.manager.SoilIndicatorManager; -import org.cgiar.ccafs.marlo.data.model.SoilIndicator; - -import java.util.List; - -import javax.inject.Inject; -import javax.inject.Named; - -/** - * @author CCAFS - */ -@Named -public class SoilIndicatorManagerImpl implements SoilIndicatorManager { - - - private SoilIndicatorDAO soilIndicatorDAO; - // Managers - - - @Inject - public SoilIndicatorManagerImpl(SoilIndicatorDAO soilIndicatorDAO) { - this.soilIndicatorDAO = soilIndicatorDAO; - - - } - - @Override - public void deleteSoilIndicator(long soilIndicatorId) { - - soilIndicatorDAO.deleteSoilIndicator(soilIndicatorId); - } - - @Override - public boolean existSoilIndicator(long soilIndicatorID) { - - return soilIndicatorDAO.existSoilIndicator(soilIndicatorID); - } - - @Override - public List findAll() { - - return soilIndicatorDAO.findAll(); - - } - - @Override - public SoilIndicator getSoilIndicatorById(long soilIndicatorID) { - - return soilIndicatorDAO.find(soilIndicatorID); - } - - @Override - public SoilIndicator saveSoilIndicator(SoilIndicator soilIndicator) { - - return soilIndicatorDAO.save(soilIndicator); - } - - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Deliverable.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Deliverable.java index 71540e959a..c2a70348cb 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Deliverable.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Deliverable.java @@ -134,12 +134,6 @@ public class Deliverable extends MarloAuditableEntity implements java.io.Seriali private List crpOutcomes; private Set deliverableCrpOutcomes = new HashSet(0); - private Set deliverableShfrmPriorityAction = - new HashSet(0); - private List shfrmPriorityActions; - private Set deliverableShfrmSubAction = new HashSet(0); - private List shfrmSubActions; - private String sharedWithProjects; private String sharedWithMe; private String owner; @@ -496,19 +490,10 @@ public List getDeliverableRegions() { return deliverableRegions; } - public Set getDeliverableShfrmPriorityAction() { - return deliverableShfrmPriorityAction; - } - - public Set getDeliverableShfrmSubAction() { - return deliverableShfrmSubAction; - } - public Set getDeliverableUserPartnerships() { return deliverableUserPartnerships; } - public Set getDeliverableUsers() { return deliverableUsers; } @@ -517,6 +502,7 @@ public DeliverableDissemination getDissemination() { return dissemination; } + public DeliverableDissemination getDissemination(Phase phase) { List deliverableDisseminations = this.getDeliverableDisseminations().stream() .filter(dd -> dd.isActive() && dd.getPhase().equals(phase)).collect(Collectors.toList()); @@ -534,7 +520,6 @@ public DeliverableMetadataExternalSources getExternalSource() { return externalSource; } - public DeliverableMetadataExternalSources getExternalSource(Phase phase) { DeliverableMetadataExternalSources externalSourceFound = this.getExternalSource(); if (externalSourceFound == null) { @@ -554,6 +539,7 @@ public List getFiles() { return files; } + public String getFlagshipValue() { return flagshipValue; } @@ -598,7 +584,6 @@ public Boolean getIsFindable() { return isFindable; } - public Boolean getIsInteroperable() { return isInteroperable; } @@ -612,11 +597,11 @@ public Boolean getIsReusable() { return isReusable; } - public List getLeaders() { return leaders; } + @Override public String getLogDeatil() { StringBuilder sb = new StringBuilder(); @@ -624,6 +609,7 @@ public String getLogDeatil() { return sb.toString(); } + public long getMElementID(int metadataID) { if (metadataElements != null) { for (DeliverableMetadataElement dmetadata : metadataElements) { @@ -639,7 +625,6 @@ public long getMElementID(int metadataID) { return -1; } - public List getMetadata() { return metadata; } @@ -662,6 +647,7 @@ public DeliverableMetadataElement getMetadata(long metadataID) { return null; } + public List getMetadataElements() { return metadataElements; } @@ -807,7 +793,6 @@ public List getRegions() { return regions; } - public String getRegionsValue() { return regionsValue; } @@ -816,16 +801,15 @@ public String getResponsible() { return responsible; } + public List getResponsiblePartnership() { return responsiblePartnership; } - public Set getSectionStatuses() { return sectionStatuses; } - public List getSelectedFlahsgips() { return selectedFlahsgips; } @@ -846,15 +830,6 @@ public String getSharedWithProjects() { } - public List getShfrmPriorityActions() { - return shfrmPriorityActions; - } - - public List getShfrmSubActions() { - return shfrmSubActions; - } - - public String getTagTitle() { return tagTitle; } @@ -878,10 +853,12 @@ public int hashCode() { return result; } + public void setActivities(List activities) { this.activities = activities; } + public void setAltmetricInfos(List altmetricInfos) { this.altmetricInfos = altmetricInfos; } @@ -891,7 +868,6 @@ public void setClusterParticipant(List clusterPar this.clusterParticipant = clusterParticipant; } - public void setCommentStatus(String commentStatus) { this.commentStatus = commentStatus; } @@ -900,7 +876,6 @@ public void setContribution(Boolean contribution) { this.contribution = contribution; } - public void setCountries(List countries) { this.countries = countries; } @@ -919,14 +894,17 @@ public void setCreateDate(Date createDate) { this.createDate = createDate; } + public void setCrossCuttingMarkers(List crossCuttingMarkers) { this.crossCuttingMarkers = crossCuttingMarkers; } + public void setCrp(GlobalUnit crp) { this.crp = crp; } + public void setCrpOutcomes(List crpOutcomes) { this.crpOutcomes = crpOutcomes; } @@ -951,7 +929,6 @@ public void setDeliverableAltmetricInfo(DeliverableAltmetricInfo deliverableAltm this.deliverableAltmetricInfo = deliverableAltmetricInfo; } - public void setDeliverableAltmetricInfos(Set deliverableAltmetricInfos) { this.deliverableAltmetricInfos = deliverableAltmetricInfos; } @@ -968,6 +945,7 @@ public void setDeliverableCrpOutcomes(Set deliverableCrpO this.deliverableCrpOutcomes = deliverableCrpOutcomes; } + public void setDeliverableCrps(Set deliverableCrps) { this.deliverableCrps = deliverableCrps; } @@ -1000,7 +978,6 @@ public void setDeliverableGeographicScopes(Set deliv this.deliverableGeographicScopes = deliverableGeographicScopes; } - public void setDeliverableInfo(DeliverableInfo deliverableInfo) { this.deliverableInfo = deliverableInfo; } @@ -1013,11 +990,11 @@ public void setDeliverableIntellectualAssets(Set d this.deliverableIntellectualAssets = deliverableIntellectualAssets; } - public void setDeliverableLeaders(Set deliverableLeaders) { this.deliverableLeaders = deliverableLeaders; } + public void setDeliverableLocations(Set deliverableLocations) { this.deliverableLocations = deliverableLocations; } @@ -1030,6 +1007,7 @@ public void setDeliverableMetadataElements(Set deliv this.deliverableMetadataElements = deliverableMetadataElements; } + public void setDeliverableMetadataExternalSources(Set deliverableMetadataExternalSources) { this.deliverableMetadataExternalSources = deliverableMetadataExternalSources; @@ -1063,14 +1041,6 @@ public void setDeliverableRegions(List deliverableR this.deliverableRegions = deliverableRegions; } - public void setDeliverableShfrmPriorityAction(Set deliverableShfrmPriorityAction) { - this.deliverableShfrmPriorityAction = deliverableShfrmPriorityAction; - } - - public void setDeliverableShfrmSubAction(Set deliverableShfrmSubAction) { - this.deliverableShfrmSubAction = deliverableShfrmSubAction; - } - public void setDeliverableUserPartnerships(Set deliverableUserPartnerships) { this.deliverableUserPartnerships = deliverableUserPartnerships; } @@ -1091,32 +1061,26 @@ public void setExternalSource(DeliverableMetadataExternalSources externalSource) this.externalSource = externalSource; } - public void setFiles(List files) { this.files = files; } - public void setFlagshipValue(String flagshipValue) { this.flagshipValue = flagshipValue; } - public void setFundingSources(List fundingSources) { this.fundingSources = fundingSources; } - public void setGenderLevels(List genderLevels) { this.genderLevels = genderLevels; } - public void setGeographicScopes(List geographicScopes) { this.geographicScopes = geographicScopes; } - public void setIsAccesible(Boolean isAccesible) { this.isAccesible = isAccesible; } @@ -1136,6 +1100,7 @@ public void setIsPublication(Boolean isPublication) { this.isPublication = isPublication; } + public void setIsReusable(Boolean isReusable) { this.isReusable = isReusable; } @@ -1150,6 +1115,7 @@ public void setMetadata(List metadata) { this.metadata = metadata; } + public void setMetadataElements(List metadataElements) { this.metadataElements = metadataElements; } @@ -1164,7 +1130,6 @@ public void setOtherPartnerships(List otherPartnersh this.otherPartnerships = otherPartnerships; } - public void setOwner(String owner) { this.owner = owner; } @@ -1174,6 +1139,7 @@ public void setPhase(Phase phase) { this.phase = phase; } + public void setPrograms(List programs) { this.programs = programs; } @@ -1182,18 +1148,22 @@ public void setProject(Project project) { this.project = project; } + public void setProjectDeliverableShareds(Set projectDeliverableShareds) { this.projectDeliverableShareds = projectDeliverableShareds; } + public void setProjectOutcomes(List projectOutcomes) { this.projectOutcomes = projectOutcomes; } + public void setPublication(DeliverablePublicationMetadata publication) { this.publication = publication; } + public void setPublicationMetadatas(List publicationMetadatas) { this.publicationMetadatas = publicationMetadatas; } @@ -1238,14 +1208,6 @@ public void setSharedWithProjects(String sharedWithProjects) { this.sharedWithProjects = sharedWithProjects; } - public void setShfrmPriorityActions(List shfrmPriorityActions) { - this.shfrmPriorityActions = shfrmPriorityActions; - } - - public void setShfrmSubActions(List shfrmSubActions) { - this.shfrmSubActions = shfrmSubActions; - } - public void setTagTitle(String tagTitle) { this.tagTitle = tagTitle; } @@ -1259,4 +1221,5 @@ public String toString() { return "Deliverable [id=" + this.getId() + ", project=" + project + ", active=" + this.isActive() + ", phase=" + phase + ", isPublication=" + isPublication + ", deliverableInfo=" + deliverableInfo + "]"; } -} \ No newline at end of file + +} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableInfo.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableInfo.java index aaca7bf79c..d3dceffe12 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableInfo.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableInfo.java @@ -47,12 +47,6 @@ public class DeliverableInfo extends MarloAuditableEntity implements java.io.Ser private Boolean duplicated; @Expose private Boolean remainingPending; - @Expose - private Boolean contributingShfrm; - @Expose - private String shfrmContributionNarrative; - @Expose - private String shfrmContributionNarrativeAR; public DeliverableInfo() { } @@ -61,14 +55,11 @@ public Boolean getAdoptedLicense() { return adoptedLicense; } - public Boolean getContributingShfrm() { - return contributingShfrm; - } - public CrpClusterKeyOutput getCrpClusterKeyOutput() { return crpClusterKeyOutput; } + public CrpProgramOutcome getCrpProgramOutcome() { return crpProgramOutcome; } @@ -77,6 +68,7 @@ public Deliverable getDeliverable() { return deliverable; } + public DeliverableType getDeliverableType() { return deliverableType; } @@ -85,10 +77,12 @@ public String getDescription() { return description; } + public Boolean getDuplicated() { return duplicated; } + public RepIndGeographicScope getGeographicScope() { return geographicScope; } @@ -97,6 +91,7 @@ public Boolean getIsLocationGlobal() { return isLocationGlobal; } + @Override public String getLogDeatil() { StringBuilder sb = new StringBuilder(); @@ -109,6 +104,7 @@ public Integer getNewExpectedYear() { return newExpectedYear; } + public Phase getPhase() { return phase; } @@ -123,22 +119,16 @@ public Boolean getRemainingPending() { } - public String getShfrmContributionNarrative() { - return shfrmContributionNarrative; - } - - public String getShfrmContributionNarrativeAR() { - return shfrmContributionNarrativeAR; - } - public Integer getStatus() { return status; } + public String getStatusDescription() { return statusDescription; } + public String getStatusName(Phase phase) { @@ -197,7 +187,6 @@ public Boolean isCompleted() { return false; } - /** * Check if the deliverables is from a previous year for the current cycle * Used in Project.getCurrentDeliverables and Project.getPreviousDeliverables to generate the deliverable list and; @@ -239,7 +228,6 @@ public Boolean isPrevious() { return false; } - public Boolean isRequiredToBeReported() { if (this.getStatus() == null) { return true; @@ -378,15 +366,12 @@ public boolean requeriedFair() { return false; } + public void setAdoptedLicense(Boolean adoptedLicense) { this.adoptedLicense = adoptedLicense; } - public void setContributingShfrm(Boolean contributingShfrm) { - this.contributingShfrm = contributingShfrm; - } - public void setCrpClusterKeyOutput(CrpClusterKeyOutput crpClusterKeyOutput) { this.crpClusterKeyOutput = crpClusterKeyOutput; } @@ -396,14 +381,17 @@ public void setCrpProgramOutcome(CrpProgramOutcome crpProgramOutcome) { this.crpProgramOutcome = crpProgramOutcome; } + public void setDeliverable(Deliverable deliverable) { this.deliverable = deliverable; } + public void setDeliverableType(DeliverableType deliverableType) { this.deliverableType = deliverableType; } + public void setDescription(String description) { this.description = description; } @@ -412,6 +400,7 @@ public void setDuplicated(Boolean duplicated) { this.duplicated = duplicated; } + public void setGeographicScope(RepIndGeographicScope geographicScope) { this.geographicScope = geographicScope; } @@ -436,14 +425,6 @@ public void setRemainingPending(Boolean remainingPending) { this.remainingPending = remainingPending; } - public void setShfrmContributionNarrative(String shfrmContributionNarrative) { - this.shfrmContributionNarrative = shfrmContributionNarrative; - } - - public void setShfrmContributionNarrativeAR(String shfrmContributionNarrativeAR) { - this.shfrmContributionNarrativeAR = shfrmContributionNarrativeAR; - } - public void setStatus(Integer status) { this.status = status; } @@ -479,9 +460,7 @@ public void updateDeliverableInfo(DeliverableInfo update) { this.setStatusDescription(update.getStatusDescription()); this.setGeographicScope(update.getGeographicScope()); this.setRegion(update.getRegion()); - this.setContributingShfrm(update.getContributingShfrm()); - this.setShfrmContributionNarrative(update.getShfrmContributionNarrative()); - this.setShfrmContributionNarrativeAR(update.getShfrmContributionNarrativeAR()); } + } diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableShfrmPriorityAction.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableShfrmPriorityAction.java deleted file mode 100644 index 46ad8193ef..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableShfrmPriorityAction.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.cgiar.ccafs.marlo.data.model; -// Generated Jun 27, 2017 2:55:00 PM by Hibernate Tools 4.3.1.Final - -import org.cgiar.ccafs.marlo.data.IAuditLog; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import com.google.gson.annotations.Expose; - -/** - * ProjectInfo generated by hbm2java - */ -public class DeliverableShfrmPriorityAction extends MarloAuditableEntity implements java.io.Serializable, IAuditLog { - - private static final long serialVersionUID = -3820243690705823369L; - - @Expose - private Deliverable deliverable; - @Expose - private ShfrmPriorityAction shfrmPriorityAction; - @Expose - private Phase phase; - - private List shfrmSubActions; - - private Set deliverableShfrmSubAction = new HashSet(0); - - public DeliverableShfrmPriorityAction() { - } - - public Deliverable getDeliverable() { - return deliverable; - } - - public Set getDeliverableShfrmSubAction() { - return deliverableShfrmSubAction; - } - - @Override - public String getLogDeatil() { - StringBuilder sb = new StringBuilder(); - sb.append("Id : ").append(this.getId()); - return sb.toString(); - } - - public Phase getPhase() { - return phase; - } - - public ShfrmPriorityAction getShfrmPriorityAction() { - return shfrmPriorityAction; - } - - public List getShfrmSubActions() { - return shfrmSubActions; - } - - @Override - public boolean isActive() { - return true; - } - - public void setDeliverable(Deliverable deliverable) { - this.deliverable = deliverable; - } - - public void setDeliverableShfrmSubAction(Set deliverableShfrmSubAction) { - this.deliverableShfrmSubAction = deliverableShfrmSubAction; - } - - public void setPhase(Phase phase) { - this.phase = phase; - } - - public void setShfrmPriorityAction(ShfrmPriorityAction shfrmPriorityAction) { - this.shfrmPriorityAction = shfrmPriorityAction; - } - - public void setShfrmSubActions(List shfrmSubActions) { - this.shfrmSubActions = shfrmSubActions; - } -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableShfrmSubAction.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableShfrmSubAction.java deleted file mode 100644 index af1726ca80..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableShfrmSubAction.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.cgiar.ccafs.marlo.data.model; -// Generated Jun 27, 2017 2:55:00 PM by Hibernate Tools 4.3.1.Final - -import org.cgiar.ccafs.marlo.data.IAuditLog; - -import com.google.gson.annotations.Expose; - -/** - * ProjectInfo generated by hbm2java - */ -public class DeliverableShfrmSubAction extends MarloAuditableEntity implements java.io.Serializable, IAuditLog { - - private static final long serialVersionUID = -3820243690705823369L; - - @Expose - private DeliverableShfrmPriorityAction deliverableShfrmPriorityAction; - @Expose - private ShfrmSubAction shfrmSubAction; - @Expose - private Phase phase; - - public DeliverableShfrmSubAction() { - } - - public DeliverableShfrmPriorityAction getDeliverableShfrmPriorityAction() { - return deliverableShfrmPriorityAction; - } - - @Override - public String getLogDeatil() { - StringBuilder sb = new StringBuilder(); - sb.append("Id : ").append(this.getId()); - return sb.toString(); - } - - public Phase getPhase() { - return phase; - } - - public ShfrmSubAction getShfrmSubAction() { - return shfrmSubAction; - } - - @Override - public boolean isActive() { - return true; - } - - public void setDeliverableShfrmPriorityAction(DeliverableShfrmPriorityAction deliverableShfrmPriorityAction) { - this.deliverableShfrmPriorityAction = deliverableShfrmPriorityAction; - } - - public void setPhase(Phase phase) { - this.phase = phase; - } - - public void setShfrmSubAction(ShfrmSubAction shfrmSubAction) { - this.shfrmSubAction = shfrmSubAction; - } -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Phase.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Phase.java index 470a6cdc3c..87bef972e7 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Phase.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/Phase.java @@ -44,9 +44,6 @@ public class Phase extends MarloBaseEntity implements java.io.Serializable, IAud private Set projectPhases = new HashSet(0); private Set projectInfos = new HashSet(0); - private Set deliverableShfrmPriorityActions = - new HashSet(0); - private Set deliverableShfrmSubActions = new HashSet(0); private Set projectFocuses = new HashSet(0); @@ -229,6 +226,7 @@ public Set getDeliverableGeographicScopes() { return deliverableGeographicScopes; } + public Set getDeliverableInfos() { return deliverableInfos; } @@ -237,42 +235,42 @@ public Set getDeliverableIntellectualAssets() { return deliverableIntellectualAssets; } + public Set getDeliverableLocations() { return deliverableLocations; } - public Set getDeliverableShfrmPriorityActions() { - return deliverableShfrmPriorityActions; - } - - public Set getDeliverableShfrmSubActions() { - return deliverableShfrmSubActions; - } public Set getDeliverableUserPartnerships() { return deliverableUserPartnerships; } + public Set getDeliverableUsers() { return deliverableUsers; } + public String getDescription() { return this.description; } + public Boolean getEditable() { return editable; } + public Date getEndDate() { return endDate; } + public Set getExpectedStudyProjects() { return expectedStudyProjects; } + public Set getFeedbackQAComments() { return feedbackQAComments; } @@ -341,7 +339,6 @@ public Set getPowbSynthesis() { return powbSynthesis; } - public Set getProgramOutcomeIndicators() { return programOutcomeIndicators; } @@ -356,10 +353,12 @@ public Set getProjectBudgetExecutions() { return projectBudgetExecutions; } + public Set getProjectBudgets() { return projectBudgets; } + public Set getProjectBudgetsFlagships() { return projectBudgetsFlagships; } @@ -368,6 +367,7 @@ public Set getProjectClusters() { return projectClusters; } + public Set getProjectDeliverableShareds() { return projectDeliverableShareds; } @@ -388,6 +388,7 @@ public Set getProjectExpectedStudyFlagships() { return projectExpectedStudyFlagships; } + public Set getProjectExpectedStudyGeographicScopes() { return projectExpectedStudyGeographicScopes; } @@ -468,6 +469,7 @@ public Set getProjectInnovationGeographicScope return projectInnovationGeographicScopes; } + public Set getProjectInnovationInfos() { return projectInnovationInfos; } @@ -488,7 +490,6 @@ public Set getProjectLeverages() { return projectLeverages; } - public Set getProjectLocations() { return projectLocations; } @@ -497,6 +498,7 @@ public Set getProjectLp6ContributionDeliverab return projectLp6ContributionDeliverables; } + public Set getProjectLp6Contributions() { return projectLp6Contributions; } @@ -581,7 +583,6 @@ public int hashCode() { return result; } - @Override public boolean isActive() { return true; @@ -591,6 +592,7 @@ public Boolean isReporting() { return description.equals(APConstants.REPORTING); } + public void setClusters(Set clusters) { this.clusters = clusters; } @@ -639,18 +641,11 @@ public void setDeliverableLocations(Set deliverableLocation this.deliverableLocations = deliverableLocations; } - public void setDeliverableShfrmPriorityActions(Set deliverableShfrmPriorityActions) { - this.deliverableShfrmPriorityActions = deliverableShfrmPriorityActions; - } - - public void setDeliverableShfrmSubActions(Set deliverableShfrmSubActions) { - this.deliverableShfrmSubActions = deliverableShfrmSubActions; - } - public void setDeliverableUserPartnerships(Set deliverableUserPartnerships) { this.deliverableUserPartnerships = deliverableUserPartnerships; } + public void setDeliverableUsers(Set deliverableUsers) { this.deliverableUsers = deliverableUsers; } @@ -724,6 +719,7 @@ public void setPowbSynthesis(Set powbSynthesis) { this.powbSynthesis = powbSynthesis; } + public void setProgramOutcomeIndicators(Set programOutcomeIndicators) { this.programOutcomeIndicators = programOutcomeIndicators; } @@ -799,6 +795,7 @@ public void setProjectExpectedStudyQuantifications( this.projectExpectedStudyQuantifications = projectExpectedStudyQuantifications; } + public void setProjectExpectedStudyRegions(Set projectExpectedStudyRegions) { this.projectExpectedStudyRegions = projectExpectedStudyRegions; } @@ -819,10 +816,12 @@ public void setProjectHighlightCountries(Set projectHig this.projectHighlightCountries = projectHighlightCountries; } + public void setProjectHighlightInfos(Set projectHighlightInfos) { this.projectHighlightInfos = projectHighlightInfos; } + public void setProjectHighligthsTypes(Set projectHighligthsTypes) { this.projectHighligthsTypes = projectHighligthsTypes; } @@ -848,11 +847,13 @@ public void setProjectInnovationDeliverables(Set p this.projectInnovationDeliverables = projectInnovationDeliverables; } + public void setProjectInnovationGeographicScopes(Set projectInnovationGeographicScopes) { this.projectInnovationGeographicScopes = projectInnovationGeographicScopes; } + public void setProjectInnovationInfos(Set projectInnovationInfos) { this.projectInnovationInfos = projectInnovationInfos; } @@ -919,6 +920,7 @@ public void setProjectPolicyGeographicScopes(Set p this.projectPolicyGeographicScopes = projectPolicyGeographicScopes; } + public void setProjectPolicyInfos(Set projectPolicyInfos) { this.projectPolicyInfos = projectPolicyInfos; } diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ShfrmPriorityAction.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ShfrmPriorityAction.java deleted file mode 100644 index 10b3291e19..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ShfrmPriorityAction.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.cgiar.ccafs.marlo.data.model; -// Generated Jun 27, 2017 2:55:00 PM by Hibernate Tools 4.3.1.Final - -import org.cgiar.ccafs.marlo.data.IAuditLog; - -import java.util.ArrayList; -import java.util.List; - -import com.google.gson.annotations.Expose; - -/** - * ProjectInfo generated by hbm2java - */ -public class ShfrmPriorityAction extends MarloAuditableEntity implements java.io.Serializable, IAuditLog { - - private static final long serialVersionUID = -3820243690705823369L; - - @Expose - private String name; - @Expose - private String description; - - private String composedName; - - // private Set shfrmSubAction = new HashSet(0); - private List shfrmSubActions = new ArrayList(); - - public ShfrmPriorityAction() { - } - - public String getComposedName() { - if (composedName == null) { - if (this.getName() != null) { - composedName = "" + name + ": "; - } - if (this.getDescription() != null) { - composedName = composedName.concat(description); - } - - if (composedName != null && !composedName.isEmpty()) { - return composedName; - } - } - return composedName; - } - - public String getDescription() { - return description; - } - - @Override - public String getLogDeatil() { - StringBuilder sb = new StringBuilder(); - sb.append("Id : ").append(this.getId()); - return sb.toString(); - } - - public String getName() { - return name; - } - - public List getShfrmSubActions() { - return shfrmSubActions; - } - - @Override - public boolean isActive() { - return true; - } - - public void setComposedName(String composedName) { - this.composedName = composedName; - } - - public void setDescription(String description) { - this.description = description; - } - - public void setName(String name) { - this.name = name; - } - - public void setShfrmSubActions(List shfrmSubActions) { - this.shfrmSubActions = shfrmSubActions; - } - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ShfrmSubAction.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ShfrmSubAction.java deleted file mode 100644 index de0c15b8ab..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ShfrmSubAction.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.cgiar.ccafs.marlo.data.model; -// Generated Jun 27, 2017 2:55:00 PM by Hibernate Tools 4.3.1.Final - -import org.cgiar.ccafs.marlo.data.IAuditLog; - -import com.google.gson.annotations.Expose; - -/** - * ProjectInfo generated by hbm2java - */ -public class ShfrmSubAction extends MarloAuditableEntity implements java.io.Serializable, IAuditLog { - - private static final long serialVersionUID = -3820243690705823369L; - - @Expose - private String name; - @Expose - private String description; - @Expose - private ShfrmPriorityAction shfrmPriorityAction; - - private String composedName; - - public ShfrmSubAction() { - } - - public String getComposedName() { - if (composedName == null) { - if (this.getName() != null) { - composedName = "" + name + ": "; - } - if (this.getDescription() != null) { - composedName = composedName.concat(description); - } - - if (composedName != null && !composedName.isEmpty()) { - return composedName; - } - } - return composedName; - } - - public String getDescription() { - return description; - } - - @Override - public String getLogDeatil() { - StringBuilder sb = new StringBuilder(); - sb.append("Id : ").append(this.getId()); - return sb.toString(); - } - - public String getName() { - return name; - } - - public ShfrmPriorityAction getShfrmPriorityAction() { - return shfrmPriorityAction; - } - - @Override - public boolean isActive() { - return true; - } - - public void setComposedName(String composedName) { - this.composedName = composedName; - } - - public void setDescription(String description) { - this.description = description; - } - - public void setName(String name) { - this.name = name; - } - - public void setShfrmPriorityAction(ShfrmPriorityAction shfrmPriorityAction) { - this.shfrmPriorityAction = shfrmPriorityAction; - } - -} diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/SoilIndicator.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/SoilIndicator.java deleted file mode 100644 index e750cb2e1e..0000000000 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/SoilIndicator.java +++ /dev/null @@ -1,87 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - -package org.cgiar.ccafs.marlo.data.model; - -import org.cgiar.ccafs.marlo.data.IAuditLog; - -import com.google.gson.annotations.Expose; - -public class SoilIndicator extends MarloBaseEntity implements java.io.Serializable, IAuditLog { - - private static final long serialVersionUID = -963914989396761020L; - - @Expose - private String indicatorName; - @Expose - private Long indicatorId; - @Expose - private Phase phase; - - public Long getIndicatorId() { - return indicatorId; - } - - public String getIndicatorName() { - return indicatorName; - } - - @Override - public String getLogDeatil() { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getModificationJustification() { - // TODO Auto-generated method stub - return null; - } - - @Override - public User getModifiedBy() { - // TODO Auto-generated method stub - return null; - } - - public Phase getPhase() { - return phase; - } - - @Override - public boolean isActive() { - // TODO Auto-generated method stub - return false; - } - - public void setIndicatorId(Long indicatorId) { - this.indicatorId = indicatorId; - } - - public void setIndicatorName(String indicatorName) { - this.indicatorName = indicatorName; - } - - @Override - public void setModifiedBy(User modifiedBy) { - // TODO Auto-generated method stub - } - - public void setPhase(Phase phase) { - this.phase = phase; - } - -} - diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/TipParameters.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/TipParameters.java index 77e2a2d39c..e609848dbe 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/TipParameters.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/TipParameters.java @@ -37,8 +37,6 @@ public class TipParameters extends MarloBaseEntity implements java.io.Serializab @Expose private String privateKey; @Expose - private String tipBaseUrl; - @Expose private Date tokenDueDate; @Override @@ -63,10 +61,6 @@ public String getPrivateKey() { return privateKey; } - public String getTipBaseUrl() { - return tipBaseUrl; - } - public String getTipLoginService() { return tipLoginService; } @@ -102,15 +96,10 @@ public void setPrivateKey(String privateKey) { this.privateKey = privateKey; } - public void setTipBaseUrl(String tipBaseUrl) { - this.tipBaseUrl = tipBaseUrl; - } - public void setTipLoginService(String tipLoginService) { this.tipLoginService = tipLoginService; } - public void setTipStatusService(String tipStatusService) { this.tipStatusService = tipStatusService; } diff --git a/marlo-data/src/main/resources/hibernate.cfg.xml b/marlo-data/src/main/resources/hibernate.cfg.xml index 0d9b49178c..a4113699c1 100644 --- a/marlo-data/src/main/resources/hibernate.cfg.xml +++ b/marlo-data/src/main/resources/hibernate.cfg.xml @@ -430,11 +430,6 @@ - - - - - diff --git a/marlo-data/src/main/resources/xmls/DeliverableShfrmPriorityActions.hbm.xml b/marlo-data/src/main/resources/xmls/DeliverableShfrmPriorityActions.hbm.xml deleted file mode 100644 index 4a02494a66..0000000000 --- a/marlo-data/src/main/resources/xmls/DeliverableShfrmPriorityActions.hbm.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/marlo-data/src/main/resources/xmls/DeliverableShfrmSubActions.hbm.xml b/marlo-data/src/main/resources/xmls/DeliverableShfrmSubActions.hbm.xml deleted file mode 100644 index a9f4a2563a..0000000000 --- a/marlo-data/src/main/resources/xmls/DeliverableShfrmSubActions.hbm.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/marlo-data/src/main/resources/xmls/Deliverables.hbm.xml b/marlo-data/src/main/resources/xmls/Deliverables.hbm.xml index f7b7f8998f..ff853db886 100644 --- a/marlo-data/src/main/resources/xmls/Deliverables.hbm.xml +++ b/marlo-data/src/main/resources/xmls/Deliverables.hbm.xml @@ -278,14 +278,6 @@ - - - - - - diff --git a/marlo-data/src/main/resources/xmls/DeliverablesInfo.hbm.xml b/marlo-data/src/main/resources/xmls/DeliverablesInfo.hbm.xml index 98a8a0cb5d..18bf38c1eb 100644 --- a/marlo-data/src/main/resources/xmls/DeliverablesInfo.hbm.xml +++ b/marlo-data/src/main/resources/xmls/DeliverablesInfo.hbm.xml @@ -81,15 +81,6 @@ - - - - - - - - - diff --git a/marlo-data/src/main/resources/xmls/Phases.hbm.xml b/marlo-data/src/main/resources/xmls/Phases.hbm.xml index 035ad9c8ac..51d4fe4c9b 100644 --- a/marlo-data/src/main/resources/xmls/Phases.hbm.xml +++ b/marlo-data/src/main/resources/xmls/Phases.hbm.xml @@ -106,22 +106,6 @@ - - - - - - - - - - - - diff --git a/marlo-data/src/main/resources/xmls/ShfrmPriorityActions.hbm.xml b/marlo-data/src/main/resources/xmls/ShfrmPriorityActions.hbm.xml deleted file mode 100644 index 1c1b75ea6a..0000000000 --- a/marlo-data/src/main/resources/xmls/ShfrmPriorityActions.hbm.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/marlo-data/src/main/resources/xmls/ShfrmSubActions.hbm.xml b/marlo-data/src/main/resources/xmls/ShfrmSubActions.hbm.xml deleted file mode 100644 index ed6bf768e9..0000000000 --- a/marlo-data/src/main/resources/xmls/ShfrmSubActions.hbm.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/marlo-data/src/main/resources/xmls/SoilIndicators.hbm.xml b/marlo-data/src/main/resources/xmls/SoilIndicators.hbm.xml deleted file mode 100644 index ff77d7c3dd..0000000000 --- a/marlo-data/src/main/resources/xmls/SoilIndicators.hbm.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/marlo-data/src/main/resources/xmls/TipParameters.hbm.xml b/marlo-data/src/main/resources/xmls/TipParameters.hbm.xml index 6338842e4f..4689b84f42 100644 --- a/marlo-data/src/main/resources/xmls/TipParameters.hbm.xml +++ b/marlo-data/src/main/resources/xmls/TipParameters.hbm.xml @@ -26,8 +26,5 @@ - - - \ No newline at end of file diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/BaseAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/BaseAction.java index 754319ceec..478b02ef0e 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/BaseAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/BaseAction.java @@ -37,7 +37,6 @@ import org.cgiar.ccafs.marlo.data.manager.DeliverableCrpOutcomeManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableInfoManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableManager; -import org.cgiar.ccafs.marlo.data.manager.DeliverableShfrmPriorityActionManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableTraineesIndicatorManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableTypeManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableTypeRuleManager; @@ -83,7 +82,6 @@ import org.cgiar.ccafs.marlo.data.manager.ReportSynthesisManager; import org.cgiar.ccafs.marlo.data.manager.RoleManager; import org.cgiar.ccafs.marlo.data.manager.SectionStatusManager; -import org.cgiar.ccafs.marlo.data.manager.ShfrmPriorityActionManager; import org.cgiar.ccafs.marlo.data.manager.SrfTargetUnitManager; import org.cgiar.ccafs.marlo.data.manager.UserManager; import org.cgiar.ccafs.marlo.data.manager.UserRoleManager; @@ -316,12 +314,6 @@ public class BaseAction extends ActionSupport implements Preparable, SessionAwar @Inject private ProjectBudgetManager projectBudgetManager; - @Inject - private DeliverableShfrmPriorityActionManager deliverableShfrmPriorityActionManager; - - @Inject - private ShfrmPriorityActionManager shfrmPriorityActionManager; - @Inject private ProjectPartnerPersonManager partnerPersonManager; @@ -892,24 +884,6 @@ public boolean canBeDeleted(long id, String className) { } - if (clazz == ShfrmPriorityAction.class) { - ShfrmPriorityAction shfrmPriorityAction = this.shfrmPriorityActionManager.getShfrmPriorityActionById(id); - if (shfrmPriorityAction != null && shfrmPriorityAction.getId() != null) { - List deliverableShfrmPriorityActions = - deliverableShfrmPriorityActionManager.findAll().stream() - .filter(d -> d.getShfrmPriorityAction() != null && d.getShfrmPriorityAction().getId() != null - && d.getShfrmPriorityAction().getId().equals(id) && d.getPhase() != null - && d.getPhase().getId().equals(this.getActualPhase().getId())) - .collect(Collectors.toList()); - if (deliverableShfrmPriorityActions != null && deliverableShfrmPriorityActions.isEmpty() - || (deliverableShfrmPriorityActions == null)) { - return true; - } else { - return false; - } - } - } - if (clazz == ProjectBudget.class) { ProjectBudget projectBudget = this.projectBudgetManager.getProjectBudgetById(id); @@ -1087,7 +1061,7 @@ public boolean canBeDeleted(long id, String className) { } return true; } catch (Exception e) { - Log.error("error getting class " + e); + return true; } @@ -5157,37 +5131,6 @@ public Map getSession() { return this.session; } - public List getShfrmActionDeliverablesRelation(Long shfrmPrimaryActionId) { - - List deliverablesRelated = new ArrayList<>(); - if (shfrmPrimaryActionId != null && shfrmPrimaryActionId != 0) { - List deliverableShfrmPriorityActions = null; - try { - deliverableShfrmPriorityActions = deliverableShfrmPriorityActionManager.findAll().stream() - .filter(d -> d.getShfrmPriorityAction() != null && d.getShfrmPriorityAction().getId() != null - && d.getShfrmPriorityAction().getId().equals(shfrmPrimaryActionId) && d.getPhase() != null - && d.getPhase().getId().equals(this.getActualPhase().getId())) - .collect(Collectors.toList()); - } catch (Exception e) { - Log.error("error getting shfrm " + e); - } - if (deliverableShfrmPriorityActions != null && !deliverableShfrmPriorityActions.isEmpty()) { - for (DeliverableShfrmPriorityAction deliverableShfrmPriorityAction : deliverableShfrmPriorityActions) { - if (deliverableShfrmPriorityAction != null && deliverableShfrmPriorityAction.getDeliverable() != null) { - Deliverable deliverableAdd = deliverableShfrmPriorityAction.getDeliverable(); - deliverableAdd.setDeliverableInfo(deliverableAdd.getDeliverableInfo(getActualPhase())); - deliverablesRelated.add(deliverableShfrmPriorityAction.getDeliverable()); - } - } - } - } - if (deliverablesRelated != null && !deliverablesRelated.isEmpty()) { - return deliverablesRelated; - } else { - return null; - } - } - /** * This method return the first AF AICCRA ID Phase * @@ -7347,14 +7290,6 @@ public boolean isSaveable() { return this.saveable; } - public boolean isShfrmSpecificityActive() { - try { - return Boolean.parseBoolean(this.getSession().get(APConstants.SHFRM_CONTRIBUTION_ACTIVE).toString()); - } catch (Exception e) { - return false; - } - } - public boolean isSubmit(long projectID) { Project project = this.projectManager.getProjectById(projectID); int year = this.getCurrentCycleYear(); @@ -8403,7 +8338,6 @@ public boolean validatePolicy(long policyID) { return true; } - // public boolean validURL(String URL) { try { @@ -8420,5 +8354,4 @@ public boolean validURL(String URL) { } - } diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java deleted file mode 100644 index 7ef57cccb7..0000000000 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * This file is part of Managing Agricultural Research for Learning&*Outcomes Platform(MARLO). - ** MARLO is free software:you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation,either version 3 of the License,or*at your option)any later version. - ** MARLO is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY;without even the implied warranty of*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See - * the - ** GNU General Public License for more details. - ** You should have received a copy of the GNU General Public License - ** along with MARLO.If not,see. - *****************************************************************/ - -package org.cgiar.ccafs.marlo.action.crp.admin; - -import org.cgiar.ccafs.marlo.action.BaseAction; -import org.cgiar.ccafs.marlo.data.manager.ShfrmPriorityActionManager; -import org.cgiar.ccafs.marlo.data.manager.ShfrmSubActionManager; -import org.cgiar.ccafs.marlo.data.model.ShfrmPriorityAction; -import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; -import org.cgiar.ccafs.marlo.utils.APConfig; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import java.util.stream.Collectors; - -import javax.inject.Inject; - -import org.jfree.util.Log; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -public class ShfrmManagementAction extends BaseAction { - - private static Logger logger = LoggerFactory.getLogger(ShfrmManagementAction.class); - private static final long serialVersionUID = -793652591843623397L; - private List priorityActions; - private final ShfrmPriorityActionManager shfrmPriorityActionManager; - private final ShfrmSubActionManager shfrmSubActionManager; - - @Inject - public ShfrmManagementAction(APConfig config, ShfrmPriorityActionManager shfrmPriorityActionManager, - ShfrmSubActionManager shfrmSubActionManager) { - super(config); - this.shfrmPriorityActionManager = shfrmPriorityActionManager; - this.shfrmSubActionManager = shfrmSubActionManager; - } - - /** - * Fill Priority actions with sub actions list - */ - public void fillSubActions() { - if (priorityActions != null && !priorityActions.isEmpty()) { - try { - List subActions = shfrmSubActionManager.findAll(); - - if (subActions != null && !subActions.isEmpty()) { - priorityActions.forEach(action -> { - List subActionsAdd = subActions.stream() - .filter(subaction -> action != null && action.getId() != null && subaction != null - && subaction.getShfrmPriorityAction() != null && subaction.getShfrmPriorityAction().getId() != null - && subaction.getShfrmPriorityAction().getId().equals(action.getId())) - .collect(Collectors.toList()); - - if (!subActionsAdd.isEmpty()) { - action.setShfrmSubActions(subActionsAdd); - } - }); - } - } catch (Exception e) { - logger.info(e + "no sub actions added yet"); - } - } - } - - public List getPriorityActions() { - return priorityActions; - } - - @Override - public void prepare() throws Exception { - priorityActions = new ArrayList<>(); - priorityActions = shfrmPriorityActionManager.findAll(); - this.fillSubActions(); - if (this.isHttpPost()) { - if (priorityActions != null) { - priorityActions.clear();; - } - } - } - - @Override - public String save() { - if (this.canAcessCrpAdmin()) { - List subActionstoDelete = new ArrayList<>(); - List priorityActionsDB = null; - priorityActionsDB = shfrmPriorityActionManager.findAll(); - - - try { - List subActionsDB = null; - subActionsDB = shfrmSubActionManager.findAll(); - if (this.priorityActions != null && !this.priorityActions.isEmpty()) { - for (ShfrmPriorityAction action : this.priorityActions) { - - // Remove Sub actions - if (action.getShfrmSubActions() != null && !action.getShfrmSubActions().isEmpty()) { - // Obtener los IDs de las subacciones en action.getShfrmSubActions() - Set subActionIdsInFrontend = action.getShfrmSubActions().stream().filter(Objects::nonNull) - .map(ShfrmSubAction::getId).collect(Collectors.toSet()); - - // Filter subActionsDB to retain only the subactions present in action.getShfrmSubActions() - subActionsDB = subActionsDB.stream() - .filter(subActionDB -> subActionDB.getShfrmPriorityAction() != null - && subActionDB.getShfrmPriorityAction().getId() != null - && subActionDB.getShfrmPriorityAction().getId().equals(action.getId()) - && !subActionIdsInFrontend.contains(subActionDB.getId())) - .collect(Collectors.toList()); - - // Delete subactions from subActionsDB that are not in action.getShfrmSubActions() - subActionsDB.forEach(subActionDB -> { - shfrmSubActionManager.deleteShfrmSubAction(subActionDB.getId()); - action.getShfrmSubActions().removeIf(sa -> sa.getId().equals(subActionDB.getId())); - subActionstoDelete.add(subActionDB); - }); - - } else { - subActionsDB.forEach(subActionDB -> { - shfrmSubActionManager.deleteShfrmSubAction(subActionDB.getId()); - subActionstoDelete.add(subActionDB); - }); - } - - } - } - - } catch (Exception e) { - logger.info(e + " error deleting sub action"); - } - - - if (this.priorityActions != null && !this.priorityActions.isEmpty()) { - - if (priorityActionsDB != null) { - try { - List subActions = new ArrayList<>(); - - for (ShfrmPriorityAction actionDB : priorityActionsDB) { - if (this.priorityActions != null && !this.priorityActions.isEmpty()) { - Set actionIdsInFrontend = this.priorityActions.stream().filter(Objects::nonNull) - .map(ShfrmPriorityAction::getId).collect(Collectors.toSet()); - if (!actionIdsInFrontend.contains(actionDB.getId())) { - - // Validate previous sub actions in DB for each priority actions - - try { - subActions = shfrmSubActionManager.findAll().stream() - .filter(subActionDB -> subActionDB.getShfrmPriorityAction() != null - && subActionDB.getShfrmPriorityAction().getId() != null - && subActionDB.getShfrmPriorityAction().getId().equals(actionDB.getId())) - .collect(Collectors.toList());; - - - if (subActions != null && !subActions.isEmpty()) { - - // delete sub actions - for (ShfrmSubAction subActionDelete : subActions) { - if (subActionDelete != null && subActionDelete.getId() != null) { - shfrmSubActionManager.deleteShfrmSubAction(subActionDelete.getId()); - } - } - } - } catch (Exception e) { - logger.error("error deleting sub actions", e); - } - shfrmPriorityActionManager.deleteShfrmPriorityAction(actionDB.getId()); - - - } - } - } - } catch (Exception e) { - logger.info(e + " error deleting actions"); - } - } - - for (ShfrmPriorityAction action : this.priorityActions) { - ShfrmPriorityAction actionSave = new ShfrmPriorityAction(); - if (action.getId() != null) { - actionSave = shfrmPriorityActionManager.getShfrmPriorityActionById(action.getId()); - } - - if (subActionstoDelete != null && !subActionstoDelete.isEmpty()) { - - for (ShfrmSubAction subActiontoDelete : subActionstoDelete) { - if (actionSave.getShfrmSubActions().contains(subActiontoDelete)) { - actionSave.getShfrmSubActions().remove(subActiontoDelete); - } - } - } - - if (action.getName() != null) { - actionSave.setName(action.getName()); - } - if (action.getDescription() != null) { - actionSave.setDescription(action.getDescription()); - } - List subActionsTemp = new ArrayList<>(); - if (action.getShfrmSubActions() != null && !action.getShfrmSubActions().isEmpty()) { - subActionsTemp = action.getShfrmSubActions(); - } - - action = shfrmPriorityActionManager.saveShfrmPriorityAction(actionSave); - action.setShfrmSubActions(subActionsTemp); - - // Save sub-actions - if (action.getShfrmSubActions() != null && !action.getShfrmSubActions().isEmpty()) { - for (ShfrmSubAction subAction : action.getShfrmSubActions()) { - ShfrmSubAction subActionSave = new ShfrmSubAction(); - - if (subAction.getId() != null) { - subActionSave.setId(subAction.getId()); - } - if (subAction.getName() != null) { - subActionSave.setName(subAction.getName()); - } - if (subAction.getDescription() != null) { - subActionSave.setDescription(subAction.getDescription()); - } - if (action.getId() != null) { - subActionSave.setShfrmPriorityAction(action); - } - try { - shfrmSubActionManager.saveShfrmSubAction(subActionSave); - } catch (Exception e) { - logger.info(e + " error saving sub action"); - } - } - } - } - } else { - // Delete all priority actions DB - try { - List subActions = new ArrayList<>(); - - if (priorityActionsDB != null && !priorityActionsDB.isEmpty()) { - for (ShfrmPriorityAction priorityActionDB : priorityActionsDB) { - - subActions = shfrmSubActionManager.findAll().stream() - .filter(subActionDB -> subActionDB.getShfrmPriorityAction() != null - && subActionDB.getShfrmPriorityAction().getId() != null - && subActionDB.getShfrmPriorityAction().getId().equals(priorityActionDB.getId())) - .collect(Collectors.toList());; - - - if (subActions != null && !subActions.isEmpty()) { - - // delete sub actions - for (ShfrmSubAction subActionDelete : subActions) { - if (subActionDelete != null && subActionDelete.getId() != null) { - shfrmSubActionManager.deleteShfrmSubAction(subActionDelete.getId()); - } - } - } - - shfrmPriorityActionManager.deleteShfrmPriorityAction(priorityActionDB.getId()); - } - } - } catch (Exception e) { - logger.error("error deleting priority actions: " + e); - } - } - - - if (this.getUrl() == null || this.getUrl().isEmpty()) { - Collection messages = this.getActionMessages(); - /* - * if (!this.getInvalidFields().isEmpty()) { - * this.setActionMessages(null); - * // this.addActionMessage(Map.toString(this.getInvalidFields().toArray())); - * List keys = new ArrayList(this.getInvalidFields().keySet()); - * for (String key : keys) { - * this.addActionMessage(key + ": " + this.getInvalidFields().get(key)); - * } - * } else { - * this.addActionMessage("message:" + this.getText("saving.saved")); - * } - */ - this.addActionMessage("message:" + this.getText("saving.saved")); - - return SUCCESS; - } else { - this.addActionMessage(""); - this.setActionMessages(null); - return REDIRECT; - } - - } else { - return NOT_AUTHORIZED; - } - } - - public void setPriorityActions(List priorityActions) { - this.priorityActions = priorityActions; - } - - - @Override - public void validate() { - try { - if (save) { - } - } catch (Exception e) { - Log.error("validating error " + e); - } - } -} \ No newline at end of file diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/bi/BiReportsTokenAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/bi/BiReportsTokenAction.java index afc1dfc3b3..3de5e3b804 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/bi/BiReportsTokenAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/bi/BiReportsTokenAction.java @@ -102,7 +102,7 @@ private PowerBiBody generatePowerBiBody(BiReports biReport) { /* Identities */ List identities = new ArrayList<>(); Identities identitie = new Identities(); - identitie.setUsername(this.getCurrentUser().getEmail()); + identitie.setUsername(this.getCurrentUser().getUsername()); /* Roles */ List roles = new ArrayList<>(); diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/project/SubActionsByPriorityAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/project/SubActionsByPriorityAction.java deleted file mode 100644 index 882fa4542a..0000000000 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/project/SubActionsByPriorityAction.java +++ /dev/null @@ -1,102 +0,0 @@ -/***************************************************************** - * This file is part of Managing Agricultural Research for Learning & - * Outcomes Platform (MARLO). - * MARLO is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * MARLO is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with MARLO. If not, see . - *****************************************************************/ - -package org.cgiar.ccafs.marlo.action.json.project; - -import org.cgiar.ccafs.marlo.action.BaseAction; -import org.cgiar.ccafs.marlo.config.APConstants; -import org.cgiar.ccafs.marlo.data.manager.ShfrmSubActionManager; -import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; -import org.cgiar.ccafs.marlo.utils.APConfig; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -import javax.inject.Inject; - -import org.apache.commons.lang3.StringUtils; -import org.apache.struts2.dispatcher.Parameter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SubActionsByPriorityAction extends BaseAction { - - private static final long serialVersionUID = 3674950424554096761L; - private long priorityActionID; - private ShfrmSubActionManager shfrmSubActionManager; - private List> subActions; - private final Logger logger = LoggerFactory.getLogger(SubActionsByPriorityAction.class); - - - @Inject - public SubActionsByPriorityAction(APConfig config, ShfrmSubActionManager shfrmSubActionManager) { - super(config); - this.shfrmSubActionManager = shfrmSubActionManager; - } - - @Override - public String execute() throws Exception { - subActions = new ArrayList<>(); - Map subAction; - List shfrmSubActions = new ArrayList<>(); - try { - shfrmSubActions = shfrmSubActionManager.findAll().stream() - .filter(s -> s != null && s.isActive() && s.getShfrmPriorityAction() != null - && s.getShfrmPriorityAction().getId() != null && s.getShfrmPriorityAction().getId().equals(priorityActionID)) - .collect(Collectors.toList()); - } catch (Exception e) { - logger.error("error getting sub actions " + e); - } - - if (shfrmSubActions != null && !shfrmSubActions.isEmpty()) { - for (ShfrmSubAction shfrmSubAction : shfrmSubActions) { - subAction = new HashMap(); - subAction.put("id", shfrmSubAction.getId()); - subAction.put("composedName", shfrmSubAction.getComposedName()); - subAction.put("name", shfrmSubAction.getName()); - subAction.put("description", shfrmSubAction.getDescription()); - if (shfrmSubAction.getShfrmPriorityAction() != null - && shfrmSubAction.getShfrmPriorityAction().getId() != null) { - subAction.put("priorityActionId", shfrmSubAction.getShfrmPriorityAction().getId()); - } - subActions.add(subAction); - } - } - return SUCCESS; - - } - - public List> getSubActions() { - return subActions; - } - - @Override - public void prepare() throws Exception { - // Map parameters = this.getParameters(); - // partnerID = Long.parseLong(StringUtils.trim(((String[]) parameters.get(APConstants.PARTNER_ID))[0])); - - Map parameters = this.getParameters(); - priorityActionID = - Long.parseLong(StringUtils.trim(parameters.get(APConstants.PRIORITY_ACTION_ID).getMultipleValues()[0])); - } - - public void setSubActions(List> subActions) { - this.subActions = subActions; - } - -} diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/tip/TipDinamicUrlGenerationAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/tip/TipDinamicUrlGenerationAction.java index 0e7ad618c3..f1de6f813b 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/tip/TipDinamicUrlGenerationAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/tip/TipDinamicUrlGenerationAction.java @@ -44,36 +44,22 @@ public TipDinamicUrlGenerationAction() { public String createDinamicURL() { String tipURL = null; - boolean isCGIARUser = true; - try { + List tipParameters = tipParametersManager.findAll(); + String userEmail = "", token = "", loginService = ""; if (this.getCurrentUser() != null && this.getCurrentUser().getEmail() != null) { userEmail = this.getCurrentUser().getEmail(); - if (this.getCurrentUser().isCgiarUser() == true) { - isCGIARUser = true; - } else { - isCGIARUser = false; - } } - - List tipParameters = tipParametersManager.findAll(); - if (isCGIARUser) { - if (tipParameters != null && !tipParameters.isEmpty() && tipParameters.get(0) != null) { - if (tipParameters.get(0).getTipTokenService() != null) { - token = tipParameters.get(0).getTokenValue(); - } - if (tipParameters.get(0).getTipLoginService() != null) { - loginService = tipParameters.get(0).getTipLoginService(); - } + if (tipParameters != null && !tipParameters.isEmpty() && tipParameters.get(0) != null) { + if (tipParameters.get(0).getTipTokenService() != null) { + token = tipParameters.get(0).getTokenValue(); } - tipURL = loginService + "/" + token + "/staff/" + userEmail; - } else { - // Not CGIAR User - if (tipParameters != null && tipParameters.get(0) != null && tipParameters.get(0).getTipBaseUrl() != null) { - tipURL = tipParameters.get(0).getTipBaseUrl(); + if (tipParameters.get(0).getTipLoginService() != null) { + loginService = tipParameters.get(0).getTipLoginService(); } } + tipURL = loginService + "/" + token + "/staff/" + userEmail; } catch (NumberFormatException e) { LOG.error("Error getting tip URL: " + e); } diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java index 62b1d13d3a..83569e6c41 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java @@ -47,8 +47,6 @@ import org.cgiar.ccafs.marlo.data.manager.DeliverablePublicationMetadataManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableQualityAnswerManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableQualityCheckManager; -import org.cgiar.ccafs.marlo.data.manager.DeliverableShfrmPriorityActionManager; -import org.cgiar.ccafs.marlo.data.manager.DeliverableShfrmSubActionManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableTraineesIndicatorManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableTypeManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableUserManager; @@ -79,9 +77,6 @@ import org.cgiar.ccafs.marlo.data.manager.RepIndTypeActivityManager; import org.cgiar.ccafs.marlo.data.manager.RepIndTypeParticipantManager; import org.cgiar.ccafs.marlo.data.manager.RepositoryChannelManager; -import org.cgiar.ccafs.marlo.data.manager.ShfrmPriorityActionManager; -import org.cgiar.ccafs.marlo.data.manager.ShfrmSubActionManager; -import org.cgiar.ccafs.marlo.data.manager.SoilIndicatorManager; import org.cgiar.ccafs.marlo.data.manager.UserManager; import org.cgiar.ccafs.marlo.data.model.Activity; import org.cgiar.ccafs.marlo.data.model.CgiarCrossCuttingMarker; @@ -109,8 +104,6 @@ import org.cgiar.ccafs.marlo.data.model.DeliverableProjectOutcome; import org.cgiar.ccafs.marlo.data.model.DeliverableQualityAnswer; import org.cgiar.ccafs.marlo.data.model.DeliverableQualityCheck; -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmPriorityAction; -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmSubAction; import org.cgiar.ccafs.marlo.data.model.DeliverableTraineesIndicator; import org.cgiar.ccafs.marlo.data.model.DeliverableType; import org.cgiar.ccafs.marlo.data.model.DeliverableUser; @@ -146,9 +139,6 @@ import org.cgiar.ccafs.marlo.data.model.RepIndTypeActivity; import org.cgiar.ccafs.marlo.data.model.RepIndTypeParticipant; import org.cgiar.ccafs.marlo.data.model.RepositoryChannel; -import org.cgiar.ccafs.marlo.data.model.ShfrmPriorityAction; -import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; -import org.cgiar.ccafs.marlo.data.model.SoilIndicator; import org.cgiar.ccafs.marlo.data.model.User; import org.cgiar.ccafs.marlo.security.Permission; import org.cgiar.ccafs.marlo.utils.APConfig; @@ -165,7 +155,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; @@ -259,11 +248,7 @@ public class DeliverableAction extends BaseAction { private FeedbackQACommentManager feedbackQACommentManager; private FeedbackQACommentableFieldsManager feedbackQACommentableFieldsManager; private DeliverableTraineesIndicatorManager deliverableTraineesIndicatorManager; - private ShfrmPriorityActionManager shfrmPriorityActionManager; - private ShfrmSubActionManager shfrmSubActionManager; - private DeliverableShfrmPriorityActionManager deliverableShfrmPriorityActionManager; - private DeliverableShfrmSubActionManager deliverableShfrmSubActionManager; - private SoilIndicatorManager soilIndicatorManager; + // Variables private List answers; @@ -277,8 +262,6 @@ public class DeliverableAction extends BaseAction { private Boolean has_specific_management_deliverables; private Boolean isManagingPartnerPersonRequerid; private List deliverableTypeParent; - private List shfrmPriorityActions; - private List deliverableShfrmPriorityActions; private DeliverableValidator deliverableValidator; private List fundingSources; private List activities; @@ -313,7 +296,7 @@ public class DeliverableAction extends BaseAction { private String DOI; private String handle; private String disseminationURL; - private String soilIndicatorsText; + private List focusLevels; // HJ 08/01/2019 new fileds Deliverable Partnerships @@ -363,10 +346,7 @@ public DeliverableAction(APConfig config, DeliverableTypeManager deliverableType FeedbackQACommentableFieldsManager feedbackQACommentableFieldsManager, FeedbackQACommentManager feedbackQACommentManager, DeliverableClusterParticipantManager deliverableClusterParticipantManager, - DeliverableTraineesIndicatorManager deliverableTraineesIndicatorManager, - ShfrmPriorityActionManager shfrmPriorityActionManager, ShfrmSubActionManager shfrmSubActionManager, - DeliverableShfrmPriorityActionManager deliverableShfrmPriorityActionManager, - DeliverableShfrmSubActionManager deliverableShfrmSubActionManager, SoilIndicatorManager soilIndicatorManager) { + DeliverableTraineesIndicatorManager deliverableTraineesIndicatorManager) { super(config); this.activityManager = activityManager; this.deliverableManager = deliverableManager; @@ -428,11 +408,6 @@ public DeliverableAction(APConfig config, DeliverableTypeManager deliverableType this.feedbackQACommentableFieldsManager = feedbackQACommentableFieldsManager; this.feedbackQACommentManager = feedbackQACommentManager; this.deliverableTraineesIndicatorManager = deliverableTraineesIndicatorManager; - this.shfrmPriorityActionManager = shfrmPriorityActionManager; - this.shfrmSubActionManager = shfrmSubActionManager; - this.deliverableShfrmPriorityActionManager = deliverableShfrmPriorityActionManager; - this.deliverableShfrmSubActionManager = deliverableShfrmSubActionManager; - this.soilIndicatorManager = soilIndicatorManager; } /** @@ -454,7 +429,6 @@ public DeliverableClusterParticipant actualDeliverableClusterParticipant() { } } - @Override public String cancel() { @@ -479,7 +453,6 @@ public String cancel() { return SUCCESS; } - public Boolean candEditExpectedYear(long deliverableID) { Deliverable deliverable = deliverableManager.getDeliverableById(deliverableID); @@ -535,42 +508,6 @@ public Boolean candEditYear(long deliverableID) { } - public void deleteAllActionsAndSubActions() { - try { - deliverable.getDeliverableInfo().setShfrmContributionNarrative(null); - List actionPrev = deliverableShfrmPriorityActionManager - .findByDeliverableAndPhase(deliverable.getId(), this.getActualPhase().getId()); - - List deliverableSubActions = new ArrayList<>(); - - if (actionPrev != null) { - for (DeliverableShfrmPriorityAction priorityAction : actionPrev) { - if (priorityAction != null && priorityAction.getId() != null) { - - deliverableSubActions = deliverableShfrmSubActionManager - .findByPriorityActionAndPhase(priorityAction.getId(), this.getActualPhase().getId()); - - if (deliverableSubActions != null && !deliverableSubActions.isEmpty()) { - - // delete sub actions - for (DeliverableShfrmSubAction deliverableSubActionDelete : deliverableSubActions) { - if (deliverableSubActionDelete != null && deliverableSubActionDelete.getId() != null) { - deliverableShfrmSubActionManager.deleteDeliverableShfrmSubAction(deliverableSubActionDelete.getId()); - } - } - } - - // delete actions - deliverableShfrmPriorityActionManager.deleteDeliverableShfrmPriorityAction(priorityAction.getId()); - } - } - } - - } catch (Exception e) { - logger.error("unable to delete priority action", e); - } - } - private void deleteDeliverableLocations(List locationsDB) { if (locationsDB != null) { for (DeliverableLocation deliverableLocation : locationsDB) { @@ -686,101 +623,6 @@ public void fillClusterParticipantsList() { } } - public void fillSoilIndicatorsText() { - try { - soilIndicatorsText = null; - List soilIndicators = soilIndicatorManager.findAll(); - if (soilIndicators != null && !soilIndicators.isEmpty()) { - for (SoilIndicator soilIndicator : soilIndicators) { - if (soilIndicator != null && soilIndicator.getIndicatorName() != null) { - if (soilIndicatorsText == null) { - soilIndicatorsText = soilIndicator.getIndicatorName(); - } else { - soilIndicatorsText.concat(", " + soilIndicator.getIndicatorName()); - } - } - - } - } - } catch (Exception e) { - Log.info("error getting soil indicators " + e); - } - } - - public void fillSubActionsGeneralList() { - try { - if (shfrmPriorityActions != null && !shfrmPriorityActions.isEmpty()) { - List subActions; - List subActionsAdd; - for (ShfrmPriorityAction shfrmPriorityAction : shfrmPriorityActions) { - subActions = new ArrayList<>(); - - // Priority action front - if (shfrmPriorityAction != null && shfrmPriorityAction.getId() != null) { - subActionsAdd = new ArrayList<>(); - // Sub Actions DB - subActions = shfrmSubActionManager.findAll(); - if (subActions != null) { - for (ShfrmSubAction subAction : subActions) { - - if (subAction != null && subAction.getShfrmPriorityAction() != null - && subAction.getShfrmPriorityAction().getId() != null) { - if (subAction.getShfrmPriorityAction().getId().equals(shfrmPriorityAction.getId())) { - subActionsAdd.add(subAction); - } - } - } - if (subActionsAdd != null) { - shfrmPriorityAction.setShfrmSubActions(subActionsAdd); - } - } - } - } - } - - } catch (Exception e) { - logger.error("error getting sub actions: " + e); - } - } - - public void fillSubActionsList() { - try { - if (deliverable.getShfrmPriorityActions() != null && !deliverable.getShfrmPriorityActions().isEmpty()) { - List subActions; - List subActionsAdd; - for (DeliverableShfrmPriorityAction deliverableShfrmPriorityAction : deliverable.getShfrmPriorityActions()) { - subActions = new ArrayList<>(); - - // Priority action front - if (deliverableShfrmPriorityAction != null && deliverableShfrmPriorityAction.getShfrmPriorityAction() != null - && deliverableShfrmPriorityAction.getShfrmPriorityAction().getId() != null) { - subActionsAdd = new ArrayList<>(); - // Sub Actions DB - subActions = shfrmSubActionManager.findAll(); - if (subActions != null) { - for (ShfrmSubAction subAction : subActions) { - - if (subAction != null && subAction.getShfrmPriorityAction() != null - && subAction.getShfrmPriorityAction().getId() != null) { - if (subAction.getShfrmPriorityAction().getId() - .equals(deliverableShfrmPriorityAction.getShfrmPriorityAction().getId())) { - subActionsAdd.add(subAction); - } - } - } - if (subActionsAdd != null) { - deliverableShfrmPriorityAction.getShfrmPriorityAction().setShfrmSubActions(subActionsAdd); - } - } - } - } - } - - } catch (Exception e) { - logger.error("error getting sub actions: " + e); - } - } - public Integer getAcceptationPercentage() { return acceptationPercentage; } @@ -810,7 +652,6 @@ public long getActualClusterParticipantID() { } } - public List getAnswers() { return answers; } @@ -882,10 +723,6 @@ public long getDeliverableID() { return deliverableID; } - public List getDeliverableShfrmPriorityActions() { - return deliverableShfrmPriorityActions; - } - public List> getDeliverablesSubTypes(long deliverableTypeID) { List> subTypes = new ArrayList<>(); Map keyOutput; @@ -961,20 +798,20 @@ public List getMyProjects() { return myProjects; } - public List getPartnerInstitutions() { return partnerInstitutions; } - public List getPartnerPersons() { return partnerPersons; } + public List getPartners() { return partners; } + /** * @return an array of integers. */ @@ -1061,14 +898,6 @@ public List getResponsibleUsers() { return responsibleUsers; } - public List getShfrmPriorityActions() { - return shfrmPriorityActions; - } - - public String getSoilIndicatorsText() { - return soilIndicatorsText; - } - public Map getStatus() { return status; } @@ -1241,43 +1070,6 @@ public boolean isPPA(Institution institution) { return false; } - public boolean isSoilIndicatorSelected() { - boolean containsIndicator = false; - - try { - if (deliverable.getCrpOutcomes() != null || !deliverable.getCrpOutcomes().isEmpty()) { - List soilIndicators = new ArrayList<>(); - soilIndicators = soilIndicatorManager.findAll(); - for (DeliverableCrpOutcome indicator : deliverable.getCrpOutcomes()) { - if (soilIndicators != null && !soilIndicators.isEmpty()) { - for (SoilIndicator soilIndicator : soilIndicators) { - if (indicator != null && indicator.getCrpProgramOutcome() != null - && indicator.getCrpProgramOutcome().getId() != null) { - try { - CrpProgramOutcome outcome = - crpProgramOutcomeManager.getCrpProgramOutcomeById(indicator.getCrpProgramOutcome().getId()); - if (outcome != null && outcome.getAcronym() != null) { - indicator.getCrpProgramOutcome().setAcronym(outcome.getAcronym()); - } - } catch (Exception e) { - Log.error("error getting crp program outcome " + e); - } - } - if (soilIndicator != null && soilIndicator.getIndicatorName() != null && indicator != null - && indicator.getCrpProgramOutcome() != null && indicator.getCrpProgramOutcome().getAcronym() != null - && indicator.getCrpProgramOutcome().getAcronym().contains(soilIndicator.getIndicatorName())) { - containsIndicator = true; - } - } - } - } - } - } catch (Exception e) { - Log.error("error validating soil indicator boolean " + e); - } - return containsIndicator; - } - @Override public void prepare() throws Exception { existCurrentCluster = false; @@ -1617,46 +1409,6 @@ public void prepare() throws Exception { .filter(o -> o.getPhase().getId().equals(this.getActualPhase().getId())).collect(Collectors.toList()))); } - // SHFRM contribution - if (this.hasSpecificities(APConstants.SHFRM_CONTRIBUTION_ACTIVE)) { - shfrmPriorityActions = shfrmPriorityActionManager.findAll(); - - if (deliverable.getDeliverableShfrmPriorityAction() != null) { - deliverable.setShfrmPriorityActions(new ArrayList<>(deliverable.getDeliverableShfrmPriorityAction().stream() - .filter(o -> o.isActive() && o.getPhase().getId().equals(this.getActualPhase().getId())) - .sorted(Comparator.comparing(DeliverableShfrmPriorityAction::getId)).collect(Collectors.toList()))); - } - this.fillSubActionsList(); - this.fillSubActionsGeneralList(); - - if (deliverable != null && deliverable.getShfrmPriorityActions() != null - && !deliverable.getShfrmPriorityActions().isEmpty()) { - for (DeliverableShfrmPriorityAction deliverablePriorityAction : deliverable.getShfrmPriorityActions()) { - try { - - // Test code - if (deliverablePriorityAction.getShfrmSubActions() == null) { - List deliverableShfrmSubAction = new ArrayList<>(); - deliverablePriorityAction.setShfrmSubActions(deliverableShfrmSubAction); - } - - if (deliverablePriorityAction.getDeliverableShfrmSubAction() != null) { - deliverablePriorityAction - .setShfrmSubActions(new ArrayList<>(deliverablePriorityAction.getDeliverableShfrmSubAction() - .stream().filter(o -> o.isActive() && o.getPhase().getId().equals(this.getActualPhase().getId())) - .sorted(Comparator.comparing(DeliverableShfrmSubAction::getId)).collect(Collectors.toList()))); - } - - } catch (Exception e) { - logger.error("No se pueden obtener deliverableSubActions para deliverablePriorityAction: {}", - deliverablePriorityAction, e); - } - } - } - - this.fillSoilIndicatorsText(); - } - // Expected Study Geographic Regions List if (deliverable.getDeliverableGeographicRegions() != null && !deliverable.getDeliverableGeographicRegions().isEmpty()) { @@ -2414,14 +2166,6 @@ public void prepare() throws Exception { if (deliverable.getCrpOutcomes() != null) { deliverable.getCrpOutcomes().clear(); } - - if (deliverable.getShfrmPriorityActions() != null) { - deliverable.getShfrmPriorityActions().clear(); - } - - if (deliverable.getShfrmSubActions() != null) { - deliverable.getShfrmSubActions().clear(); - } } try { @@ -2548,16 +2292,6 @@ public String save() { } } - // SHFRM contribution - if (this.hasSpecificities(APConstants.SHFRM_CONTRIBUTION_ACTIVE)) { - this.savePriorityActions(false); - this.saveSubActions(); - if (deliverable.getDeliverableInfo() != null && (deliverable.getDeliverableInfo().getContributingShfrm() != null - && deliverable.getDeliverableInfo().getContributingShfrm() == false)) { - this.deleteAllActionsAndSubActions(); - } - } - /* * Delete the field 'new expected year' when the status is different to Extended and this field has information */ @@ -3796,113 +3530,6 @@ private void saveParticipant() { } } - /** - * Save Deliverable SHFRM priority action Information - * - * @param delete - true for only execute delete process - */ - public void savePriorityActions(boolean onlyDeleteProcess) { - - // Search and deleted form Information - try { - - List actionPrev = deliverableShfrmPriorityActionManager - .findByDeliverableAndPhase(deliverable.getId(), this.getActualPhase().getId()); - - if (this.deliverable.getShfrmPriorityActions() != null) { - List existingIds = new ArrayList<>(); - - for (DeliverableShfrmPriorityAction shfrmDeliverable : this.deliverable.getShfrmPriorityActions()) { - if (shfrmDeliverable != null && shfrmDeliverable.getId() != null) { - existingIds.add(shfrmDeliverable.getId()); - } - } - - List deliverableSubActions = new ArrayList<>(); - - if (actionPrev != null) { - for (DeliverableShfrmPriorityAction priorityAction : actionPrev) { - if (priorityAction != null && priorityAction.getId() != null) { - - // if (deliverableSubActions == null || (deliverableSubActions != null && - // deliverableSubActions.isEmpty())) { - - if (!existingIds.contains(priorityAction.getId())) { - deliverableSubActions = deliverableShfrmSubActionManager - .findByPriorityActionAndPhase(priorityAction.getId(), this.getActualPhase().getId()); - - if (deliverableSubActions != null && !deliverableSubActions.isEmpty()) { - - // delete sub actions - for (DeliverableShfrmSubAction deliverableSubActionDelete : deliverableSubActions) { - if (deliverableSubActionDelete != null && deliverableSubActionDelete.getId() != null) { - deliverableShfrmSubActionManager - .deleteDeliverableShfrmSubAction(deliverableSubActionDelete.getId()); - } - } - } - - // delete actions - deliverableShfrmPriorityActionManager.deleteDeliverableShfrmPriorityAction(priorityAction.getId()); - } - - } - } - } - } - - } catch (Exception e) { - logger.error("unable to delete priority action", e); - } - - // Save form Information - if (this.deliverable.getShfrmPriorityActions() != null && onlyDeleteProcess == false) { - DeliverableShfrmPriorityAction deliverablePriorityActionsSave; - for (DeliverableShfrmPriorityAction deliverablePriorityActions : this.deliverable.getShfrmPriorityActions()) { - deliverablePriorityActionsSave = new DeliverableShfrmPriorityAction(); - - if (deliverablePriorityActions != null) { - // For new deliverable Priority Actions - if (deliverablePriorityActions.getId() == null || deliverablePriorityActions.getId() == -1) { - deliverablePriorityActionsSave.setDeliverable(deliverable); - deliverablePriorityActionsSave.setPhase(this.getActualPhase()); - } else { - // For old deliverable Priority Actions - try { - if (deliverablePriorityActions.getId() != null) { - deliverablePriorityActionsSave = deliverableShfrmPriorityActionManager - .getDeliverableShfrmPriorityActionById(deliverablePriorityActions.getId()); - } - } catch (Exception e) { - logger.error("unable to get old deliverable Priority Actions", e); - } - } - - if (deliverablePriorityActions.getShfrmPriorityAction() != null - && deliverablePriorityActions.getShfrmPriorityAction().getId() != null) { - ShfrmPriorityAction priorityAction = shfrmPriorityActionManager - .getShfrmPriorityActionById(deliverablePriorityActions.getShfrmPriorityAction().getId()); - if (deliverable != null && priorityAction != null && priorityAction.getId() != null) { - deliverablePriorityActionsSave.setDeliverable(deliverable); - deliverablePriorityActionsSave.setShfrmPriorityAction(priorityAction); - deliverablePriorityActionsSave.setPhase(this.getActualPhase()); - } - - DeliverableShfrmPriorityAction priorityActionTemp = this.deliverableShfrmPriorityActionManager - .saveDeliverableShfrmPriorityAction(deliverablePriorityActionsSave); - if (priorityActionTemp != null && priorityActionTemp.getId() != null) { - deliverablePriorityActions.setId(priorityActionTemp.getId()); - } - // This is to add deliverablePriorityActions to generate correct auditlog. - if (!this.deliverable.getDeliverableShfrmPriorityAction().contains(deliverablePriorityActionsSave)) { - this.deliverable.getDeliverableShfrmPriorityAction().add(deliverablePriorityActionsSave); - } - } - } - } - } - } - /** * All we are doing here is setting the modification justification. */ @@ -4160,136 +3787,6 @@ public void saveQualityCheck() { } - /** - * Save Deliverable SHFRM sub actions Information - */ - public void saveSubActions() { - - // Search and deleted form Information - try { - if (this.deliverable.getShfrmPriorityActions() != null && !this.deliverable.getShfrmPriorityActions().isEmpty()) { - for (DeliverableShfrmPriorityAction priorityAction : this.deliverable.getShfrmPriorityActions()) { - - List existingIds = new ArrayList<>(); - List subPrev = null; - try { - subPrev = deliverableShfrmSubActionManager.findByPriorityActionAndPhase(priorityAction.getId(), - this.getActualPhase().getId()); - } catch (Exception e) { - logger.error("No sub actions added ", e); - } - - if (priorityAction.getShfrmSubActions() != null) { - - for (DeliverableShfrmSubAction shfrmSubDeliverable : priorityAction.getShfrmSubActions()) { - if (shfrmSubDeliverable != null && shfrmSubDeliverable.getId() != null) { - existingIds.add(shfrmSubDeliverable.getId()); - } - } - - if (subPrev != null) { - for (DeliverableShfrmSubAction subAction : subPrev) { - if (subAction != null && subAction.getId() != null) { - - if (!existingIds.contains(subAction.getId())) { - deliverableShfrmSubActionManager.deleteDeliverableShfrmSubAction(subAction.getId()); - } - - } - } - } - } else { - // Delete all in DB - - if (subPrev != null && !subPrev.isEmpty()) { - for (DeliverableShfrmSubAction subAction : subPrev) { - if (subAction != null && subAction.getId() != null) { - deliverableShfrmSubActionManager.deleteDeliverableShfrmSubAction(subAction.getId()); - } - } - } - - } - - /***************/ - - } - - } - } catch (Exception e) { - logger.error("unable to delete priority action", e); - } - - // Save form Information - if (this.deliverable.getShfrmPriorityActions() != null) { - DeliverableShfrmSubAction deliverableSubActionSave; - for (DeliverableShfrmPriorityAction deliverablePriorityAction : this.deliverable.getShfrmPriorityActions()) { - if (deliverablePriorityAction != null && deliverablePriorityAction.getShfrmSubActions() != null) { - for (DeliverableShfrmSubAction deliverableSubAction : deliverablePriorityAction.getShfrmSubActions()) { - deliverableSubActionSave = new DeliverableShfrmSubAction(); - - if (deliverableSubAction != null) { - if (deliverableSubAction.getShfrmSubAction() != null - && deliverableSubAction.getShfrmSubAction().getId() != null) { - ShfrmSubAction subAction = - shfrmSubActionManager.getShfrmSubActionById(deliverableSubAction.getShfrmSubAction().getId()); - if (subAction != null) { - // For new deliverable Priority Actions - if (deliverableSubAction.getId() == null || deliverableSubAction.getId() == -1) { - deliverableSubActionSave.setId(null); - if (deliverablePriorityAction.getDeliverable() == null) { - deliverablePriorityAction.setDeliverable(deliverable); - } - deliverableSubActionSave.setDeliverableShfrmPriorityAction(deliverablePriorityAction); - deliverableSubActionSave.setPhase(this.getActualPhase()); - deliverableSubActionSave.setShfrmSubAction(subAction); - this.deliverableShfrmSubActionManager.saveDeliverableShfrmSubAction(deliverableSubActionSave); - - } else { - // For old deliverable Priority Actions - try { - deliverableSubActionSave = - deliverableShfrmSubActionManager.getDeliverableShfrmSubActionById(deliverableSubAction.getId()); - if (deliverableSubActionSave != null) { - if (deliverablePriorityAction.getDeliverable() == null) { - deliverablePriorityAction.setDeliverable(deliverable); - } - deliverableSubActionSave.setDeliverableShfrmPriorityAction(deliverablePriorityAction); - deliverableSubActionSave.setPhase(this.getActualPhase()); - deliverableSubActionSave.setShfrmSubAction(subAction); - this.deliverableShfrmSubActionManager.saveDeliverableShfrmSubAction(deliverableSubActionSave); - } - - } catch (Exception e) { - logger.error("unable to get old deliverable sub Actions", e); - } - } - - // This is to add deliverablePriorityActions to generate correct auditlog. - /* - * if (!this.deliverable.getDeliverableShfrmSubAction().contains(deliverableSubActionSave)) { - * this.deliverable.getDeliverableShfrmSubAction().add(deliverableSubActionSave); - * } - */ - } - } - } - } - } - } - } - - // Try to check -> delete priority actions deleted from front-end after delete the sub-actions when all sub actions - // was deleted - /* - * if (this.deliverable.getShfrmPriorityActions() == null - * || (this.deliverable.getShfrmPriorityActions() != null && this.deliverable.getShfrmPriorityActions().isEmpty())) - * { - * this.savePriorityActions(true); - * } - */ - } - public void saveUsers() { if (deliverable.getUsers() == null) { @@ -4365,10 +3862,6 @@ public void setDeliverableID(long deliverableID) { this.deliverableID = deliverableID; } - public void setDeliverableShfrmPriorityActions(List deliverableShfrmPriorityActions) { - this.deliverableShfrmPriorityActions = deliverableShfrmPriorityActions; - } - public void setDeliverableSubTypes(List deliverableSubTypes) { this.deliverableSubTypes = deliverableSubTypes; } @@ -4497,14 +3990,6 @@ public void setResponsibleUsers(List responsibleUsers) { this.responsibleUsers = responsibleUsers; } - public void setShfrmPriorityActions(List shfrmPriorityActions) { - this.shfrmPriorityActions = shfrmPriorityActions; - } - - public void setSoilIndicatorsText(String soilIndicatorsText) { - this.soilIndicatorsText = soilIndicatorsText; - } - public void setStatus(Map status) { this.status = status; } diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/superadmin/TIPManagementAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/superadmin/TIPManagementAction.java index d8ffcd4403..f7c6748438 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/superadmin/TIPManagementAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/superadmin/TIPManagementAction.java @@ -63,9 +63,6 @@ public String save() { if (tipParameter.getId() != null) { tipParameterSave.setId(tipParameter.getId()); } - if (tipParameter.getTipBaseUrl() != null) { - tipParameterSave.setTipBaseUrl(tipParameter.getTipBaseUrl()); - } if (tipParameter.getTipLoginService() != null) { tipParameterSave.setTipLoginService(tipParameter.getTipLoginService()); } diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java index 97b3655e00..61fb7893cb 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java @@ -161,7 +161,6 @@ public final class APConstants { public static final String DUPLICATED_DELIVERABLES_FUNCTIONALITY_ACTIVE = "duplicated_deliverables_functionality_active"; public static final String HIGHLIGHT_COMMENTS_ACTIVE = "highlight_comments_active"; - public static final String SHFRM_CONTRIBUTION_ACTIVE = "shfrm_contribution_active"; public static final String TIP_SECTION_ACTIVE = "tip_section_active"; @@ -184,8 +183,6 @@ public final class APConstants { public static final String DELIVERABLE_FILE_LOCALLY_HOSTED_STR = "Locally"; public static final String DELIVERABLE_ID = "deliverableId"; - public static final String PRIORITY_ACTION_ID = "priorityActionId"; - public static final String SUB_ACTION_ID = "subActionId"; public static final int DELIVERABLE_QUALITY_ANSWER_NO = 3; public static final int DELIVERABLE_QUALITY_ANSWER_YES = 2; public static final int DELIVERABLE_QUALITY_ANSWER_YES_BUT_NO = 1; diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/validation/projects/DeliverableValidator.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/validation/projects/DeliverableValidator.java index e731beb863..765e29bb68 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/validation/projects/DeliverableValidator.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/validation/projects/DeliverableValidator.java @@ -19,38 +19,31 @@ import org.cgiar.ccafs.marlo.action.BaseAction; import org.cgiar.ccafs.marlo.config.APConstants; import org.cgiar.ccafs.marlo.data.manager.CgiarCrossCuttingMarkerManager; -import org.cgiar.ccafs.marlo.data.manager.CrpProgramOutcomeManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableUserManager; import org.cgiar.ccafs.marlo.data.manager.GlobalUnitManager; import org.cgiar.ccafs.marlo.data.manager.ProjectManager; import org.cgiar.ccafs.marlo.data.manager.ProjectPartnerPersonManager; import org.cgiar.ccafs.marlo.data.manager.RepIndTypeActivityManager; -import org.cgiar.ccafs.marlo.data.manager.SoilIndicatorManager; import org.cgiar.ccafs.marlo.data.model.CgiarCrossCuttingMarker; -import org.cgiar.ccafs.marlo.data.model.CrpProgramOutcome; import org.cgiar.ccafs.marlo.data.model.Deliverable; import org.cgiar.ccafs.marlo.data.model.DeliverableCrossCuttingMarker; -import org.cgiar.ccafs.marlo.data.model.DeliverableCrpOutcome; import org.cgiar.ccafs.marlo.data.model.DeliverableDissemination; import org.cgiar.ccafs.marlo.data.model.DeliverableGeographicScope; import org.cgiar.ccafs.marlo.data.model.DeliverableInfo; import org.cgiar.ccafs.marlo.data.model.DeliverableMetadataElement; import org.cgiar.ccafs.marlo.data.model.DeliverableParticipant; import org.cgiar.ccafs.marlo.data.model.DeliverablePublicationMetadata; -import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmPriorityAction; import org.cgiar.ccafs.marlo.data.model.GlobalUnit; import org.cgiar.ccafs.marlo.data.model.Project; import org.cgiar.ccafs.marlo.data.model.ProjectSectionStatusEnum; import org.cgiar.ccafs.marlo.data.model.ProjectStatusEnum; import org.cgiar.ccafs.marlo.data.model.RepIndTypeActivity; -import org.cgiar.ccafs.marlo.data.model.SoilIndicator; import org.cgiar.ccafs.marlo.utils.InvalidFieldsMessages; import org.cgiar.ccafs.marlo.utils.doi.DOIService; import org.cgiar.ccafs.marlo.validation.BaseValidator; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -58,7 +51,6 @@ import javax.inject.Inject; import javax.inject.Named; -import org.jfree.util.Log; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,8 +69,6 @@ public class DeliverableValidator extends BaseValidator { private DeliverableUserManager deliverableUserManager; private CgiarCrossCuttingMarkerManager cgiarCrossCuttingMarkerManager; private RepIndTypeActivityManager repIndTypeActivityManager; - private SoilIndicatorManager soilIndicatorManager; - private CrpProgramOutcomeManager crpProgramOutcomeManager; Boolean doesNotHaveDOI; @@ -86,16 +76,13 @@ public class DeliverableValidator extends BaseValidator { public DeliverableValidator(GlobalUnitManager crpManager, ProjectManager projectManager, ProjectPartnerPersonManager projectPartnerPersonManager, CgiarCrossCuttingMarkerManager cgiarCrossCuttingMarkerManager, RepIndTypeActivityManager repIndTypeActivityManager, - DeliverableUserManager deliverableUserManager, SoilIndicatorManager soilIndicatorManager, - CrpProgramOutcomeManager crpProgramOutcomeManager) { + DeliverableUserManager deliverableUserManager) { this.crpManager = crpManager; this.projectManager = projectManager; this.projectPartnerPersonManager = projectPartnerPersonManager; this.cgiarCrossCuttingMarkerManager = cgiarCrossCuttingMarkerManager; this.deliverableUserManager = deliverableUserManager; this.repIndTypeActivityManager = repIndTypeActivityManager; - this.soilIndicatorManager = soilIndicatorManager; - this.crpProgramOutcomeManager = crpProgramOutcomeManager; } private Path getAutoSaveFilePath(Deliverable deliverable, long crpID, BaseAction action) { @@ -538,114 +525,7 @@ public void validate(BaseAction action, Deliverable deliverable, boolean saving) } } - // SHFRM contribution validations - - if (action.hasSpecificities(APConstants.SHFRM_CONTRIBUTION_ACTIVE)) { - - // Validate if is contributing - if (dInfo != null && dInfo.getContributingShfrm() != null && dInfo.getContributingShfrm() == true) { - - // Validate Soil indicators - if (deliverable.getCrpOutcomes() != null || !deliverable.getCrpOutcomes().isEmpty()) { - List soilIndicators = new ArrayList<>(); - soilIndicators = soilIndicatorManager.findAll(); - boolean containsIndicator = false; - for (DeliverableCrpOutcome indicator : deliverable.getCrpOutcomes()) { - if (soilIndicators != null && !soilIndicators.isEmpty()) { - for (SoilIndicator soilIndicator : soilIndicators) { - if (indicator != null && indicator.getCrpProgramOutcome() != null - && indicator.getCrpProgramOutcome().getId() != null) { - try { - CrpProgramOutcome outcome = - crpProgramOutcomeManager.getCrpProgramOutcomeById(indicator.getCrpProgramOutcome().getId()); - if (outcome != null && outcome.getAcronym() != null) { - indicator.getCrpProgramOutcome().setAcronym(outcome.getAcronym()); - } - } catch (Exception e) { - Log.error("error getting crp program outcome " + e); - } - } - if (soilIndicator != null && soilIndicator.getIndicatorName() != null && indicator != null - && indicator.getCrpProgramOutcome() != null && indicator.getCrpProgramOutcome().getAcronym() != null - && indicator.getCrpProgramOutcome().getAcronym().trim() - .contains(soilIndicator.getIndicatorName().trim())) { - containsIndicator = true; - } - } - } - } - - // not contains indicator - if (containsIndicator == false) { - action.addMessage(action.getText("deliverable.crpOutcomes")); - action.addMissingField("deliverable.crpOutcomes"); - action.getInvalidFields().put("list-deliverable.crpOutcomes", InvalidFieldsMessages.EMPTYFIELD); - } - } - - // Validate contribution narrative - if (action.isReportingActive()) { - if (!(this - .isValidString(deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrativeAR()) - && this.wordCount( - deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrativeAR()) <= 200)) { - action.addMessage(action.getText("deliverable.deliverableInfo.shfrmContributionNarrativeAR")); - action.addMissingField("deliverable.deliverableInfo.shfrmContributionNarrativeAR"); - action.getInvalidFields().put("input-deliverable.deliverableInfo.shfrmContributionNarrativeAR", - InvalidFieldsMessages.EMPTYFIELD); - } - } else { - if (!(this - .isValidString(deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrative()) - && this.wordCount( - deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrative()) <= 200)) { - action.addMessage(action.getText("deliverable.deliverableInfo.shfrmContributionNarrative")); - action.addMissingField("deliverable.deliverableInfo.shfrmContributionNarrative"); - action.getInvalidFields().put("input-deliverable.deliverableInfo.shfrmContributionNarrative", - InvalidFieldsMessages.EMPTYFIELD); - } - } - - // Validate priority actions - if (deliverable.getShfrmPriorityActions() == null - || (deliverable.getShfrmPriorityActions() != null && deliverable.getShfrmPriorityActions().isEmpty())) { - action.addMessage(action.getText("deliverable.shfrmPriorityActions")); - action.addMissingField("deliverable.shfrmPriorityActions"); - action.getInvalidFields().put("list-deliverable.shfrmPriorityActions", InvalidFieldsMessages.EMPTYFIELD); - } else if (deliverable.getShfrmPriorityActions() != null - && !deliverable.getShfrmPriorityActions().isEmpty()) { - int indexI = 0; - - for (DeliverableShfrmPriorityAction priorityAction : deliverable.getShfrmPriorityActions()) { - if (priorityAction != null && priorityAction.getShfrmSubActions() == null || (priorityAction != null - && priorityAction.getShfrmSubActions() != null && priorityAction.getShfrmSubActions().isEmpty())) { - action.addMessage(action.getText("deliverable.shfrmSubActions")); - action.addMissingField("deliverable.shfrmSubActions"); - action.getInvalidFields().put("list-deliverable.shfrmPriorityActions", - InvalidFieldsMessages.EMPTYFIELD); - /* - * action.addMessage(action.getText("deliverable.shfrmSubActions[" + indexI + "]")); - * action.addMissingField("deliverable.shfrmSubActions[" + indexI + "]"); - * action.getInvalidFields().put("list-deliverable.shfrmPriorityAction[" + indexI + "].shfrmSubActions", - * InvalidFieldsMessages.EMPTYFIELD); - */ - indexI++; - } - } - } - - } else { - // Validate empty contributing question - if (dInfo != null && (dInfo.getContributingShfrm() == null)) { - action.addMessage(action.getText("deliverable.deliverableInfo.contributingShfrm")); - action.getInvalidFields().put("input-deliverable.deliverableInfo.contributingShfrm", - InvalidFieldsMessages.EMPTYFIELD); - } - } - } } - - this.saveMissingFields(deliverable, action.getActualPhase().getDescription(), action.getActualPhase().getYear(), action.getActualPhase().getUpkeep(), ProjectSectionStatusEnum.DELIVERABLES.getStatus(), action); } diff --git a/marlo-web/src/main/resources/custom/aicrra.properties b/marlo-web/src/main/resources/custom/aicrra.properties index d919c36e08..03c85cfe04 100644 --- a/marlo-web/src/main/resources/custom/aicrra.properties +++ b/marlo-web/src/main/resources/custom/aicrra.properties @@ -43,7 +43,6 @@ global.cookieConsentMessage=By default, MARLO uses cookies to ensure you get the global.webSiteLink.placeholder=https:// global.viewMore=View More global.crps=PTFs -global.ShfrmPriorityAction=Priority Action # Systems Messages systemMessage.serverReset=We are restarting the server in order to apply some improvements to the system. Please save what you are doing in a word document (if needed) since you will have to login again. Sorry for the inconvenience. @@ -212,7 +211,6 @@ tipParameterManagement.title=TIP Management tipParameter.privateKey=Private Key tipParameter.tipTokenService=Token Service Endpoint tipParameter.tipLoginService=Login Service Endpoint -tipParameter.tipBaseUrl=Base URL tipParameter.tipStatusService= Status Service Endpoint tipParameter.tokenValue= Token Value tipParameter.updateToken= Update Token @@ -345,7 +343,6 @@ breadCrumb.menu.timelineManagement=Timeline Management breadCrumb.menu.feedbackManagement=Feedback Management breadCrumb.menu.buttonGuideManagement=Button Guide Management breadCrumb.menu.messageManagement=MARLO Message Management -breadCrumb.menu.shfrmManagement=Soil Health and Fertility Road Map # Message section message.title=MARLO Message Management @@ -942,19 +939,6 @@ deliverable.typeOfActivity.other=Other deliverable.typeOfActivity.other.description= deliverable.missing.activity.alert=There are {0} deliverable(s) in this cluster not mapped to any activity
*Please keep in mind that without full fill this task the green-check mark validator will not be reflected
-deliverable.shfrmContribution.question.reporting=Is this deliverable contributing to the Soil Health and Fertiliser Road Map (SHFRM) implementation: -deliverable.shfrmContribution.question.planning=Is this deliverable expected to contribute to the Soil Health and Fertiliser Road Map (SHFRM) implementation: -deliverable.shfrmContribution.question.help=If you select yes, please make sure to select the SHFRM priority action and sub-action in the next question -deliverable.shfrmContribution.narrative.reporting=Provide a short narrative on the contribution of this deliverable to the SHFRM -deliverable.shfrmContribution.narrative.planning=Provide a short narrative on the expected contribution of this deliverable to the SHFRM -deliverable.shfrmContribution.priorityAction=To which priority action of the SHFRM is this deliverable contributing to? -deliverable.shfrmContribution.priorityAction.help=Select a priority action and sub-action -deliverable.shfrmContribution.subAction=To which specific sub-action of the SHFRM is this deliverable contributing to? -deliverable.shfrmContribution.subAction.help=Select sub-action(s) -deliverable.shfrmContribution.indicators.help=Soil Indicator(s): -deliverable.shfrmContribution.narrative.reporting.readText=How this deliverable is expecting to contribute to SHFRM -deliverable.shfrmContribution.narrative.planning.readText=How this deliverable is planning to contribute to SHFRM - intellectualAsset.fillingType=Type of filling intellectualAsset.patentStatus=Patent status intellectualAsset.patentType=Patent Type @@ -1831,7 +1815,6 @@ CRPAdmin.menu.guestUsers=Guest Users CRPAdmin.menu.users=List of users CRPAdmin.menu.deliverables=Deliverables Management CRPAdmin.menu.crpPhases=Planning/Reporting Cycles -CRPAdmin.menu.shfrmManagement=Soil Health and Fertility Road Map # # Program Management Section programManagement.title=Project Management Committee @@ -1929,19 +1912,6 @@ projectPhases.help= projectPhases.visible=Display on timeline projectPhases.editable=Status -# Soil Health and Fertility Road Map Management -shfrmManagement.title=Manage the Soil Health and Fertility Road Map (SHFRM) -shfrmManagement.priorityActions.set=Set the control list for Priority Actions: -shfrmManagement.priorityActions.title=Title -shfrmManagement.priorityActions.description=Description -shfrmManagement.priorityActions.add=Add new priority action -shfrmManagement.subActions.add=Add new sub-action(s) -shfrmManagement.subActions.title=Title -shfrmManagement.subActions.description=Description -shfrmManagement.deliverables.info=See {0} deliverables attached -shfrmManagement.subActionsEmpty=No sub-Action(s) added yet -shfrmManagement.actionsEmpty=No action(s) added yet - # # Super Admin marloSLOs.sloTitle=System Level Outcomes @@ -2703,7 +2673,6 @@ project.deliverable.generalInformation.year=Year of expected completion project.deliverable.generalInformation.justification=Status justification project.deliverable.generalInformation.outcome=Outcome project.deliverable.generalInformation.keyOutput=Performance Indicators -project.deliverable.generalInformation.keyOutput.help=If you select yes in SHFRM question, please make sure to select at least one SHFRM indicator project.deliverable.generalInformation.keyOutputNotice=If the indicator you are looking for is not listed, please ensure the indicator is mapped to this cluster by clicking here project.deliverable.generalInformation.keyOutputNotList1=Remember that you must to add cluster of activities project.deliverable.generalInformation.keyOutputNotList2=, then you will be able to select key outputs. diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1508__UpdateDeliverablesInfoTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1508__UpdateDeliverablesInfoTable.sql deleted file mode 100644 index b27a22a659..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1508__UpdateDeliverablesInfoTable.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE deliverables_info ADD is_contributing_shfrm tinyint(1) DEFAULT 0 NULL; -ALTER TABLE deliverables_info ADD shfrm_contribution_narrative varchar(200) NULL; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1509__CreateShfrmPriorityActionsTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1509__CreateShfrmPriorityActionsTable.sql deleted file mode 100644 index d0fcff5e67..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1509__CreateShfrmPriorityActionsTable.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE shfrm_priority_actions ( - id bigint(20) auto_increment NOT NULL, - name varchar(100) NULL, - is_active tinyint(1) NULL, - description varchar(300) NULL, - modified_by bigint(20) NULL, - modification_justification text NULL, - created_by bigint(20) NULL, - active_since timestamp DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP NULL, - CONSTRAINT shfrm_priority_action_pk PRIMARY KEY (id), - CONSTRAINT shfrm_priority_actions_users_FK FOREIGN KEY (modified_by) REFERENCES users(id) ON DELETE RESTRICT ON UPDATE RESTRICT -) -ENGINE=InnoDB -DEFAULT CHARSET=utf8 -COLLATE=utf8_general_ci; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1510__CreateShfrmSubActionsTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1510__CreateShfrmSubActionsTable.sql deleted file mode 100644 index d11df3f67e..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1510__CreateShfrmSubActionsTable.sql +++ /dev/null @@ -1,17 +0,0 @@ -CREATE TABLE shfrm_sub_actions ( - id bigint(20) auto_increment NOT NULL, - name varchar(100) NULL, - description varchar(300) NULL, - shfrm_priority_action_id bigint(20) NOT NULL, - is_active tinyint(1) NULL, - modified_by bigint(20) NULL, - modification_justification text NULL, - created_by bigint(20) NULL, - active_since timestamp DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP NULL, - CONSTRAINT shfrm_sub_action_pk PRIMARY KEY (id), - CONSTRAINT shfrm_sub_action_users_FK FOREIGN KEY (modified_by) REFERENCES users(id) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT shfrm_sub_actions_FK FOREIGN KEY (shfrm_priority_action_id) REFERENCES shfrm_priority_actions(id) ON DELETE RESTRICT ON UPDATE RESTRICT -) -ENGINE=InnoDB -DEFAULT CHARSET=utf8 -COLLATE=utf8_czech_ci; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1511__CreateDeliverableShfrmPriorityActionsTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1511__CreateDeliverableShfrmPriorityActionsTable.sql deleted file mode 100644 index a01fb1e7f2..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1511__CreateDeliverableShfrmPriorityActionsTable.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE deliverable_shfrm_priority_action ( - id bigint(20) auto_increment NOT NULL, - deliverable_id bigint(20) NOT NULL, - shfrm_priority_action_id bigint(20) NOT NULL, - is_active tinyint(1) NULL, - id_phase bigint(20) NOT NULL, - modified_by bigint(20) NULL, - modification_justification text NULL, - created_by bigint(20) NULL, - active_since timestamp DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP NULL, - CONSTRAINT deliverable_shfrm_priority_action_pk PRIMARY KEY (id), - CONSTRAINT deliverable_shfrm_priority_action_deliverables_FK FOREIGN KEY (deliverable_id) REFERENCES deliverables(id) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT deliverable_shfrm_priority_action_phases_FK FOREIGN KEY (id_phase) REFERENCES phases(id) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT deliverable_shfrm_priority_action_shfrm_priority_actions_FK FOREIGN KEY (shfrm_priority_action_id) REFERENCES shfrm_priority_actions(id) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT deliverable_shfmr_priority_action_users_FK FOREIGN KEY (modified_by) REFERENCES users(id) ON DELETE RESTRICT ON UPDATE RESTRICT - -) -ENGINE=InnoDB -DEFAULT CHARSET=utf8 -COLLATE=utf8_general_ci; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1512__CreateDeliverableShfrmSubActionsTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1512__CreateDeliverableShfrmSubActionsTable.sql deleted file mode 100644 index 50ba5b0aa8..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240126_1512__CreateDeliverableShfrmSubActionsTable.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE deliverable_shfmr_sub_action ( - id bigint(20) auto_increment NOT NULL, - deliverable_shfrm_priority_action_id bigint(20) NOT NULL, - shfrm_sub_action_id bigint(20) NULL, - is_active tinyint(1) NULL, - id_phase bigint(20) NOT NULL, - modified_by bigint(20) NULL, - modification_justification text NULL, - created_by bigint(20) NULL, - active_since timestamp DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP NULL, - CONSTRAINT deliverable_shfmr_sub_action_pk PRIMARY KEY (id), - CONSTRAINT deliverable_shfmr_sub_action_phases_FK FOREIGN KEY (id_phase) REFERENCES phases(id) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT deliverable_shfmr_sub_action_users_FK FOREIGN KEY (modified_by) REFERENCES users(id) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT deliverable_shfmr_sub_action_shfrm_sub_actions_FK FOREIGN KEY (shfrm_sub_action_id) REFERENCES shfrm_sub_actions(id) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT deliverable_shfmr_sub_action_deliverable_FK FOREIGN KEY (deliverable_shfrm_priority_action_id) REFERENCES deliverable_shfrm_priority_action(id) ON DELETE RESTRICT ON UPDATE RESTRICT -) - -ENGINE=InnoDB -DEFAULT CHARSET=utf8 -COLLATE=utf8_general_ci; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0728__UpdateShfrmTables.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0728__UpdateShfrmTables.sql deleted file mode 100644 index cc6d618c46..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0728__UpdateShfrmTables.sql +++ /dev/null @@ -1,10 +0,0 @@ -ALTER TABLE shfrm_priority_actions MODIFY COLUMN is_active tinyint(1) DEFAULT 1 NOT NULL; - -ALTER TABLE shfrm_sub_actions MODIFY COLUMN is_active tinyint(1) DEFAULT 1 NOT NULL; - -ALTER TABLE deliverable_shfrm_priority_action MODIFY COLUMN is_active tinyint(1) DEFAULT 1 NOT NULL; - -ALTER TABLE deliverable_shfmr_sub_action MODIFY COLUMN is_active tinyint(1) DEFAULT 1 NOT NULL; - - - diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0840__AddSpecifityForShfrmFunction.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0840__AddSpecifityForShfrmFunction.sql deleted file mode 100644 index eeeac93d5f..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0840__AddSpecifityForShfrmFunction.sql +++ /dev/null @@ -1,6 +0,0 @@ -INSERT INTO parameters (global_unit_type_id, `key`, `description`, `format`, default_value, category) -VALUES ( '1', 'shfrm_contribution_active', 'Enable shfrm deliverables contribution functionality)', '1', 'false', '2'); -INSERT INTO parameters (global_unit_type_id, `key`, `description`, `format`, default_value, category) -VALUES ( '3', 'shfrm_contribution_active', 'Enable shfrm deliverables contribution functionality', '1', 'false', '2'); -INSERT INTO parameters (global_unit_type_id, `key`, `description`, `format`, default_value, category) -VALUES ( '4', 'shfrm_contribution_active', 'Enable shfrm deliverables contribution functionality', '1', 'false', '2'); \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0841__CreateShfrmSoilIndicatorsTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0841__CreateShfrmSoilIndicatorsTable.sql deleted file mode 100644 index 48be03b98a..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_0841__CreateShfrmSoilIndicatorsTable.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE soil_indicators ( - id bigint(20) auto_increment NOT NULL, - indicator_name varchar(100) NOT NULL, - indicador_id bigint(20) NULL, - id_phase bigint(20) NOT NULL, - CONSTRAINT soil_indicators_pk PRIMARY KEY (id), - CONSTRAINT soil_indicators_phases_FK FOREIGN KEY (id_phase) REFERENCES phases(id) ON DELETE RESTRICT ON UPDATE RESTRICT -) -ENGINE=InnoDB -DEFAULT CHARSET=utf8 -COLLATE=utf8_general_ci; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_1445__UpdateShfrmSoilIndicatorsField.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_1445__UpdateShfrmSoilIndicatorsField.sql deleted file mode 100644 index c5807f8b8c..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_1445__UpdateShfrmSoilIndicatorsField.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE soil_indicators CHANGE indicador_id indicator_id bigint(20) NULL; diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_1625__UpdateShfrmDeliverablesTables.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_1625__UpdateShfrmDeliverablesTables.sql deleted file mode 100644 index 26f8849fa5..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240202_1625__UpdateShfrmDeliverablesTables.sql +++ /dev/null @@ -1,2 +0,0 @@ -RENAME TABLE deliverable_shfmr_sub_action TO deliverable_shfmr_sub_actions; -RENAME TABLE deliverable_shfrm_priority_action TO deliverable_shfrm_priority_actions; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240204_0600__UpdateShfrmDeliverablesSubActionTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240204_0600__UpdateShfrmDeliverablesSubActionTable.sql deleted file mode 100644 index cdf00ccc76..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240204_0600__UpdateShfrmDeliverablesSubActionTable.sql +++ /dev/null @@ -1 +0,0 @@ -RENAME TABLE deliverable_shfmr_sub_actions TO deliverable_shfrm_sub_actions; diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240207_0900__UpdateShfrmSubActionTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240207_0900__UpdateShfrmSubActionTable.sql deleted file mode 100644 index c3f00b49fc..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240207_0900__UpdateShfrmSubActionTable.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE shfrm_sub_actions COLLATE=utf8_general_ci; diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1000__UpdateShfrmPriorityActionTableDescriptionField.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1000__UpdateShfrmPriorityActionTableDescriptionField.sql deleted file mode 100644 index c1ef8b6153..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1000__UpdateShfrmPriorityActionTableDescriptionField.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE shfrm_sub_actions MODIFY COLUMN description text CHARACTER SET utf8 COLLATE utf8_general_ci NULL; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1010__UpdateShfrmSubActionTableDescriptionField.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1010__UpdateShfrmSubActionTableDescriptionField.sql deleted file mode 100644 index 68692bb648..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1010__UpdateShfrmSubActionTableDescriptionField.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE shfrm_priority_actions MODIFY COLUMN description text CHARACTER SET utf8 COLLATE utf8_general_ci NULL; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1022__UpdateSoilIndicatorsTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1022__UpdateSoilIndicatorsTable.sql deleted file mode 100644 index 58d55e88ae..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1022__UpdateSoilIndicatorsTable.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE soil_indicators MODIFY COLUMN id_phase bigint(20) NULL; diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1415__AddURLfieldinTipParametersTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1415__AddURLfieldinTipParametersTable.sql deleted file mode 100644 index 2c8fb51c7a..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240216_1415__AddURLfieldinTipParametersTable.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE tip_parameters ADD tip_base_url text NULL; diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1043__UpdateDeliverableInfoTable.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1043__UpdateDeliverableInfoTable.sql deleted file mode 100644 index 2169a63679..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1043__UpdateDeliverableInfoTable.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE deliverables_info MODIFY COLUMN shfrm_contribution_narrative text CHARACTER SET utf8 COLLATE utf8_general_ci NULL; \ No newline at end of file diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1420__CreateContributionARColumn.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1420__CreateContributionARColumn.sql deleted file mode 100644 index 4c0619b04f..0000000000 --- a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1420__CreateContributionARColumn.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE deliverables_info ADD shfrm_contribution_narrative_ar text NULL; diff --git a/marlo-web/src/main/resources/global.properties b/marlo-web/src/main/resources/global.properties index f5a3982dfe..5a49dd72ff 100644 --- a/marlo-web/src/main/resources/global.properties +++ b/marlo-web/src/main/resources/global.properties @@ -43,7 +43,6 @@ global.cookieConsentMessage=By default, MARLO uses cookies to ensure you get the global.webSiteLink.placeholder=https:// global.viewMore=View More global.crps=CRPs -global.shfrmPriorityAction=Priority Action # Systems Messages systemMessage.serverReset=We are restarting the server in order to apply some improvements to the system. Please save what you are doing in a word document (if needed) since you will have to login again. Sorry for the inconvenience. @@ -212,7 +211,6 @@ tipParameterManagement.title=TIP Management tipParameter.privateKey=Private Key tipParameter.tipTokenService=Token Service Endpoint tipParameter.tipLoginService=Login Service Endpoint -tipParameter.tipBaseUrl=Base URL tipParameter.tipStatusService= Status Service Endpoint tipParameter.tokenValue= Token Value tipParameter.updateToken= Update Token @@ -346,7 +344,6 @@ breadCrumb.menu.timelineManagement=Timeline Management breadCrumb.menu.feedbackManagement=Feedback Management breadCrumb.menu.buttonGuideManagement=Button Guide Management breadCrumb.menu.messageManagement=MARLO Message Management -breadCrumb.menu.shfrmManagement=Soil Health and Fertility Road Map # Message section message.title=MARLO Message Management @@ -941,20 +938,6 @@ deliverable.typeOfActivity.trials=Trials and studies deliverable.typeOfActivity.trials.description=This includes participants in lab and field trials (including on-farm trials), and direct participants in nutrition studies, impact evaluations and other research studies (soil research, integrated pest management, etc.). deliverable.typeOfActivity.other=Other deliverable.typeOfActivity.other.description= -deliverable.missing.activity.alert=There are {0} deliverable(s) in this cluster not mapped to any activity
*Please keep in mind that without full fill this task the green-check mark validator will not be reflected
- -deliverable.shfrmContribution.question.reporting=Is this deliverable contributing to the Soil Health and Fertiliser Road Map (SHFRM) implementation: -deliverable.shfrmContribution.question.planning=Is this deliverable expected to contribute to the Soil Health and Fertiliser Road Map (SHFRM) implementation: -deliverable.shfrmContribution.question.help=If you select yes, please make sure to select the SHFRM priority action and sub-action in the next question -deliverable.shfrmContribution.narrative.reporting=Provide a short narrative on the contribution of this deliverable the SHFRM -deliverable.shfrmContribution.narrative.planing=Provide a short narrative on the expected contribution of this deliverable the SHFRM -deliverable.shfrmContribution.priorityAction=To which priority action of the SHFRM is this deliverable contributing to? -deliverable.shfrmContribution.priorityAction.help=Select a priority action and sub-action -deliverable.shfrmContribution.subAction=To which specific sub-action of the SHFRM is this deliverable contributing to? -deliverable.shfrmContribution.subAction.help=Select sub-action(s) -deliverable.shfrmContribution.indicators.help=Soil Indicator(s): -deliverable.shfrmContribution.narrative.reporting.readText=How this deliverable is expecting to contribute to SHFRM -deliverable.shfrmContribution.narrative.planning.readText=How this deliverable is planning to contribute to SHFRM intellectualAsset.fillingType=Type of filling intellectualAsset.patentStatus=Patent status @@ -1908,7 +1891,6 @@ CRPAdmin.menu.guestUsers=Guest Users CRPAdmin.menu.users=List of users CRPAdmin.menu.deliverables=Deliverables Management CRPAdmin.menu.crpPhases=Planning/Reporting Cycles -CRPAdmin.menu.shfrmManagement=Soil Health and Fertility Road Map # # Program Management Section programManagement.title=Program Management Unit Team @@ -2003,20 +1985,6 @@ projectPhases.help= projectPhases.visible=Display on timeline projectPhases.editable=Status -# Soil Health and Fertility Road Map Management -shfrmManagement.title=Manage the Soil Health and Fertility Road Map (SHFRM) -shfrmManagement.priorityActions.set=Set the control list for Priority Actions: -shfrmManagement.priorityActions.title=Title -shfrmManagement.priorityActions.description=Description -shfrmManagement.priorityActions.add=Add new priority action -shfrmManagement.subActions.add=Add new sub-action -shfrmManagement.subActions.title=Title -shfrmManagement.subActions.description=Description -shfrmManagement.deliverables.info=See {0} deliverables attached -shfrmManagement.subActionsEmpty=No sub-Action(s) added yet -shfrmManagement.actionsEmpty=No action(s) added yet - - # # Super Admin marloSLOs.sloTitle=System Level Outcomes @@ -2785,7 +2753,6 @@ project.deliverable.generalInformation.year=Year of expected completion project.deliverable.generalInformation.justification=Status justification project.deliverable.generalInformation.outcome=Outcome project.deliverable.generalInformation.keyOutput=Key Output -project.deliverable.generalInformation.keyOutput.help=If you select yes in SHFRM question, please make sure to select at least one SHFRM indicator project.deliverable.generalInformation.keyOutputNotice=Click here to add or edit the list of contribution to performance indicators project.deliverable.generalInformation.keyOutputNotList1=Remember that you must to add cluster of activities project.deliverable.generalInformation.keyOutputNotList2=, then you will be able to select key outputs. diff --git a/marlo-web/src/main/resources/struts-admin.xml b/marlo-web/src/main/resources/struts-admin.xml index 497320f75d..55ffc0b0e6 100644 --- a/marlo-web/src/main/resources/struts-admin.xml +++ b/marlo-web/src/main/resources/struts-admin.xml @@ -109,19 +109,6 @@ ${phaseID} - - - - - /WEB-INF/crp/views/admin/shfrmManagement.ftl - - - ${crpSession}/shfrmManagement - true - ${phaseID} - - diff --git a/marlo-web/src/main/resources/struts-json.xml b/marlo-web/src/main/resources/struts-json.xml index 4f8ff1bead..f9185d2681 100644 --- a/marlo-web/src/main/resources/struts-json.xml +++ b/marlo-web/src/main/resources/struts-json.xml @@ -444,14 +444,6 @@ true - - - - true - true - - diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/macros/relationsPopupMacro.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/macros/relationsPopupMacro.ftl index bc8380203e..1d97f16959 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/macros/relationsPopupMacro.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/macros/relationsPopupMacro.ftl @@ -9,8 +9,8 @@ --] [#if tag == "shfrm"] - [#local shfrmDeliverables = (action.getShfrmActionDeliverablesRelation(element.id))! /] - [#local deliverables = (shfrmDeliverables)![] /] + [#-- [#-local shfrmDeliverables = (action.getShfrmActionDeliverablesRelation(element.id))! /] + [#local deliverables = (shfrmDeliverables)![] /] --] [#else] [#if className == "ProjectPartner"] diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/admin/menu-admin.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/admin/menu-admin.ftl index 5609d35731..e37d9786ee 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/admin/menu-admin.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/admin/menu-admin.ftl @@ -15,41 +15,6 @@ { 'slug': 'crpPhases', 'name': 'CRPAdmin.menu.crpPhases', 'action': 'crpPhases', 'active': true } ]/] -[#if !action.isAiccra()] - [#assign items= [ - { 'slug': 'management', 'name': 'CRPAdmin.menu.hrefProgramManagement', 'action': 'management', 'active': true }, - { 'slug': 'regionalMapping', 'name': 'CRPAdmin.menu.hrefRegionalMapping', 'action': 'regionalMapping', 'active': action.hasProgramnsRegions() }, - { 'slug': 'siteIntegration', 'name': 'CRPAdmin.menu.hrefSiteIntegration', 'action': 'siteIntegration', 'active': true }, - { 'slug': 'ppaPartners', 'name': 'CRPAdmin.menu.hrefPPAPartners', 'action': 'ppaPartners', 'active': true }, - { 'slug': 'activities', 'name': 'CRPAdmin.menu.activities', 'action': 'activityManager', 'active': true }, - { 'slug': 'locations', 'name': 'CRPAdmin.menu.hrefLocations', 'action': 'locations', 'active': true }, - [#-- --{ 'slug': 'projectPhases', 'name': 'CRPAdmin.menu.hrefProjectPhases', 'action': 'projectPhases', 'active': false },--] - { 'slug': 'users', 'name': 'CRPAdmin.menu.users', 'action': 'crpUsers', 'active': true }, - { 'slug': 'deliverables', 'name': 'CRPAdmin.menu.deliverables', 'action': 'crpDeliverables', 'active': true }, - [#-- { 'slug': 'guestUsers', 'name': 'CRPAdmin.menu.guestUsers', 'action': 'guestUser', 'active': !config.production }, --] - { 'slug': 'targetUnits', 'name': 'CRPAdmin.menu.hrefTargetUnits', 'action': 'targetUnits', 'active': true }, - { 'slug': 'institutions', 'name': 'menu.superadmin.institutions', 'action': 'marloInstitutions', 'active': true }, - { 'slug': 'crpPhases', 'name': 'CRPAdmin.menu.crpPhases', 'action': 'crpPhases', 'active': true } - ]/] -[#else] - [#assign items= [ - { 'slug': 'management', 'name': 'CRPAdmin.menu.hrefProgramManagement', 'action': 'management', 'active': true }, - { 'slug': 'regionalMapping', 'name': 'CRPAdmin.menu.hrefRegionalMapping', 'action': 'regionalMapping', 'active': action.hasProgramnsRegions() }, - { 'slug': 'siteIntegration', 'name': 'CRPAdmin.menu.hrefSiteIntegration', 'action': 'siteIntegration', 'active': true }, - { 'slug': 'ppaPartners', 'name': 'CRPAdmin.menu.hrefPPAPartners', 'action': 'ppaPartners', 'active': true }, - { 'slug': 'activities', 'name': 'CRPAdmin.menu.activities', 'action': 'activityManager', 'active': true }, - { 'slug': 'locations', 'name': 'CRPAdmin.menu.hrefLocations', 'action': 'locations', 'active': true }, - [#-- --{ 'slug': 'projectPhases', 'name': 'CRPAdmin.menu.hrefProjectPhases', 'action': 'projectPhases', 'active': false },--] - { 'slug': 'users', 'name': 'CRPAdmin.menu.users', 'action': 'crpUsers', 'active': true }, - { 'slug': 'deliverables', 'name': 'CRPAdmin.menu.deliverables', 'action': 'crpDeliverables', 'active': true }, - [#-- { 'slug': 'guestUsers', 'name': 'CRPAdmin.menu.guestUsers', 'action': 'guestUser', 'active': !config.production }, --] - { 'slug': 'targetUnits', 'name': 'CRPAdmin.menu.hrefTargetUnits', 'action': 'targetUnits', 'active': true }, - <#-- { 'slug': 'institutions', 'name': 'menu.superadmin.institutions', 'action': 'marloInstitutions', 'active': true }, --> - { 'slug': 'crpPhases', 'name': 'CRPAdmin.menu.crpPhases', 'action': 'crpPhases', 'active': true }, - { 'slug': 'shfrmManagement', 'name': 'CRPAdmin.menu.shfrmManagement', 'action': 'shfrmManagement', 'active': action.isShfrmSpecificityActive()} - ]/] -[/#if] -