|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.pool.RecyclableSupport
org.norther.tammi.core.pool.PoolableSupport
org.norther.tammi.spray.engine.tool.GlobalTool
org.norther.tammi.spray.engine.tool.ContextTool
org.norther.tammi.spray.engine.tool.JavaTool
public class JavaTool
A request context tool for interpreting Java statements in templates.
| Constructor Summary | |
|---|---|
JavaTool()
Constructs a new tool. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes the object by setting its disposed flag. |
Object |
evaluate(String path)
Evaluates a script file. |
Object |
evaluate(String key,
String path)
Evaluates a script file in the specified key folder. |
Object |
evaluate(String key,
String path,
String encoding)
Evaluates a script file in the specified key folder by applying the specified encoding. |
void |
execute(String path)
Executes a script file. |
void |
execute(String key,
String path)
Executes a script file in the specified key folder. |
void |
execute(String key,
String path,
String encoding)
Executes a script file in the specified key folder by applying the specified encoding. |
protected Interpreter |
getInterpreter()
Gets an interpreter. |
Object |
getVariable(String name)
Gets the value of a variable. |
Object |
interpret(String expr)
Interprets an expression. |
void |
setVariable(String name,
Object value)
Sets the value of a variable. |
| Methods inherited from class org.norther.tammi.spray.engine.tool.ContextTool |
|---|
getFilter, getFilterChain, getFilterKey, getPrincipal, getRequest, getResponse, isFilterChanged |
| Methods inherited from class org.norther.tammi.spray.engine.tool.GlobalTool |
|---|
clone, getContext, getContextToolFilter, getMBeanServer, getName, isBound, nop, toString, valueBound, valueUnbound |
| Methods inherited from class org.norther.tammi.core.pool.PoolableSupport |
|---|
disposed, recycled |
| Methods inherited from class org.norther.tammi.core.pool.RecyclableSupport |
|---|
isDisposed, recycle |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.pool.Recyclable |
|---|
isDisposed, recycle |
| Constructor Detail |
|---|
public JavaTool()
| Method Detail |
|---|
public void dispose()
RecyclableSupport
dispose in interface Recyclabledispose in class ContextToolpublic Object getVariable(String name)
name - the variable name.
public void setVariable(String name,
Object value)
name - the variable name.value - the value of the variable.public Object interpret(String expr)
expr - the expression.
public Object evaluate(String path)
path - the pathname of the file.
public Object evaluate(String key,
String path)
key - a path finder key.path - the pathname of the file.
public Object evaluate(String key,
String path,
String encoding)
key - a path finder key.path - the pathname of the file.encoding - the character encoding.
public void execute(String path)
path - the pathname of the file.
public void execute(String key,
String path)
key - a path finder key.path - the pathname of the file.
public void execute(String key,
String path,
String encoding)
key - a path finder key.path - the pathname of the file.encoding - the character encoding.
protected Interpreter getInterpreter()
throws Exception
Exception - on errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||