public class TemplateEngineJsonP extends java.lang.Object implements TemplateEngine
| Constructor and Description |
|---|
TemplateEngineJsonP(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
NinjaProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContentType()
Get the content type this template engine renders
|
java.lang.String |
getSuffixOfTemplatingEngine()
For instance returns ".ftl.html" Or .ftl.json.
|
void |
invoke(Context context,
Result result)
Render the given object to the given context
|
static boolean |
isThisASecureCallbackName(java.lang.String callback)
Tests whether the given function name is a valid JSONP function
name/path.
|
@Inject
public TemplateEngineJsonP(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
NinjaProperties properties)
public void invoke(Context context, Result result)
TemplateEngineinvoke in interface TemplateEnginecontext - The context to render toresult - The result to renderpublic java.lang.String getContentType()
TemplateEnginegetContentType in interface TemplateEnginepublic java.lang.String getSuffixOfTemplatingEngine()
TemplateEngineOr 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 TemplateEnginepublic static boolean isThisASecureCallbackName(java.lang.String callback)
callback - Callback value to test.Copyright © 2014 ninjaframework. All Rights Reserved.