Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pt.sibs.is.monitoring.email;
- import pt.sibs.is.monitoring.database.model.Type;
- import java.text.MessageFormat;
- import java.time.LocalDateTime;
- /**
- * TODO: Documentation
- *
- * @author daniel.pinto
- * @version 1.12.02
- * @since 07-02-2017
- */
- public class WelcomeNotification implements Notification {
- private String username;
- private String email;
- private Type type;
- private String password;
- private LocalDateTime creationDate;
- public WelcomeNotification(final String username, final String password, final String email, final Type type, final LocalDateTime creationDate) {
- this.username = username;
- this.password = password;
- this.email = email;
- this.type = type;
- this.creationDate = creationDate;
- }
- @Override
- public String getRecipient() {
- return MessageFormat.format(getProperties().getProperty("recipient"), email);
- }
- @Override
- public String getSubject() {
- return getProperties().getProperty("subject");
- }
- @Override
- public String getBody() {
- return MessageFormat.format(getProperties().getProperty("body"), username, type, email, password, creationDate, URL);
- }
- @Override
- public String getName() {
- return "welcome";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement