Previous Topic: Using Velocity Templates

Next Topic: Data Transformations

List Templating Variables

The templating system deduces which variables are ArrayLists by parsing references to them in the Velocity template you provide. The templating system looks for an attribute references or method invocations against the variable which show that it should be bound to a java.util.ArrayList (which can have 0, 1 or more values) rather a single value. The SPML Manager and CMDRA can use this capability.

All the read-only methods on the class java.util.ArrayList are looked for:

In mapping file entries, such list variables have the suffix [] after their names. For instance the variable comments is a single valued variable, but comments[] would be a list.

For example references, see the sampleTemplates\simple\template.xml.vpp template, including the $comments variable. Also, included are example mapping files: map_csv_datafile.csv against the CSV datafile and map_xml_datafile.csv against the XML datafile.