package envoy.event;
import envoy.data.Contact;
/**
* Project: envoy-common
* File: PasswordChangeRequest.java
* Created: 31.07.2020
*
* @author Leon Hofmeister
* @since Envoy Common v0.2-beta
*/
public class PasswordChangeRequest extends Event {
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 + "]"; }
}