org.springframework.extensions.webscripts
Interface ScriptProcessor

All Known Implementing Classes:
AbstractScriptProcessor, GroovyScriptProcessor, JSScriptProcessor, PHPScriptProcessor

public interface ScriptProcessor

Web Script Processor

Author:
davidc

Method Summary
 Object executeScript(ScriptContent location, Map<String,Object> model)
          Execute script
 Object executeScript(String path, Map<String,Object> model)
          Execute script
 ScriptContent findScript(String path)
          Find a script at the specified path (within registered Web Script stores)
 void reset()
          Reset script cache
 Object unwrapValue(Object value)
          Unwrap value returned by script TODO: Remove this method when value conversion is truly hidden within script engine
 

Method Detail

findScript

ScriptContent findScript(String path)
Find a script at the specified path (within registered Web Script stores)

Parameters:
path - script path
Returns:
script location (or null, if not found)

executeScript

Object executeScript(String path,
                     Map<String,Object> model)
Execute script

Parameters:
path - script path
model - model
Returns:
script result
Throws:
ScriptException

executeScript

Object executeScript(ScriptContent location,
                     Map<String,Object> model)
Execute script

Parameters:
location - script location
model - model
Returns:
script result

unwrapValue

Object unwrapValue(Object value)
Unwrap value returned by script TODO: Remove this method when value conversion is truly hidden within script engine

Parameters:
path - the path to the file
value - value to unwrap
Returns:
unwrapped value

reset

void reset()
Reset script cache



Copyright © 2009 SpringSource, Inc. All Rights Reserved.