Class TemplateContentTransformerService
java.lang.Object
org.exoplatform.commons.notification.template.TemplateContentTransformerService
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateContentTransformerService(org.exoplatform.services.cache.CacheService cacheService) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetCacheKey(String pattern, String pluginId, String language) protected StringgetSubject(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) processDigest(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Render for digest templateprocessGroovy(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Transform aTemplateContextwith groovy template to a Text (used in Mail Notif by example)processSubject(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Transform aTemplateContextto a Subject Text (used in Mail by example)protected Stringtransform(String value, org.exoplatform.commons.api.notification.service.template.TemplateContext ctx)
-
Constructor Details
-
TemplateContentTransformerService
public TemplateContentTransformerService(org.exoplatform.services.cache.CacheService cacheService)
-
-
Method Details
-
processGroovy
public String processGroovy(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Transform aTemplateContextwith groovy template to a Text (used in Mail Notif by example)- Parameters:
ctx-TemplateContext- Returns:
- String result after executing Groovy Template content
-
processSubject
public String processSubject(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Transform aTemplateContextto a Subject Text (used in Mail by example)- Parameters:
ctx-TemplateContext- Returns:
- Subject
-
processDigest
public String processDigest(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) Render for digest template- Parameters:
ctx-TemplateContextcontaining all Template Variables to use for processing Template- Returns:
- digest HTML content
-
getSubject
protected String getSubject(org.exoplatform.commons.api.notification.service.template.TemplateContext ctx) -
transform
-
getCacheKey
-