This repository has been archived on 2021-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
envoy/common/src/main/java/envoy/event/PasswordChangeRequest.java

45 lines
1.1 KiB
Java

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