public class

Template

extends Object
java.lang.Object
   ↳ com.sforce.ws.template.Template

Class Overview

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);

Summary

Fields
private HashMap<String, Object> properties
Public Constructors
Template()
Public Methods
void exec(String in, String out)
execute the specified template and generate the specified output file.
void setProperty(String name, Object value)
sets up implicit variable for the script.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private HashMap<String, Object> properties

Public Constructors

public Template ()

Public Methods

public void exec (String in, String out)

execute the specified template and generate the specified output file.

Parameters
in Name of the template file.
out Name of the output file. If null, the output will be redirected to System.out
Throws
IOException failed to read/write file
TemplateException failed to exec template

public void setProperty (String name, Object value)

sets up implicit variable for the script. You can use this variable from the script. You can also invoke methods associated with the variable.

Parameters
name Name of the variable
value Value of the variable.