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

The File Structure XML Template


The structure XML template file maps to the set of record XML template files that a particular type of input or output file requires. Each type of input and output file requires a file structure XML template file as part of the template set required by the associated payment consolidation job.

The sample AccountEnrollment_2060_sample1.xml file, found in the EDX_HOME\config\paymentconsolidator\templates\sample1 directory, provides a simple example of a file structure XML template:

<?xml version="1.0"?>

<Enrollment>

$cartridgeProperty.setProperty("com.edocs.common.pc.detailrecord_class", "com.edocs.common.pc.core.EnrollmentDetailRecord")$

$<INCLUDE>$

$templateDir$AccountEnrollment_fileHeader_template.xml

$</INCLUDE>$

$<INCLUDE>$

$templateDir$AccountEnrollment_entryDetail_template.xml

$</INCLUDE>$

$<INCLUDE>$

$templateDir$AccountEnrollment_fileTailer_template.xml

$</INCLUDE>$

</Enrollment>

If the payment consolidator supports batch processing, then the file structure XML file must also include a batch header and batch tailer template XML files enclosing the detail record XML file. For an example of a file structure XML template that includes batch records, see the AccountEnrollment_sample2.xml file in the EDX_HOME\config\paymentconsolidator\templates\sample2 directory.

Components of the File Structure XML Template File

The file structure XML template file requires the following components:

  • A statement using the INCLUDE operator to map each record template XML file. The <INCLUDE> operator identifies the individual template files required to process the particular record types for the consolidator's input file. For example, the sample file structure template AccountEnrollment_2060_sample1.xml includes the following record templates:
    • The $templateDir$AccountEnrollment_fileHeader_template.xml template for parsing the FileHeader record.
    • The $templateDir$AccountEnrollment_entryDetail_template.xml template for parsing the Detail record.
    • The $templateDir$AccountEnrollment_fileTailer_template.xml template for parsing the FileTailer record.
  • The XML Delimiter. Use the dollar sign ($) as the delimiter to distinguish between the file structure definition XML file and each record template XML file, as well as the cartridge property file.

    NOTE:  In the record XML template, the delimiter is a percentage sign (%).

  • The Cartridge Property Statement. An XML statement for specifying the detail record implementation is required in the file structure XML (except for the bill summary file), for example:

    $cartridgeProperty.setProperty("com.edocs.common.pc.detailrecord_class", "com.edocs.common.pc.core.EnrollmentDetailRecord")$

    The name of the java.util.Properties instance is cartridgeProperty, which is preset in the template context. Its method setProperty is invoked to add the value com.edocs.common.pc.cord.EnrollmentDetailRecord to the key com.edocs.common.pc.detailrecord_class. The value of this key is used to parse the detail record, and represents the full path of the detail record implementation class. The cartridgeProperty contains a set of key-value pairs that are used to parse an input file or generate an output file. The preconfigured cartridge properties are defined in a properties file located in the same directory as the sample files.

    Oracle Self-Service E-Billing provides a default detail record implementation for the enrollment detail and bill summary records:

    • Enrollment detail record class: com.edocs.common.pc.core.EnrollmentDetailRecord
    • Bill Summary detail record class: com.edocs.common.pc.core.BillSummaryRecord

      The default implementation class is designed with a complete collection of the fields required by most consolidators for the account enrollment detail record and the bill summary record. It is recommended to use the default implementation. Flexible fields are also reserved for your customization.

      If you use a customized implementation of a detail record, then you must replace the key value of "com.edocs.common.pc.detailrecord_class" in file structure XML. For example, if the customized class for enrollment is com.businesshome.detailrecord.enrollment, then the required statement in the file structure XML file is:

    $cartridgeProperty.setProperty("com.edocs.common.pc.detailrecord_class", " com.businesshome.detailrecord.enrollment ")$

    The customized class must implement interface "com.edocs.common.api.pc.IDetailRecord" and extend the parent class com.edocs.common.pc.core.BaseRecord.

Implementation Guide for Oracle Self-Service E-Billing Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices.