Class TemplateUtils
java.lang.Object
org.exoplatform.commons.notification.template.TemplateUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcleanHtmlTags(String str) Clean all HTML tags on stringstatic StringgetExcerptSubject(String subject) Get the excerpt subject of notification mail from origin string - Just contains plain text - Limit number of charactersstatic org.exoplatform.commons.api.notification.plugin.config.PluginConfiggetPluginConfig(String pluginId) Gets Plugin configuration for specified PluginIdstatic StringgetResourceBundle(String key, Locale locale, String resourcePath) Gets Resource Bundle valuestatic InputStreamgetTemplateInputStream(String templatePath) Gets InputStream for groovy templatestatic org.exoplatform.commons.api.notification.template.ElementloadGroovyElement(String pluginId, String language) Load the Groovy template element.static StringloadGroovyTemplate(String templatePath) Loads the Groovy template filestatic StringprocessGroovy(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Process the Groovy template associate with Template context to generate It will be use for digest mailstatic StringprocessSubject(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Render for Subject template
-
Constructor Details
-
TemplateUtils
public TemplateUtils()
-
-
Method Details
-
processGroovy
public static String processGroovy(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Process the Groovy template associate with Template context to generate It will be use for digest mail- Parameters:
ctx-- Returns:
-
processSubject
public static String processSubject(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Render for Subject template- Parameters:
ctx-- Returns:
-
loadGroovyTemplate
-
loadGroovyElement
-
getExcerptSubject
-
cleanHtmlTags
-
getPluginConfig
public static org.exoplatform.commons.api.notification.plugin.config.PluginConfig getPluginConfig(String pluginId) Gets Plugin configuration for specified PluginId- Parameters:
pluginId-- Returns:
-
getResourceBundle
-
getTemplateInputStream
Gets InputStream for groovy template- Parameters:
templatePath-- Returns:
InputStreamcorresponding to relative or absolute template path
-