Skip to content

Commit

Permalink
Merge branch 'aiccra-shfrm-contribution-functionality' into aiccra-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjitm committed Feb 15, 2024
2 parents 1482cc9 + a2102d5 commit 9594497
Show file tree
Hide file tree
Showing 75 changed files with 6,954 additions and 551 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ 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";
Expand All @@ -175,6 +176,8 @@ 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*****************************************************************
* 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 <http://www.gnu.org/licenses/>.
*****************************************************************/


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<DeliverableShfrmPriorityAction> findAll();


public List<DeliverableShfrmPriorityAction> findByDeliverableAndPhase(long deliverableId, 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);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*****************************************************************
* 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 <http://www.gnu.org/licenses/>.
*****************************************************************/


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<DeliverableShfrmSubAction> findAll();


public List<DeliverableShfrmSubAction> findByPriorityActionAndPhase(long priorityActionId, long phaseId);

public List<DeliverableShfrmSubAction> 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);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*****************************************************************
* 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 <http://www.gnu.org/licenses/>.
*****************************************************************/


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<ShfrmPriorityAction> 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);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*****************************************************************
* 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 <http://www.gnu.org/licenses/>.
*****************************************************************/


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<ShfrmSubAction> 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);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*****************************************************************
* 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 <http://www.gnu.org/licenses/>.
*****************************************************************/


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<SoilIndicator> 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);
}
Loading

0 comments on commit 9594497

Please sign in to comment.