com.clickntap.tool.script
Class FreemarkerScriptEngine
java.lang.Object
com.clickntap.tool.script.FreemarkerScriptEngine
- All Implemented Interfaces:
- ScriptEngine
public class FreemarkerScriptEngine
- extends Object
- implements ScriptEngine
|
Method Summary |
String |
eval(Map<String,Object> ctx,
String templateName)
|
void |
eval(Map<String,Object> ctx,
String templateName,
OutputStream out)
|
boolean |
evalRule(Map<String,Object> context,
String templateName)
|
boolean |
evalRuleScript(Map<String,Object> context,
String rule)
|
String |
evalScript(Map<String,Object> ctx,
String script)
|
void |
evalScript(Map<String,Object> ctx,
String script,
OutputStream out)
|
String |
getExtension()
|
void |
setClassLoader(String classLoader)
|
void |
setExtension(String extension)
|
void |
setTemplateDir(org.springframework.core.io.Resource templateDir)
|
void |
start()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreemarkerScriptEngine
public FreemarkerScriptEngine()
getExtension
public String getExtension()
setExtension
public void setExtension(String extension)
start
public void start()
throws Exception
- Throws:
Exception
setClassLoader
public void setClassLoader(String classLoader)
setTemplateDir
public void setTemplateDir(org.springframework.core.io.Resource templateDir)
eval
public String eval(Map<String,Object> ctx,
String templateName)
throws Exception
- Specified by:
eval in interface ScriptEngine
- Throws:
Exception
eval
public void eval(Map<String,Object> ctx,
String templateName,
OutputStream out)
throws Exception
- Specified by:
eval in interface ScriptEngine
- Throws:
Exception
evalRule
public boolean evalRule(Map<String,Object> context,
String templateName)
throws Exception
- Specified by:
evalRule in interface ScriptEngine
- Throws:
Exception
evalRuleScript
public boolean evalRuleScript(Map<String,Object> context,
String rule)
throws Exception
- Specified by:
evalRuleScript in interface ScriptEngine
- Throws:
Exception
evalScript
public String evalScript(Map<String,Object> ctx,
String script)
throws Exception
- Specified by:
evalScript in interface ScriptEngine
- Throws:
Exception
evalScript
public void evalScript(Map<String,Object> ctx,
String script,
OutputStream out)
throws Exception
- Specified by:
evalScript in interface ScriptEngine
- Throws:
Exception
Copyright © 2014. All rights reserved.