Skip to content

Commit

Permalink
test verification date logic
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Oct 11, 2024
1 parent d154f5e commit 93168a2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions orcid-core/src/main/java/org/orcid/pojo/ajaxForm/Email.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class Email implements ErrorsInterface {

private Date lastModified;

private Date verificationDate;

private List<String> errors = new ArrayList<String>();

public static Email valueOf(org.orcid.jaxb.model.v3.release.record.Email e) {
Expand Down Expand Up @@ -76,6 +78,14 @@ public static Email valueOf(org.orcid.jaxb.model.v3.release.record.Email e) {
lastModifiedDate.setDay(String.valueOf(e.getLastModifiedDate().getValue().getDay()));
email.setLastModified(lastModifiedDate);
}

if (e.getVerificationDate() != null) {
Date lastModifiedDate = new Date();
lastModifiedDate.setYear(String.valueOf(e.getLastModifiedDate().getValue().getYear()));
lastModifiedDate.setMonth(String.valueOf(e.getLastModifiedDate().getValue().getMonth()));
lastModifiedDate.setDay(String.valueOf(e.getLastModifiedDate().getValue().getDay()));
email.setLastModified(lastModifiedDate);
}
}
return email;
}
Expand Down Expand Up @@ -187,6 +197,14 @@ public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}

public Date getVerificationDate() {
return verificationDate;
}

public void setVerificationDate(Date verificationDate) {
this.verificationDate = verificationDate;
}

public List<String> getErrors() {
return errors;
}
Expand Down

0 comments on commit 93168a2

Please sign in to comment.