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 Details

    • AbstractTemplateBuilder

      public AbstractTemplateBuilder()
  • Method Details

    • 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)