Container Generation
Goal
The containers are automatically generated to ensure that they are synchronized with
the metadata. It also facilitates the creation of utility methods such as the delta methods. We also generate some
automated unit test frameworks and API object documention in both HTML and DITA format.
Tools
In order to generate the containers, we use Velocity.
More information can be found at : http://jakarta.apache.org/velocity/index.html
Container generation templates
Velocity uses templates to know how to generate files. Those templates can be found in the folder :
\rpm_common_comp\rpm-metadata\templates. The following mappings are used:
- rpm-object uses container.vm
- rpm-scope uses scope.vm
- rpm-enumeration uses enumeration.vm
For unit tests:
- automated unit tests use TestCase.vm
For HTML documentation:
- containers use ContainerDocumentation.vm
- scope use ContainerDocumentation.vm
- enumerations use EnumerationDocumentation.vm
- container list in package use Allclasses.vm
- package overview use Overview-frame.vm
For DITA documentation:
- containers use ContainerDocumentation.vm
- scope use ContainerDocumentation.vm
- enumerations use EnumerationDITA.vm
The generators
All the file generators are located in the folder:
\rpm_common_comp\rpm-metadata\src\main\java\com\ibm\rpm\metadata\generator\.
Those generators contain the code required to perform the container generation using the
templates.