About extending API templates

About this task

Each template-based API delivers different output, depending on the template passed to it. To verify whether an API is template-based or not, see the Javadocs.

If your table modifications impact any APIs, you must extend the templates of those APIs. Place the extended API templates in the install_dir/extensions/global/template/api directory.

To find out which APIs are impacted by table modifications:

Procedure

  1. Note the XMLName attribute of the table being modified in the entity tag inside the database entity XML files (which contains the definition of all the tables). These database entity XML files are located in install_dir/repository/entity directory.
  2. Search for the pattern of that XMLName attribute in the install_dir/extensions/global/template/api directory. The search results in finding exposed and internal APIs impacted by the table modifications or extensions.

    For example, consider that you want to extend an attribute in the YFS_CHARGE_CATEGORY table. The XMLName for this table as specified in install_dir/repository/entity/omp_tables.xml is ChargeCategory. Now search for the attribute ChargeCategory in install_dir/extensions/global/template/api directory to find the APIs impacted by this extension.