ccc.plugins.scripting.rhino
Class ScriptRunner

java.lang.Object
  extended by ccc.plugins.scripting.AbstractTextProcessor
      extended by ccc.plugins.scripting.rhino.ScriptRunner
All Implemented Interfaces:
TextProcessor

public class ScriptRunner
extends AbstractTextProcessor

Helper class for executing scripts.

Author:
Civic Computing Ltd.

Constructor Summary
ScriptRunner()
           
 
Method Summary
 void render(Script script, java.io.Writer out, Context context)
          Render a resource with the specified template.
 void setWhitelist(java.util.List<java.lang.String> allowedClasses)
          Specify a list of classes accessible to this processor.
 
Methods inherited from class ccc.plugins.scripting.AbstractTextProcessor
handleException, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptRunner

public ScriptRunner()
Method Detail

render

public void render(Script script,
                   java.io.Writer out,
                   Context context)
            throws ProcessingException
Render a resource with the specified template.

The rendered output will be written to the specified writer.

Parameters:
script - The template used to render the resource.
out - A valid Writer. The writer will be flushed when output is complete. The writer will not be closed.
context - Additional values that are passed to the template.
Throws:
ProcessingException - If an error occurs during rendering.

setWhitelist

public void setWhitelist(java.util.List<java.lang.String> allowedClasses)
Specify a list of classes accessible to this processor.

Parameters:
allowedClasses - The list of classes.


Copyright © 2010. All Rights Reserved.