public class RenderingContext extends Object
ScriptTemplateView render function in order to make
the application context, the locale, the template loader and the url available on
scripting side.| Constructor and Description |
|---|
RenderingContext(org.springframework.context.ApplicationContext applicationContext,
Locale locale,
Function<String,String> templateLoader,
String url)
Create a new
RenderingContext. |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.context.ApplicationContext |
getApplicationContext()
Return the application context.
|
Locale |
getLocale()
Return the locale of the rendered template.
|
Function<String,String> |
getTemplateLoader()
Return a function that takes a template path as input and returns the template
content as a String.
|
String |
getUrl()
Return the URL of the rendered template.
|
public RenderingContext(org.springframework.context.ApplicationContext applicationContext,
Locale locale,
Function<String,String> templateLoader,
String url)
RenderingContext.applicationContext - the application contextlocale - the locale of the rendered templatetemplateLoader - a function that takes a template path as input and returns
the template content as a Stringurl - the URL of the rendered templatepublic org.springframework.context.ApplicationContext getApplicationContext()
public Locale getLocale()
public Function<String,String> getTemplateLoader()
public String getUrl()