Implementation Guide for Oracle Self-Service E-Billing > Customizing the Payment Consolidator Integration Module > Creating Customized Payment Consolidation Templates >

Adding a New Java Object Instance or Static Class


In output file templates, you can add any Java objects into the template context for future use by invoking the putToContext(String, Object) method of the template class.

For input template files, you can add new Java objects to the template context in the file structure XML template only.

To add a new Java object instance or static class

  • For input template files, add the new Java object as follows in the file structure definition XML file:

    $template.putToContext(String, Object)$

    For output template files, add the new Java object as follows:

    • In the file structure definition XML file:

    $template.putToContext(String, Object)$

    • In the record template XML file:

    %template.putToContext(String, Object)%

    For example, for a new class called com.business.core.PmtConsolidatorTest in the file structure XML, use:

    $template. putToContext("pmtConsolidator", new com.business.core.PmtConsolidatorTest(parameter1, parameter2)$

    To add a static class, use:

    $template. putToContext("pmtConsolidatorStatic", com.business.core.PmtConsolidatorStatic)$

You can use these objects by name in both the file structure XML and the record template files. (Add the object into the template context first.)

The Payment Consolidator Integration engine has the following limitations:

  • Math operations are not allowed. You must call a Java method for math operations.
  • Concatenate method calls, such as %variable.method().method() %, are not allowed. You must write your own Java method to do method concatenation.
Implementation Guide for Oracle Self-Service E-Billing Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices.