KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > security > PasswordChangeTooSoonException


1 package com.sslexplorer.security;
2
3 import java.util.Date JavaDoc;
4
5 /**
6  * Exception thrown by the {@link com.sslexplorer.security.UserDatabase}.
7  * The intention of this exception is to tell the caller the minimum time
8  * required before password changes hasn't yet passed.
9  */

10 public final class PasswordChangeTooSoonException extends UserDatabaseException {
11     private final Date JavaDoc requiredDate;
12
13     /**
14      * @param requiredDate first valid time for a password change
15      */

16     public PasswordChangeTooSoonException(Date JavaDoc requiredDate) {
17         super("Failed to change password, the minimum change date is in the future");
18         this.requiredDate = requiredDate;
19     }
20
21     /**
22      * @return Date
23      */

24     public Date JavaDoc getRequiredDate() {
25         return requiredDate;
26     }
27 }
28
Popular Tags