All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.jhonsapp.bootstrap.user.service.notification.NotificationResetPassword Maven / Gradle / Ivy

There is a newer version: 1.0.29
Show newest version
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 + "";
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy