* The main client API for the Jinjava library, instances of this class can be used to render jinja templates with a given map of context values. Example use:
*
* <pre>
* Jinjava jinjava = new Jinjava();
* Map<String, Object> context = new HashMap<>();
* @return The EL factory used to process expressions in templates by this instance.
*/
publicExpressionFactorygetExpressionFactory() {
returnexpressionFactory;
}
/**
* @return The global config used as a base for all render operations performed by this instance.
*/
publicJinjavaConfiggetGlobalConfig() {
returnglobalConfig;
}
/**
* The global render context includes such things as the base set of tags, filters, exp tests and functions, used as a base by all render operations performed by this instance
*
* @return the global render context
*/
publicContextgetGlobalContext() {
returnglobalContext;
}
publicResourceLocatorgetResourceLocator() {
returnresourceLocator;
}
/**
* @return a comprehensive descriptor of all available filters, functions, and tags registered on this jinjava instance.
*/
publicJinjavaDocgetJinjavaDoc() {
returnnewJinjavaDocFactory(this).get();
}
/**
* Render the given template using the given context bindings.
*
* @param template
* jinja source template
* @param bindings
* map of objects to put into scope for this rendering action
* @return the rendered template
* @throws InterpretException
* if any syntax errors were encountered during rendering
* Render the given template using the given context bindings. This method returns some metadata about the render process, including any errors which may have been encountered such as unknown variables or syntax errors. This method will
* not throw any exceptions; it is up to the caller to inspect the renderResult.errors collection if necessary / desired.
*
* @param template
* jinja source template
* @param bindings
* map of objects to put into scope for this rendering action
* @return result object containing rendered output, render context, and any encountered errors
* Render the given template using the given context bindings. This method returns some metadata about the render process, including any errors which may have been encountered such as unknown variables or syntax errors. This method will
* not throw any exceptions; it is up to the caller to inspect the renderResult.errors collection if necessary / desired.
*
* @param template
* jinja source template
* @param bindings
* map of objects to put into scope for this rendering action
* @param renderConfig
* used to override specific config values for this render operation
* @return result object containing rendered output, render context, and any encountered errors