Sample user exit

The sample user exit adds records before or after the one passed to it. It also modifies records. During MCRE file creation, the user exit inserts sample records after the string header record, modifies the detailed records, and removes header records.

The sample user exit extends the UserControlMCRERecord class. The user exit overrides the methods that are shown in the following table.
Table 1. Sample user exit methods
Method Description
MCRERecordInterface[] processMCREDetailRecord (MCREDetail record, MCRERecordParams parms) throws MCREException Modifies some of the properties of the MCRE payment detail record. Control document and record type are examples of the properties modified.
MCRERecordInterface[] processMCREFileHeaderRecord (MCREHeaderRecord record, MCRERecordParams parms) throws MCREException Returns to the MCRE extract task with an original record.
MCRERecordInterface[] processMCREPresentmentHeaderRecord (MCREPresentmentHeaderRecord record, MCRERecordParams parms) throws MCREException Adds two records to the MCRE extract.
MCRERecordInterface[] processMCREKillBundleRecord (MCREKillBundleRecord killBundle, MCRERecordParams parms) throws MCREException Returns a null object to the MCRE extract task.

For more information about task configuration, see Services Framework task registration and configuration.