-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created messaging subscribers for Institute contact events (#325)
* Initial commit of Event handling for Institute Events * Replace logger with slf4j * Added model and services for contact updates * Added handler services for institute contact events * Updating events * Minor change * Flyway to expand update and create user in replication table to be in line with edx, institute. * Flyway to expand update and create user in replication table to be in line with edx, institute. * Added unit testing. * Removed TODOs * Added another test. * Bumping test coverage again. * Addressing maintainability issues. --------- Co-authored-by: chris.ditcher <[email protected]>
- Loading branch information
Showing
48 changed files
with
975 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
api/src/main/java/ca/bc/gov/educ/api/trax/config/RestErrorHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
api/src/main/java/ca/bc/gov/educ/api/trax/model/dto/AuthorityContact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package ca.bc.gov.educ.api.trax.model.dto; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Data | ||
@Builder | ||
@EqualsAndHashCode(callSuper = true) | ||
public class AuthorityContact extends BaseModel { | ||
|
||
private String authorityContactId; | ||
|
||
private String independentAuthorityId; | ||
|
||
private String authorityContactTypeCode; | ||
|
||
private String phoneNumber; | ||
|
||
private String phoneExtension; | ||
|
||
private String alternatePhoneNumber; | ||
|
||
private String alternatePhoneExtension; | ||
|
||
private String email; | ||
|
||
private String firstName; | ||
|
||
private String lastName; | ||
|
||
private String effectiveDate; | ||
|
||
private String expiryDate; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
api/src/main/java/ca/bc/gov/educ/api/trax/model/dto/DistrictContact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package ca.bc.gov.educ.api.trax.model.dto; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Data | ||
@Builder | ||
@EqualsAndHashCode(callSuper = true) | ||
public class DistrictContact extends BaseModel { | ||
|
||
private String districtContactId; | ||
|
||
private String districtId; | ||
|
||
private String districtContactTypeCode; | ||
|
||
private String phoneNumber; | ||
|
||
private String jobTitle; | ||
|
||
private String phoneExtension; | ||
|
||
private String alternatePhoneNumber; | ||
|
||
private String alternatePhoneExtension; | ||
|
||
private String email; | ||
|
||
private String firstName; | ||
|
||
private String lastName; | ||
|
||
private String effectiveDate; | ||
|
||
private String expiryDate; | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
api/src/main/java/ca/bc/gov/educ/api/trax/model/dto/SchoolContact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package ca.bc.gov.educ.api.trax.model.dto; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Data | ||
@Builder | ||
@EqualsAndHashCode(callSuper = true) | ||
public class SchoolContact extends BaseModel { | ||
|
||
private String schoolContactId; | ||
|
||
private String schoolId; | ||
|
||
private String schoolContactTypeCode; | ||
|
||
private String phoneNumber; | ||
|
||
private String jobTitle; | ||
|
||
private String phoneExtension; | ||
|
||
private String alternatePhoneNumber; | ||
|
||
private String alternatePhoneExtension; | ||
|
||
private String email; | ||
|
||
private String firstName; | ||
|
||
private String lastName; | ||
|
||
private String effectiveDate; | ||
|
||
private String expiryDate; | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
api/src/main/java/ca/bc/gov/educ/api/trax/service/AuthorityContactCreatedService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package ca.bc.gov.educ.api.trax.service; | ||
|
||
import ca.bc.gov.educ.api.trax.constant.EventType; | ||
import ca.bc.gov.educ.api.trax.model.dto.AuthorityContact; | ||
import ca.bc.gov.educ.api.trax.model.entity.Event; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Service; | ||
@Service | ||
@Slf4j | ||
public class AuthorityContactCreatedService extends EventBaseService<AuthorityContact> { | ||
|
||
@Override | ||
public void processEvent(final AuthorityContact districtContact, Event event) { | ||
log.debug("Processing Authority Contact Created"); | ||
// process the event here as per https://eccbc.atlassian.net/browse/GRAD2-2648 | ||
this.updateEvent(event); | ||
} | ||
|
||
@Override | ||
public String getEventType() { | ||
return EventType.CREATE_AUTHORITY_CONTACT.toString(); | ||
} | ||
|
||
} |
Oops, something went wrong.