Class AgendaTemplateBuilder

java.lang.Object
org.exoplatform.commons.api.notification.channel.template.AbstractTemplateBuilder
org.exoplatform.agenda.notification.builder.AgendaTemplateBuilder

public class AgendaTemplateBuilder extends org.exoplatform.commons.api.notification.channel.template.AbstractTemplateBuilder
  • Constructor Summary

    Constructors
    Constructor
    Description
    AgendaTemplateBuilder(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.container.ExoContainer container, org.exoplatform.commons.api.notification.model.PluginKey key, boolean pushNotification, boolean webNotification)
    Builds the notification content of one agenda event plugin on one channel.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.exoplatform.social.core.space.spi.SpaceService
    The space service, resolved from the container on first use.
    groovy.text.Template
    Compiles the Groovy template of this plugin, falling back to an empty template rather than failing the notification when it cannot be read.
    protected org.exoplatform.commons.api.notification.model.MessageInfo
    makeMessage(org.exoplatform.commons.api.notification.NotificationContext ctx)
    Builds the message one recipient receives on this channel: its subject, its rendered body, and — unless the recipient will hold a synced copy of the same meeting — the event.ics file.

    Methods inherited from class org.exoplatform.commons.api.notification.channel.template.AbstractTemplateBuilder

    buildMessage, getLanguage, getNotificationToStore, getOrganizationService, setTemplateEngine

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AgendaTemplateBuilder

      public AgendaTemplateBuilder(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.container.ExoContainer container, org.exoplatform.commons.api.notification.model.PluginKey key, boolean pushNotification, boolean webNotification)
      Builds the notification content of one agenda event plugin on one channel.
      Parameters:
      templateProvider - provider holding the template paths of the channel
      container - container the platform services are read from
      key - key of the notification plugin this builder serves
      pushNotification - whether the channel is the mobile push one
      webNotification - whether the channel is the in-platform web one
  • Method Details

    • getTemplateEngine

      public groovy.text.Template getTemplateEngine()
      Compiles the Groovy template of this plugin, falling back to an empty template rather than failing the notification when it cannot be read.
      Overrides:
      getTemplateEngine in class org.exoplatform.commons.api.notification.channel.template.AbstractTemplateBuilder
      Returns:
      the compiled template, or null when even an empty one fails
    • makeMessage

      protected org.exoplatform.commons.api.notification.model.MessageInfo makeMessage(org.exoplatform.commons.api.notification.NotificationContext ctx)
      Builds the message one recipient receives on this channel: its subject, its rendered body, and — unless the recipient will hold a synced copy of the same meeting — the event.ics file.
      Specified by:
      makeMessage in class org.exoplatform.commons.api.notification.channel.template.AbstractTemplateBuilder
      Parameters:
      ctx - notification context carrying the notification to render
      Returns:
      the message, or null when it must not be sent or could not be built
    • getSpaceService

      public org.exoplatform.social.core.space.spi.SpaceService getSpaceService()
      The space service, resolved from the container on first use.
      Returns:
      the space service