Skip to content

Commit

Permalink
Interim commit
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Jan 29, 2024
1 parent e278c77 commit ae8d1d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private void processFileUnProcessableException(@NonNull final String guid, @NonN
val notifySchoolForFileFormatErrorsOptional = this.notifySchoolForFileFormatErrors(guid, penWebBlobEntity, fileUnProcessableException);
final PenRequestBatchEntity entity = mapper.toPenReqBatchEntityForBusinessException(penWebBlobEntity, fileUnProcessableException.getReason(), fileUnProcessableException.getPenRequestBatchStatusCode(), batchFile, persistStudentRecords(fileUnProcessableException.getFileError())); // batch file can be processed further and persisted.
final Optional<School> school = this.restUtils.getSchoolByMincode(penWebBlobEntity.getMincode());
school.ifPresent(value -> entity.setSchoolName(value.getSchoolName()));
school.ifPresent(value -> entity.setSchoolName(value.getDisplayName()));
//wait here if notification was sent, if there was any error this file will be picked up again as it wont be persisted.
if (notifySchoolForFileFormatErrorsOptional.isPresent()) {
final boolean isNotified = this.waitForNotificationToCompleteIfPresent(guid, notifySchoolForFileFormatErrorsOptional.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ public List<SchoolContact> getStudentRegistrationContactsByMincode(final String
return this.restUtils.getStudentRegistrationContactList(mincode);
}

public String getStudentRegistrationContactEmailsByMincode(final String mincode) {
public List<String> getStudentRegistrationContactEmailsByMincode(final String mincode) {
log.debug("getting pen coordinator email for mincode :: {}", mincode);
if (StringUtils.length(mincode) != 8 || !StringUtils.isNumeric(mincode)) {
return "";
return new ArrayList<>();
}
var contacts = this.restUtils.getStudentRegistrationContactList(mincode);
return contacts.stream()
.map(contact -> String.valueOf(contact.getEmail()))
.collect(Collectors.joining(","));
.toList();
}
}

0 comments on commit ae8d1d7

Please sign in to comment.