Skip to content

Commit 889b4a5

Browse files
committed
Merge branch 'aiccra-staging' into aiccra-marlo-java-11-version2
2 parents aa46d54 + 349f23c commit 889b4a5

File tree

225 files changed

+16892
-1001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+16892
-1001
lines changed

.github/workflows/jenkins-trigger.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Trigger Jenkins Job
2+
3+
on:
4+
push:
5+
branches:
6+
- '**' # This will trigger the workflow on any branch that receives a push
7+
workflow_dispatch: # This allows the workflow to be manually triggered if needed
8+
9+
jobs:
10+
trigger-job:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Step 1: Get the branch name and build the URL for Jenkins
15+
- name: Get branch name and build Jenkins URL
16+
run: |
17+
BRANCH_NAME=${GITHUB_REF#refs/heads/} # Remove 'refs/heads/' from GITHUB_REF
18+
BRANCH_NAME=${BRANCH_NAME#aiccra-} # Remove 'aiccra-' from BRANCH_NAME
19+
JENKINS_URL="https://automation.prms.cgiar.org/job/marlo-${BRANCH_NAME}/build"
20+
echo "Jenkins job URL for the branch $BRANCH_NAME is: $JENKINS_URL"
21+
echo "JENKINS_URL=${JENKINS_URL}" >> $GITHUB_ENV
22+
23+
# Step 2: Execute the curl command to trigger the job in Jenkins with the dynamically built URL
24+
- name: Trigger Jenkins Job
25+
run: |
26+
curl -X POST ${{ env.JENKINS_URL }} --user ${{ secrets.JENKINS_USERNAME }}:${{ secrets.JENKINS_API_TOKEN }}
27+
env:
28+
JENKINS_URL: ${{ env.JENKINS_URL }}
29+
JENKINS_USERNAME: ${{ secrets.JENKINS_USERNAME }}
30+
JENKINS_API_TOKEN: ${{ secrets.JENKINS_API_TOKEN }}

marlo-data/src/main/java/org/cgiar/ccafs/marlo/config/APConstants.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public final class APConstants {
140140
public static final String FEEDBACK_COMMENT_REACTION = "feedback_comment_reaction";
141141
public static final String FEEDBACK_RESPONSE = "feedback_response";
142142
public static final String TIP_NOTIFICATION_EMAIL_ACTIVE = "tip_notification_email_active";
143+
public static final String INNOVATION_SECTION_ACTIVE = "innovation_section_active";
143144

144145
public static final String SECTION_ID = "section_id";
145146
public static final String PREVIOUS_PROJECT_ID_ACTIVE = "previous_project_id_field_active";
@@ -241,6 +242,7 @@ public final class APConstants {
241242
public static final String INSTITUTION_REQUEST_ID = "institutionID";
242243
public static final String INSTITUTION_TYPE_REQUEST_ID = "institutionTypeID";
243244
public static final String PARTNER_REQUEST_ID = "requestID";
245+
public static final String SDG_ID = "sdgID";
244246
public static final String PARTNER_REQUEST_SEND_NOTIFICATION = "sendNotification";
245247
public static final String IPLIAISON_INDICATORS_REPORT =
246248
"java.util.Set(org.cgiar.ccafs.marlo.data.model.IpLiaisonInstitution.crpIndicatorReportses)";
@@ -801,6 +803,8 @@ public final class APConstants {
801803
// 01/10/2024 Expected study Partnerships Types
802804
public static final Long EXPECTED_STUDIES_PARTNERSHIP_TYPE_INSTITUION = new Long(2L);
803805
public static final Long EXPECTED_STUDIES_PARTNERSHIP_TYPE_CENTER = new Long(3L);
806+
public static final Long INNOVATION_PARTNERSHIP_TYPE_INSTITUTION = new Long(2L);
807+
public static final Long INNOVATION_PARTNERSHIP_TYPE_CENTER = new Long(3L);
804808

805809
public static String getFilterBy() {
806810
return FILTER_BY;
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*****************************************************************
2+
* This file is part of Managing Agricultural Research for Learning &
3+
* Outcomes Platform (MARLO).
4+
* MARLO is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* at your option) any later version.
8+
* MARLO is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with MARLO. If not, see <http://www.gnu.org/licenses/>.
14+
*****************************************************************/
15+
16+
17+
package org.cgiar.ccafs.marlo.data.dao;
18+
19+
import org.cgiar.ccafs.marlo.data.model.Actor;
20+
21+
import java.util.List;
22+
23+
24+
public interface ActorDAO {
25+
26+
/**
27+
* This method removes a specific actor value from the database.
28+
*
29+
* @param actorId is the actor identifier.
30+
* @return true if the actor was successfully deleted, false otherwise.
31+
*/
32+
public void deleteActor(long actorId);
33+
34+
/**
35+
* This method validate if the actor identify with the given id exists in the system.
36+
*
37+
* @param actorID is a actor identifier.
38+
* @return true if the actor exists, false otherwise.
39+
*/
40+
public boolean existActor(long actorID);
41+
42+
/**
43+
* This method gets a actor object by a given actor identifier.
44+
*
45+
* @param actorID is the actor identifier.
46+
* @return a Actor object.
47+
*/
48+
public Actor find(long id);
49+
50+
/**
51+
* This method gets a list of actor that are active
52+
*
53+
* @return a list from Actor null if no exist records
54+
*/
55+
public List<Actor> findAll();
56+
57+
58+
/**
59+
* This method saves the information of the given actor
60+
*
61+
* @param actor - is the actor object with the new information to be added/updated.
62+
* @return a number greater than 0 representing the new ID assigned by the database, 0 if the actor was
63+
* updated
64+
* or -1 is some error occurred.
65+
*/
66+
public Actor save(Actor actor);
67+
}

marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/FeedbackQACommentDAO.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ public interface FeedbackQACommentDAO {
6969
*/
7070
public List<FeedbackQAComment> getFeedbackQACommentsByParentId(long parentID);
7171

72+
/**
73+
* This method gets a list of feedbackQAComment that are active by Parent id
74+
*
75+
* @param phaseID is a phase section identifier.
76+
* @param parentID is a parent section identifier.
77+
* @return a list from FeedbackQAComment null if no exist records
78+
*/
79+
public List<FeedbackQAComment> getFeedbackQACommentsByPhaseAndParentId(long phaseID, long parentID);
80+
7281
/**
7382
* This method saves the information of the given feedbackQAComment
7483
*

marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/InstitutionLocationDAO.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ public interface InstitutionLocationDAO {
5757
public InstitutionLocation findByLocation(long locationID, long institutionID);
5858

5959

60+
/**
61+
* This method gets a institutionLocation object by a given institutionID identifier.
62+
*
63+
* @param institutionID is the institution identifier.
64+
* @return a InstitutionLocation object.
65+
*/
66+
public InstitutionLocation findHeadquaterByInstitutionID(long institutionID);
67+
6068
/**
6169
* This method saves the information of the given institutionLocation
6270
*
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*****************************************************************
2+
* This file is part of Managing Agricultural Research for Learning &
3+
* Outcomes Platform (MARLO).
4+
* MARLO is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* at your option) any later version.
8+
* MARLO is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with MARLO. If not, see <http://www.gnu.org/licenses/>.
14+
*****************************************************************/
15+
16+
17+
package org.cgiar.ccafs.marlo.data.dao;
18+
19+
import org.cgiar.ccafs.marlo.data.model.IntellectualPropertyRightsInstitution;
20+
21+
import java.util.List;
22+
23+
24+
public interface IntellectualPropertyRightsInstitutionDAO {
25+
26+
/**
27+
* This method removes a specific intellectualPropertyRightsInstitution value from the database.
28+
*
29+
* @param intellectualPropertyRightsInstitutionId is the intellectualPropertyRightsInstitution identifier.
30+
* @return true if the intellectualPropertyRightsInstitution was successfully deleted, false otherwise.
31+
*/
32+
public void deleteIntellectualPropertyRightsInstitution(long intellectualPropertyRightsInstitutionId);
33+
34+
/**
35+
* This method validate if the intellectualPropertyRightsInstitution identify with the given id exists in the system.
36+
*
37+
* @param intellectualPropertyRightsInstitutionID is a intellectualPropertyRightsInstitution identifier.
38+
* @return true if the intellectualPropertyRightsInstitution exists, false otherwise.
39+
*/
40+
public boolean existIntellectualPropertyRightsInstitution(long intellectualPropertyRightsInstitutionID);
41+
42+
/**
43+
* This method gets a intellectualPropertyRightsInstitution object by a given intellectualPropertyRightsInstitution identifier.
44+
*
45+
* @param intellectualPropertyRightsInstitutionID is the intellectualPropertyRightsInstitution identifier.
46+
* @return a IntellectualPropertyRightsInstitution object.
47+
*/
48+
public IntellectualPropertyRightsInstitution find(long id);
49+
50+
/**
51+
* This method gets a list of intellectualPropertyRightsInstitution that are active
52+
*
53+
* @return a list from IntellectualPropertyRightsInstitution null if no exist records
54+
*/
55+
public List<IntellectualPropertyRightsInstitution> findAll();
56+
57+
58+
/**
59+
* This method saves the information of the given intellectualPropertyRightsInstitution
60+
*
61+
* @param intellectualPropertyRightsInstitution - is the intellectualPropertyRightsInstitution object with the new information to be added/updated.
62+
* @return a number greater than 0 representing the new ID assigned by the database, 0 if the intellectualPropertyRightsInstitution was
63+
* updated
64+
* or -1 is some error occurred.
65+
*/
66+
public IntellectualPropertyRightsInstitution save(IntellectualPropertyRightsInstitution intellectualPropertyRightsInstitution);
67+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*****************************************************************
2+
* This file is part of Managing Agricultural Research for Learning &
3+
* Outcomes Platform (MARLO).
4+
* MARLO is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* at your option) any later version.
8+
* MARLO is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with MARLO. If not, see <http://www.gnu.org/licenses/>.
14+
*****************************************************************/
15+
16+
17+
package org.cgiar.ccafs.marlo.data.dao;
18+
19+
import org.cgiar.ccafs.marlo.data.model.ProjectInnovationActor;
20+
21+
import java.util.List;
22+
23+
24+
public interface ProjectInnovationActorDAO {
25+
26+
/**
27+
* This method removes a specific projectInnovationActor value from the database.
28+
*
29+
* @param projectInnovationActorId is the projectInnovationActor identifier.
30+
* @return true if the projectInnovationActor was successfully deleted, false otherwise.
31+
*/
32+
public void deleteProjectInnovationActor(long projectInnovationActorId);
33+
34+
/**
35+
* This method validate if the projectInnovationActor identify with the given id exists in the system.
36+
*
37+
* @param projectInnovationActorID is a projectInnovationActor identifier.
38+
* @return true if the projectInnovationActor exists, false otherwise.
39+
*/
40+
public boolean existProjectInnovationActor(long projectInnovationActorID);
41+
42+
/**
43+
* This method gets a projectInnovationActor object by a given projectInnovationActor identifier.
44+
*
45+
* @param projectInnovationActorID is the projectInnovationActor identifier.
46+
* @return a ProjectInnovationActor object.
47+
*/
48+
public ProjectInnovationActor find(long id);
49+
50+
/**
51+
* This method gets a list of projectInnovationActor that are active
52+
*
53+
* @return a list from ProjectInnovationActor null if no exist records
54+
*/
55+
public List<ProjectInnovationActor> findAll();
56+
57+
58+
/**
59+
* This method gets a list of projectInnovationActor by a given phase and innovation identifier.
60+
*
61+
* @param innovationID is a innovation identifier.
62+
* @param phaseID is a phase identifier.
63+
* @return a list from ProjectInnovationActor null if no exist records
64+
*/
65+
public List<ProjectInnovationActor> getProjectInnovationActorByInnovationAndPhase(long innovationID, long phaseID);
66+
67+
/**
68+
* This method saves the information of the given projectInnovationActor
69+
*
70+
* @param projectInnovationActor - is the projectInnovationActor object with the new information to be added/updated.
71+
* @return a number greater than 0 representing the new ID assigned by the database, 0 if the projectInnovationActor
72+
* was
73+
* updated
74+
* or -1 is some error occurred.
75+
*/
76+
public ProjectInnovationActor save(ProjectInnovationActor projectInnovationActor);
77+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/*****************************************************************
2+
* This file is part of Managing Agricultural Research for Learning &
3+
* Outcomes Platform (MARLO).
4+
* MARLO is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* at your option) any later version.
8+
* MARLO is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with MARLO. If not, see <http://www.gnu.org/licenses/>.
14+
*****************************************************************/
15+
16+
17+
package org.cgiar.ccafs.marlo.data.dao;
18+
19+
import org.cgiar.ccafs.marlo.data.model.ProjectInnovationAllianceLevers;
20+
21+
import java.util.List;
22+
23+
24+
public interface ProjectInnovationAllianceLeversDAO {
25+
26+
/**
27+
* This method removes a specific projectInnovationAllianceLevers value from the database.
28+
*
29+
* @param projectInnovationAllianceLeversId is the projectInnovationAllianceLevers identifier.
30+
* @return true if the projectInnovationAllianceLevers was successfully deleted, false otherwise.
31+
*/
32+
public void deleteProjectInnovationAllianceLevers(long projectInnovationAllianceLeversId);
33+
34+
/**
35+
* This method validate if the projectInnovationAllianceLevers identify with the given id exists in the system.
36+
*
37+
* @param projectInnovationAllianceLeversID is a projectInnovationAllianceLevers identifier.
38+
* @return true if the projectInnovationAllianceLevers exists, false otherwise.
39+
*/
40+
public boolean existProjectInnovationAllianceLevers(long projectInnovationAllianceLeversID);
41+
42+
/**
43+
* This method gets a projectInnovationAllianceLevers object by a given projectInnovationAllianceLevers identifier.
44+
*
45+
* @param projectInnovationAllianceLeversID is the projectInnovationAllianceLevers identifier.
46+
* @return a ProjectInnovationAllianceLevers object.
47+
*/
48+
public ProjectInnovationAllianceLevers find(long id);
49+
50+
/**
51+
* This method gets a list of projectInnovationAllianceLevers that are active
52+
*
53+
* @return a list from ProjectInnovationAllianceLevers null if no exist records
54+
*/
55+
public List<ProjectInnovationAllianceLevers> findAll();
56+
57+
/**
58+
* This method gets a projectInnovationAllianceLevers object by a given a innovation and phase identifier.
59+
*
60+
* @param innovationId is the phase identifier.
61+
* @param phaseID is the phase identifier.
62+
* @return a list from ProjectInnovationAllianceLevers null if no exist records
63+
*/
64+
public List<ProjectInnovationAllianceLevers> getProjectInnovationAllianceLeversByInnovationAndPhase(long innovationID,
65+
long phaseID);
66+
67+
/**
68+
* This method gets a projectInnovationAllianceLevers object by a given phase identifier.
69+
*
70+
* @param phaseID is the phase identifier.
71+
* @return a list from ProjectInnovationAllianceLevers null if no exist records
72+
*/
73+
public List<ProjectInnovationAllianceLevers> getProjectInnovationAllianceLeversByPhase(long phaseID);
74+
75+
/**
76+
* This method saves the information of the given projectInnovationAllianceLevers
77+
*
78+
* @param projectInnovationAllianceLevers - is the projectInnovationAllianceLevers object with the new information to
79+
* be added/updated.
80+
* @return a number greater than 0 representing the new ID assigned by the database, 0 if the
81+
* projectInnovationAllianceLevers was
82+
* updated
83+
* or -1 is some error occurred.
84+
*/
85+
public ProjectInnovationAllianceLevers save(ProjectInnovationAllianceLevers projectInnovationAllianceLevers);
86+
}

0 commit comments

Comments
 (0)