Here the process generation schema used by RTFTemplate :
This step requires the JAVA context OR the XML file which contains fields avalaible (*.fields.xml) of the RTF model. Indead transformation step is able to generate loop macro (#foreach, #list,...) swith selected template engine (Velocity, Freemarker,...).
When RTFTemplate will be integrated in your application, some list of your context could be empty. Loop generation is done with introspection of JAVA objects. If your list is empty, RTFTemplate will not able to to generate fields which are included into a loop.
To resolve this problem, XML file of fields available is required when you want integrate RTFTemplate in your application. This file can be generate with the class AbstractRTFUseCase. (before integrate RTFTemplate). This file contains fields information to know if the field is a list or not.
That's why, it's very important to put the context with all data, when class AbstractRTFUseCase is implemented.
Result of this step give new RTFDocument which contains macro swith selected template engine.
Each steps of the process can be selected among default implementation of RTFTemplate ((Velocity and Freemarker template engine) or redefined. This configuration can be done with JAVA code or with XML file Spring configuration. For more information, click Pour plus d'informations, cliquez here