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-2949: initial commit to consume v2 endpoint of School Clob to cache all schools. #540

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 12 additions & 64 deletions api/src/main/java/ca/bc/gov/educ/api/gradalgorithm/dto/School.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,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 address2;
private String city;
private String provCode;
private String provinceName;
private String countryCode;
private String countryName;
private String provCode;
private String countryCode;
private String postal;
private String independentAffiliation;
private String openFlag;
private String signatureDistrict;
private String newMinCode;
private String schoolOrg;
private String appendTrans;
private String ministryContact;
private String principalName;
private String schoolPhone;
private String schoolFax;
private String schoolEmail;
private String openFlag;
private String schoolCategoryCode;
private String schoolCategoryCodeInstitute;

public String getSchoolName() {
return schoolName != null ? schoolName.trim(): null;
Expand All @@ -55,61 +44,20 @@ 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;
}

public String getIndependentDesignation() {
return independentDesignation != null ? independentDesignation.trim(): null;
}

public String getIndependentAffiliation() {
return independentAffiliation != null ? independentAffiliation.trim(): null;
}

public String getOpenFlag() {
return openFlag != null ? openFlag.trim(): null;
}

public String getSignatureDistrict() {
return signatureDistrict != null ? signatureDistrict.trim(): null;
}

public String getSchoolEmail() {
return schoolEmail != null ? schoolEmail.trim(): null;
}

public String getPrincipalName() {
return principalName != null ? principalName.trim(): null;
}

public String getAppendTrans() {
return appendTrans != null ? appendTrans.trim(): null;
}

public String getMinistryContact() {
return ministryContact != null ? ministryContact.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
+ ", openFlag=" + openFlag + ", signatureDistrict=" + signatureDistrict + ", newMinCode=" + newMinCode
+ ", schoolOrg=" + schoolOrg + ", appendTrans=" + appendTrans + ", ministryContact=" + ministryContact
+ ", principalName=" + principalName + ", schoolPhone=" + schoolPhone + ", schoolFax=" + schoolFax
+ ", schoolEmail=" + schoolEmail + "]";
}
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
+ "]";
}

}
4 changes: 2 additions & 2 deletions api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ endpoint:
getToken: ${KEYCLOAK_TOKEN_URL}auth/realms/master/protocol/openid-connect/token
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
school-all-school:
url: ${GRAD_TRAX_API}api/v1/trax/school
url: ${GRAD_TRAX_API}api/v2/trax/school-clob
grad-program-api:
get-program-algorithm-data:
url: ${GRAD_PROGRAM_API}api/v1/program/algorithmdatalist
Expand Down
4 changes: 2 additions & 2 deletions api/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ endpoint:
getToken: https://soam-dev.apps.silver.devops.gov.bc.ca/auth/realms/master/protocol/openid-connect/token
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
school-all-school:
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/trax/school
url: https://educ-grad-trax-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v2/trax/school-clob
grad-program-api:
get-program-algorithm-data:
url: https://educ-grad-program-api-77c02f-dev.apps.silver.devops.gov.bc.ca/api/v1/program/algorithmdata?
Expand Down
Loading