|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tomp.xtcl.command.AbstractCommand net.sf.tomp.xtcl.command.VarCommand net.sf.tomp.xtcl.command.AbstractParametrizedVarCommand net.sf.tomp.xtcl.command.Do
public class Do
Do a template.
Field Summary |
---|
Fields inherited from class net.sf.tomp.xtcl.command.VarCommand |
---|
var |
Constructor Summary | |
---|---|
Do()
|
Method Summary | |
---|---|
int |
execute(Context context)
Do a template. |
java.lang.String |
getTemplateName()
|
protected java.lang.String |
removeNonsubstituted(java.lang.String body)
Removes parameter references that were not replaced by new values. |
void |
setParameter(java.lang.String k,
java.lang.Object v)
Sets the (formal, real) parameter pair |
void |
setTemplateName(java.lang.String p)
Set the template name |
protected java.lang.String |
substitute(java.lang.String body)
Find and Replace param references in the template body. |
java.lang.String |
toString()
String repre of DO-TEMPLATE |
Methods inherited from class net.sf.tomp.xtcl.command.AbstractParametrizedVarCommand |
---|
addParameterPropertiesReference, propertiesToParameters |
Methods inherited from class net.sf.tomp.xtcl.command.VarCommand |
---|
setVar |
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand |
---|
done, initParameters, listArray, listList, listMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Do()
Method Detail |
---|
public java.lang.String getTemplateName()
public int execute(Context context) throws java.lang.Exception
execute
in interface Command
execute
in class AbstractCommand
context
- Context to get, compile and execute
the commands in the template
java.lang.Exception
protected java.lang.String substitute(java.lang.String body)
body
- original template body
protected java.lang.String removeNonsubstituted(java.lang.String body)
body
-
public void setParameter(java.lang.String k, java.lang.Object v)
setParameter
in interface Parametrized
setParameter
in class AbstractParametrizedVarCommand
k
- Parameter name (key) - formal param. namev
- Parameter value - real param. nameParametrized.setParameter(java.lang.String, java.lang.Object)
public void setTemplateName(java.lang.String p)
p
- template namepublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |