com.clickntap.tool.script
Class VelocityScriptEngine

java.lang.Object
  extended by com.clickntap.tool.types.AbstractComponent
      extended by com.clickntap.tool.script.VelocityScriptEngine
All Implemented Interfaces:
ScriptEngine, Component

public class VelocityScriptEngine
extends AbstractComponent
implements ScriptEngine


Constructor Summary
VelocityScriptEngine()
           
 
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)
           
 void start()
           
 
Methods inherited from class com.clickntap.tool.types.AbstractComponent
getConfResource, restart, setConfResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityScriptEngine

public VelocityScriptEngine()
Method Detail

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

start

public void start()
           throws Exception
Specified by:
start in interface Component
Throws:
Exception


Copyright © 2014. All rights reserved.