br.com.jhonsapp.bootstrap.user.service.notification.NotificationResetPassword Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bootstrap-user Show documentation
Show all versions of bootstrap-user Show documentation
A complete architecture for creating and managing users.
package br.com.jhonsapp.bootstrap.user.service.notification;
import org.springframework.util.StringUtils;
import br.com.jhonsapp.notifier.abstraction.Notification;
public class NotificationResetPassword implements Notification {
/**
* Generated serial version id created at 17 August 2017.
*/
private static final long serialVersionUID = 7747621268268216592L;
private String email;
private String code;
public NotificationResetPassword(String email, String code) {
if (!StringUtils.hasText(email))
throw new IllegalArgumentException("The email can not be null or empty.");
if (!StringUtils.hasText(code))
throw new IllegalArgumentException("The token can not be null or empty.");
this.email = email;
this.code = code;
}
public String getAddressee() {
return this.email.trim();
}
public String getSubject() {
return "Informações para redefinir sua senha";
}
public String getMessage() {
return "Código para redefinir sua senha: " + "" + code + "";
}
}