use of com.pratilipi.common.type.EmailType in project pratilipi by Pratilipi.
the class PratilipiSite method createDataModelForEmailTemplatesPage.
public Map<String, Object> createDataModelForEmailTemplatesPage(Language language) throws UnexpectedServerException, InsufficientAccessException {
if (!UserAccessUtil.hasUserAccess(AccessTokenFilter.getAccessToken().getUserId(), language, AccessType.I18N_UPDATE))
throw new InsufficientAccessException();
Map<String, Object> dataModel = new HashMap<String, Object>();
dataModel.put("title", "Email Templates - Admin Access");
String body = new String();
for (EmailType eT : EmailType.values()) {
body = body + "<h4>" + eT.getDescription() + "</h4>";
body = body + EmailTemplateUtil.getEmailTemplate(eT, language);
body = body + "<br>";
}
dataModel.put("body", body);
return dataModel;
}
Aggregations