45 lines
1.1 KiB
Java
45 lines
1.1 KiB
Java
package envoy.event;
|
|
|
|
import envoy.data.Contact;
|
|
|
|
/**
|
|
* @author Leon Hofmeister
|
|
* @since Envoy Common v0.2-beta
|
|
*/
|
|
public final class PasswordChangeRequest extends Event<String> {
|
|
|
|
private final long id;
|
|
private final String oldPassword;
|
|
|
|
private static final long serialVersionUID = 0L;
|
|
|
|
/**
|
|
* @param newPassword the new password of that user
|
|
* @param oldPassword the old password of that user
|
|
* @param userID the ID of the user who wants to change his password
|
|
* @since Envoy Common v0.2-beta
|
|
*/
|
|
public PasswordChangeRequest(String newPassword, String oldPassword, long userID) {
|
|
super(newPassword);
|
|
this.oldPassword = oldPassword;
|
|
id = userID;
|
|
}
|
|
|
|
/**
|
|
* @return the ID of the {@link Contact} this event is related to
|
|
* @since Envoy Common v0.2-alpha
|
|
*/
|
|
public long getID() { return id; }
|
|
|
|
/**
|
|
* @return the old password of the underlying user
|
|
* @since Envoy Common v0.2-beta
|
|
*/
|
|
public String getOldPassword() { return oldPassword; }
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "PasswordChangeRequest[id=" + id + "]";
|
|
}
|
|
}
|