Class AbstractTemplateBuilder
- java.lang.Object
-
- org.exoplatform.commons.api.notification.channel.template.AbstractTemplateBuilder
-
- Direct Known Subclasses:
PluginTemplateBuilderAdapter
public abstract class AbstractTemplateBuilder extends Object
Created by The eXo Platform SAS Author : eXoPlatform thanhvc@exoplatform.com Dec 13, 2014
-
-
Constructor Summary
Constructors Constructor Description AbstractTemplateBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanbuildDigest(NotificationContext ctx, Writer writer)Makes digest messageMessageInfobuildMessage(NotificationContext ctx)Makes massageprotected StringgetLanguage(NotificationInfo notif)NotificationInfogetNotificationToStore(NotificationInfo notificationInfo)protected org.exoplatform.services.organization.OrganizationServicegetOrganizationService()groovy.text.TemplategetTemplateEngine()Get TemplateEngine of pluginprotected abstract booleanmakeDigest(NotificationContext ctx, Writer writer)Makes the Digest message from given NotificationMessage what keep inside NotificationContextprotected abstract MessageInfomakeMessage(NotificationContext ctx)Makes the MessageInfor from given NotificationMessage what keep inside NotificationContextvoidsetTemplateEngine(groovy.text.Template engine)Set TemplateEngine for plugin
-
-
-
Method Detail
-
makeMessage
protected abstract MessageInfo makeMessage(NotificationContext ctx)
Makes the MessageInfor from given NotificationMessage what keep inside NotificationContext- Parameters:
ctx-- Returns:
-
makeDigest
protected abstract boolean makeDigest(NotificationContext ctx, Writer writer)
Makes the Digest message from given NotificationMessage what keep inside NotificationContext- Parameters:
ctx-writer-- Returns:
-
buildMessage
public MessageInfo buildMessage(NotificationContext ctx)
Makes massage- Parameters:
ctx-- Returns:
-
buildDigest
public boolean buildDigest(NotificationContext ctx, Writer writer)
Makes digest message- Parameters:
ctx-writer-- Returns:
-
getLanguage
protected String getLanguage(NotificationInfo notif)
- Parameters:
notif-- Returns:
-
getOrganizationService
protected org.exoplatform.services.organization.OrganizationService getOrganizationService()
-
getTemplateEngine
public groovy.text.Template getTemplateEngine()
Get TemplateEngine of plugin- Returns:
- the TemplateEngine
-
setTemplateEngine
public void setTemplateEngine(groovy.text.Template engine)
Set TemplateEngine for plugin- Parameters:
engine- the TemplateEngine to set
-
getNotificationToStore
public NotificationInfo getNotificationToStore(NotificationInfo notificationInfo)
-
-