JSON Listeners
Listeners can be used to massage data before or after executing the report. JSON objects are used to encapsulate data in the presentation and integration layer for the reports.
Implementing JSON Listeners
To implement a JSON listener, extend com.onenetwork.platform.integ.rest.report.BaseReportResourceListener. You can override any of the methods of the latter class to satisfy your requirements.
The following is a brief description of the methods used in the listener class:
onFilterField: Used to massage the filter metadata.
onFormConfig: Used when the form needs to be configured after construction.
onTableColumnConfig: Used to massage each column in the table except for the hidden columns.
onReaderFieldConfig: Used to massage each field.
onTableConfig: Used to massage the table meta.
onTabledata: Used to massage table data.
onTableRow: Used to massage each table row.
onReport: Invoked when the entire report is complete.
onReportExecuted: Called after the report is executed.
Configuring JSON Listeners
Provide the complete path of the report json listener class in the ReportJsonListener element. There should be only one occurrence of this element in the report
For more information on implementing JSON listener and function details, please refer to the JAVA docs.