|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sf.codejen.js.JsWorker
public abstract class JsWorker
Common base for JavaScript processing. It compiles the JavaScript before the execution to improve the performance.
| Constructor Summary | |
|---|---|
JsWorker()
|
|
| Method Summary | |
|---|---|
protected Object |
exec(Object model,
Class resultClass)
Executes the script with the model. |
void |
setModelName(String modelName)
Sets the name of the context variable. |
void |
setScript(String script)
Sets the script(s) for execution. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsWorker()
| Method Detail |
|---|
public void setModelName(String modelName)
modelName - the name of context variable.
public void setScript(String script)
throws Exception
File.pathSeparatorChar
script - the script for execution.
Exception - when error like IO error and compile error is encountered.
protected Object exec(Object model,
Class resultClass)
model - the model to be used in the script.resultClass - the class of the returning result.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||