woko.mail.MailServiceBase Maven / Gradle / Ivy
package woko.mail;
import java.util.HashMap;
import java.util.Map;
public abstract class MailServiceBase implements MailService {
private final String appUrl;
private final String fromEmailAddress;
private final Map templates;
public MailServiceBase(String appUrl, String fromEmailAddress, Map templates) {
this.appUrl = appUrl;
this.fromEmailAddress = fromEmailAddress;
this.templates = new HashMap(templates);
}
@Override
public MailTemplate getMailTemplate(String name) {
return templates.get(name);
}
@Override
public String getAppUrl() {
return appUrl;
}
@Override
public String getFromEmailAddress() {
return fromEmailAddress;
}
}