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
ConstructorsConstructorDescriptionAgendaTemplateBuilder(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 TypeMethodDescriptionorg.exoplatform.social.core.space.spi.SpaceServiceThe space service, resolved from the container on first use.groovy.text.TemplateCompiles 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.MessageInfomakeMessage(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 — theevent.icsfile.Methods inherited from class org.exoplatform.commons.api.notification.channel.template.AbstractTemplateBuilder
buildMessage, getLanguage, getNotificationToStore, getOrganizationService, setTemplateEngine
-
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 channelcontainer- container the platform services are read fromkey- key of the notification plugin this builder servespushNotification- whether the channel is the mobile push onewebNotification- 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:
getTemplateEnginein classorg.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 — theevent.icsfile.- Specified by:
makeMessagein classorg.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
-