diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/School.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/School.java index 3df1331d..78d79bbc 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/School.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/School.java @@ -10,6 +10,7 @@ public class School implements Serializable { private static final long serialVersionUID = 2L; + private String schoolId; private String mincode; private String name; private String typeIndicator; @@ -33,6 +34,14 @@ public School(String mincode) { this.mincode = mincode; } + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String value) { + this.schoolId = value; + } + public String getMincode() { return mincode; } diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/SchoolClob.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/SchoolClob.java index 06578112..870925f9 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/SchoolClob.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/SchoolClob.java @@ -21,8 +21,8 @@ public class SchoolClob { private String postal; private String openFlag; private String schoolCategoryCode; - private String schoolCategoryCodeInstitute; - + private String schoolCategoryLegacyCode; + public String getSchoolName() { return schoolName != null ? schoolName.trim(): null; } @@ -53,7 +53,7 @@ public String getOpenFlag() { @Override public String toString() { - return "School [minCode=" + minCode + ", schoolId=" + schoolId + ", schoolCategoryCode=" + schoolCategoryCode + ", schoolCategoryCodeInstitute=" + schoolCategoryCodeInstitute + return "School [minCode=" + minCode + ", schoolId=" + schoolId + ", schoolCategoryCode=" + schoolCategoryCode + ", schoolCategoryLegacyCode=" + schoolCategoryLegacyCode + ", schoolName=" + schoolName + ", districtName=" + districtName + ", transcriptEligibility=" + transcriptEligibility + ", certificateEligibility=" + certificateEligibility + ", address1=" + address1 + ", address2=" + address2 + ", city=" + city + ", provCode=" + provCode + ", countryCode=" + countryCode + ", postal=" + postal + ", openFlag=" + openFlag + "]"; diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/rest/RestUtils.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/rest/RestUtils.java index 9f59322f..4b243c8e 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/rest/RestUtils.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/rest/RestUtils.java @@ -552,8 +552,8 @@ public List getSchoolByDistrictCode(String district) { } } - public SchoolClob getSchoolClob(String minCode) { - return restService.get(String.format(constants.getSchoolByMincode(), minCode), SchoolClob.class, getAccessToken()); + public SchoolClob getSchoolClob(String schoolId) { + return restService.get(String.format(constants.getSchoolClobBySchoolId(), schoolId), SchoolClob.class, getAccessToken()); } public List getDeceasedStudentIDs(List studentIDs) { diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/util/EducGradBatchGraduationApiConstants.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/util/EducGradBatchGraduationApiConstants.java index 830dd08c..a180c50d 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/util/EducGradBatchGraduationApiConstants.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/util/EducGradBatchGraduationApiConstants.java @@ -297,8 +297,8 @@ public class EducGradBatchGraduationApiConstants { @Value("${endpoint.grad-graduation-api.student-certificate-regeneration.url}") private String studentCertificateRegeneration; - @Value("${endpoint.grad-trax-api.school-by-min-code.url}") - private String schoolByMincode; + @Value("${endpoint.grad-trax-api.school-clob-by-school-id.url}") + private String schoolClobBySchoolId; @Value("${endpoint.grad-trax-api.district-by-school-category.url}") private String traxDistrictBySchoolCategory; diff --git a/api/src/main/resources/application.yaml b/api/src/main/resources/application.yaml index a2041739..36cd9091 100644 --- a/api/src/main/resources/application.yaml +++ b/api/src/main/resources/application.yaml @@ -255,7 +255,7 @@ endpoint: grad-trax-api: get-psi-student-list: url: ${GRAD_TRAX_API}api/v1/trax/psi/student?transmissionMode=%s&psiCode=%s&psiYear=%s - school-by-min-code: + school-clob-by-school-id: url: ${GRAD_TRAX_API}api/v2/trax/school-clob/%s school-by-district-code: url: ${GRAD_TRAX_API}api/v2/trax/schools-by-district/%s diff --git a/api/src/test/resources/application.yaml b/api/src/test/resources/application.yaml index 5b515e92..e64d0651 100644 --- a/api/src/test/resources/application.yaml +++ b/api/src/test/resources/application.yaml @@ -220,7 +220,7 @@ endpoint: grad-trax-api: get-psi-student-list: url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/psi/student?transmissionMode=%s&psiCode=%s&psiYear=%s - school-by-min-code: + school-clob-by-school-id: url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/school-clob/%s school-by-district-code: url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/schools-by-district/%s