utility method for approved sites to check expiration
parent
84401531ae
commit
413c477879
|
@ -217,5 +217,23 @@ public class ApprovedSite {
|
|||
public void setWhitelistedSite(WhitelistedSite whitelistedSite) {
|
||||
this.whitelistedSite = whitelistedSite;
|
||||
}
|
||||
|
||||
/**
|
||||
* Has this approval expired?
|
||||
* @return
|
||||
*/
|
||||
@Transient
|
||||
public boolean isExpired() {
|
||||
if (getTimeoutDate() != null) {
|
||||
Date now = new Date();
|
||||
if (now.after(getTimeoutDate())) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue