terp - the Codemesh Modular
Template Interpreter v1.3.309

com.codemesh.terp.script
Class TerpScriptContext

java.lang.Object
  extended by com.codemesh.terp.script.TerpScriptContext
All Implemented Interfaces:
javax.script.ScriptContext

public class TerpScriptContext
extends java.lang.Object
implements javax.script.ScriptContext

The context in which variables are evaluated.


Field Summary
protected  java.util.Map<java.lang.Integer,javax.script.Bindings> bindings
           
protected  java.io.Writer err
           
protected  java.io.Reader in
           
protected  java.io.Writer out
           
static TerpScriptContext ROOT_CONTEXT
           
protected  java.util.List<java.lang.Integer> scopes
           
 
Fields inherited from interface javax.script.ScriptContext
ENGINE_SCOPE, GLOBAL_SCOPE
 
Constructor Summary
TerpScriptContext()
           
TerpScriptContext(javax.script.ScriptContext context)
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
           
 java.lang.Object getAttribute(java.lang.String name, int scope)
           
 int getAttributesScope(java.lang.String name)
           
 javax.script.Bindings getBindings(int scope)
           
 java.io.Writer getErrorWriter()
           
 int getMostLocalScope()
           
 java.io.Reader getReader()
           
 java.util.List<java.lang.Integer> getScopes()
           
 java.io.Writer getWriter()
           
 java.lang.Object removeAttribute(java.lang.String name, int scope)
           
 void setAttribute(java.lang.String name, java.lang.Object value, int scope)
           
 void setBindings(javax.script.Bindings bindings, int scope)
           
 void setErrorWriter(java.io.Writer writer)
           
 void setReader(java.io.Reader reader)
           
 void setWriter(java.io.Writer writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bindings

protected java.util.Map<java.lang.Integer,javax.script.Bindings> bindings

scopes

protected java.util.List<java.lang.Integer> scopes

out

protected java.io.Writer out

err

protected java.io.Writer err

in

protected java.io.Reader in

ROOT_CONTEXT

public static final TerpScriptContext ROOT_CONTEXT
Constructor Detail

TerpScriptContext

public TerpScriptContext()

TerpScriptContext

public TerpScriptContext(javax.script.ScriptContext context)
Method Detail

setBindings

public void setBindings(javax.script.Bindings bindings,
                        int scope)
Specified by:
setBindings in interface javax.script.ScriptContext

getBindings

public javax.script.Bindings getBindings(int scope)
Specified by:
getBindings in interface javax.script.ScriptContext

getMostLocalScope

public int getMostLocalScope()

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value,
                         int scope)
Specified by:
setAttribute in interface javax.script.ScriptContext

getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     int scope)
Specified by:
getAttribute in interface javax.script.ScriptContext

removeAttribute

public java.lang.Object removeAttribute(java.lang.String name,
                                        int scope)
Specified by:
removeAttribute in interface javax.script.ScriptContext

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Specified by:
getAttribute in interface javax.script.ScriptContext

getAttributesScope

public int getAttributesScope(java.lang.String name)
Specified by:
getAttributesScope in interface javax.script.ScriptContext

getWriter

public java.io.Writer getWriter()
Specified by:
getWriter in interface javax.script.ScriptContext

getErrorWriter

public java.io.Writer getErrorWriter()
Specified by:
getErrorWriter in interface javax.script.ScriptContext

setWriter

public void setWriter(java.io.Writer writer)
Specified by:
setWriter in interface javax.script.ScriptContext

setErrorWriter

public void setErrorWriter(java.io.Writer writer)
Specified by:
setErrorWriter in interface javax.script.ScriptContext

getReader

public java.io.Reader getReader()
Specified by:
getReader in interface javax.script.ScriptContext

setReader

public void setReader(java.io.Reader reader)
Specified by:
setReader in interface javax.script.ScriptContext

getScopes

public java.util.List<java.lang.Integer> getScopes()
Specified by:
getScopes in interface javax.script.ScriptContext

terp - the Codemesh Modular
Template Interpreter v1.3.309

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.