public class TemplateUtils extends Object
| Constructor and Description |
|---|
TemplateUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
cleanHtmlTags(String str)
Clean all HTML tags on string
|
static String |
getExcerptSubject(String subject)
Get the excerpt subject of notification mail from origin string
- Just contains plain text
- Limit number of characters
|
static String |
getResourceBundle(String key,
Locale locale,
String resourcePath)
Gets Resource Bundle value
|
static org.exoplatform.commons.api.notification.template.Element |
loadGroovyElement(String pluginId,
String language)
Load the Groovy template element.
|
static String |
loadGroovyTemplate(String templatePath)
Loads the Groovy template file
|
static String |
processDigest(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx)
Render for digest template
|
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
|
static String |
processSubject(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx)
Render for Subject template
|
public static String processGroovy(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx)
ctx - public static String loadGroovyTemplate(String templatePath) throws Exception
templatePath - Exceptionpublic static org.exoplatform.commons.api.notification.template.Element loadGroovyElement(String pluginId, String language)
pluginId - The plugin's idlanguage - The language's id.public static String processSubject(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx)
ctx - public static String getExcerptSubject(String subject)
subject - the origin stringpublic static String cleanHtmlTags(String str)
str - the origin stringpublic static String processDigest(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx)
ctx - Copyright © 2003–2015 eXo Platform SAS. All rights reserved.