@Singleton public class TemplateEngineXml extends Object implements TemplateEngine
Constructor and Description |
---|
TemplateEngineXml(com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper) |
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Get the content type this template engine renders
|
String |
getSuffixOfTemplatingEngine()
For instance returns ".ftl.html" Or .ftl.json.
|
void |
invoke(Context context,
Result result)
Render the given object to the given context
|
@Inject public TemplateEngineXml(com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper)
public void invoke(Context context, Result result)
TemplateEngine
invoke
in interface TemplateEngine
context
- The context to render toresult
- The result to renderpublic String getContentType()
TemplateEngine
getContentType
in interface TemplateEngine
public String getSuffixOfTemplatingEngine()
TemplateEngine
Or anything else. To display error messages in a nice way...
But Gson for instance does not use a template to render stuff. Therefore it will return null
getSuffixOfTemplatingEngine
in interface TemplateEngine
Copyright © 2019 ninjaframework. All rights reserved.