|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sforce.ws.template.Template
public class Template
This class is used to execute a template. The common usage for this class is shown below:
Template template = new Template();
//set up implicit variables
template.setProperty("name", value);
String templateFileName = ... //name of the template file
String outputFile = ... //name of the file to the generated
//exec the template
template.exec(templateFileName, outputFile);
| Constructor Summary | |
|---|---|
Template()
|
|
| Method Summary | |
|---|---|
void |
exec(java.lang.String in,
java.lang.String out)
execute the specified template and generate the specified output file. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
sets up implicit variable for the script. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Template()
| Method Detail |
|---|
public void setProperty(java.lang.String name,
java.lang.Object value)
name - name of the variablevalue - value of the variable.
public void exec(java.lang.String in,
java.lang.String out)
throws java.io.IOException,
TemplateException
in - name of the template file.out - name of the output file. If null, the output will be redirected to System.out
java.io.IOException - failed to read/write file
TemplateException - failed to exec template
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||