Developing a Report
This topic explains how to extend an overridable API to generate the human-readable regulatory submission report for the non-revisable and revisable regulatory submissions.
Solution
Create a custom regulatory submission processor class that overrides the generatePrimaryContent method.
Implement generation of a custom human-readable report.
Create a services.xconf entry to register your custom class.
Solution Element
The next table describes the solution element.
Element
Type
Description
RegulatorySubmission generatePrimaryContent(RegulatorySubmission regulatorySubmission)
API
* 
This API is deprecated and will be removed in a future release.
Generates the primary content for a regulatory submission.
RegulatorySubmission generatePrimaryContent(RegulatorySubmission regulatorySubmission, boolean draft)
API
Generates a sample of the primary content for a regulatory submission.
Default Behavior
The default behavior is to create a PDF report for the primary content of a regulatory submission. If the Draft parameter is specified as TRUE, the report is created with a DRAFT watermark on each page.
The primary content attribute on the regulatory submission is reserved for the human-readable report. The default behavior creates a PDF report and associates the report as the primary content on the regulatory submission. The Report Screen Layout screen type determines the format of the attributes that are available in the human-readable report. If Report Screen Layout is not available, the values in the Primary Attributes and More Attributes layouts are used for the human-readable report. The report also includes the defined Table Data, Subjects, and Drivers associated with the regulatory submission.
The default implementation is intended for the demonstrational and instructional purposes only. However, the default human-readable report may be suitable for some types of regulatory submission. Alternatively, implementors can create a submission-specific, human-readable report that matches the agency-provided documentation.
Creating Custom Classes
To customize the generation of primary content, create a Java class (your processor) that extends the SimpleRegulatorySubmissionProcessor or the appropriate revisable subtype populator, and then override the generatePrimaryContent method. The revisable subtype processor can include AERSubmissionProcessor, ERSubmissionProcessor, RPSSubmissionProcessor, or UDISubmissionProcessor. To customize the PDF report of primary content associated with a regulatory submission, override the generatePrimaryContent() method in your custom submission processor class.
The following example shows a new custom class with the overridden generatePrimaryContent method:
public RegulatorySubmission generatePrimaryContent(RegulatorySubmission regulatorySubmission, boolean draft) throws Exception {
String fileName = "RegSub_Report.pdf";
// This method will get all the primary contents form the Regulatory Submission and create a formatted output for storing.
InputStream in = generatePDF(regulatorySubmission);
// This method will get the formatted output and check all the validations to store the PDF report as Primary content.
RegulatoryContentHelper.getService().storePrimaryContent(regulatorySubmission, in, fileName);
return regulatorySubmission;
}
}
Was this helpful?