Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grad2-3111 Grad Graduation Api deployment conversion #305

Closed
wants to merge 9 commits into from
Original file line number Diff line number Diff line change
@@ -8,6 +8,9 @@
public class District {

private String districtNumber;
private String districtName;
private String displayName;

public String getDistrictName() {
return displayName;
}
}
Original file line number Diff line number Diff line change
@@ -8,24 +8,20 @@
public class School {

private String minCode;
private String schoolId;
private String schoolName;
private String districtName;
private String transcriptEligibility;
private String certificateEligibility;
private String independentDesignation;
private String mailerType;
private String address1;
private String address1;
private String address2;
private String city;
private String provCode;
private String provinceName;
private String countryCode;
private String countryName;
private String countryCode;
private String postal;
private String independentAffiliation;
private String openFlag;
private String signatureDistrict;
private String schoolCategory;
private String schoolCategoryCode;
private String schoolCategoryCodeInstitute;

public String getSchoolName() {
return schoolName != null ? schoolName.trim(): null;
@@ -46,26 +42,16 @@ public String getAddress2() {
public String getCity() {
return city != null ? city.trim(): null;
}

public String getProvinceName() {
return provinceName != null ? provinceName.trim(): null;
}

public String getCountryName() {
return countryName != null ? countryName.trim(): null;
}

public String getPostal() {
return postal != null ? postal.trim(): null;
}

@Override
public String toString() {
return "School [minCode=" + minCode + ", schoolName=" + schoolName + ", districtName=" + districtName
+ ", transcriptEligibility=" + transcriptEligibility + ", certificateEligibility="
+ certificateEligibility + ", independentDesignation=" + independentDesignation + ", mailerType="
+ mailerType + ", address1=" + address1 + ", address2=" + address2 + ", city=" + city + ", provCode="
+ provCode + ", provinceName=" + provinceName + ", countryCode=" + countryCode + ", countryName="
+ countryName + ", postal=" + postal + ", independentAffiliation=" + independentAffiliation +"]";
}
return "School [minCode=" + minCode + ", schoolId=" + schoolId + ", schoolCategoryCode=" + schoolCategoryCode + ", schoolCategoryCodeInstitute=" + schoolCategoryCodeInstitute
+ ", schoolName=" + schoolName + ", districtName=" + districtName + ", transcriptEligibility=" + transcriptEligibility + ", certificateEligibility=" + certificateEligibility
+ ", address1=" + address1 + ", address2=" + address2 + ", city=" + city + ", provCode=" + provCode + ", countryCode=" + countryCode + ", postal=" + postal + ", openFlag=" + openFlag
+ "]";
}
}
Original file line number Diff line number Diff line change
@@ -402,7 +402,7 @@ private void populateSchoolRepors(List<SchoolReports> reportList) {
School schObj = getSchool(rep.getSchoolOfRecord(), accessToken);
if (schObj != null) {
rep.setSchoolOfRecordName(schObj.getSchoolName());
rep.setSchoolCategory(schObj.getSchoolCategory());
rep.setSchoolCategory(schObj.getSchoolCategoryCode());
}
} else if (rep.getSchoolOfRecord() != null) {
District distObj = getDistrict(rep.getSchoolOfRecord(), accessToken);
4 changes: 2 additions & 2 deletions api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -97,9 +97,9 @@ endpoint:
student-for-special-grad-run-list: ${GRAD_STUDENT_API}api/v1/student/studentlistsearch
grad-trax-api:
school-by-min-code:
url: ${GRAD_TRAX_API}api/v1/trax/school/%s
url: ${GRAD_TRAX_API}api/v2/trax/school-clob/%s
district-by-min-code:
url: ${GRAD_TRAX_API}api/v1/trax/district/%s
url: ${GRAD_TRAX_API}api/v2/trax/district/%s

#Splunk LogHelper
splunk:
Original file line number Diff line number Diff line change
@@ -1391,7 +1391,7 @@ public void testGetAllSchoolReportList() {

District district = new District();
district.setDistrictNumber("005");
district.setDistrictName("SOOKE");
district.setDisplayName("SOOKE");

when(this.webClient.get()).thenReturn(this.requestHeadersUriMock);
when(this.requestHeadersUriMock.uri(String.format(constants.getDistrictByMincodeUrl(),district.getDistrictNumber()))).thenReturn(this.requestHeadersMock);
4 changes: 2 additions & 2 deletions api/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -81,9 +81,9 @@ endpoint:
student-for-special-grad-run-list: https://educ-grad-student-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/student/studentlistsearch
grad-trax-api:
school-by-min-code:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/school/%s
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/school-clob/%s
district-by-min-code:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/district/%s
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/district/%s

#Splunk LogHelper
splunk: