Skip to content

Commit

Permalink
Merge pull request #540 from bcgov/feature/GRAD2-2949
Browse files Browse the repository at this point in the history
GRAD2-2949: initial commit to consume v2 endpoint of School Clob to cache all schools.
  • Loading branch information
infstar authored Nov 1, 2024
2 parents d7a03d8 + 2f1bda4 commit b8bfebc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 68 deletions.
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

0 comments on commit b8bfebc

Please sign in to comment.