Attribute Populators for New Regulatory Submissions
This topic explains how to extend the out-of-the-box regulatory submission processor classes and override the attribute populator methods to add custom attribute population.
Intended Outcome
After reading this, you should know how to create custom logic for populating attributes on regulatory submission when they are created.
Solution
• Creating a custom class that extends an out-of-the-box regulatory submission attribute populator
• Creating an xconf entry to register your custom class
Solution Elements
The next table describes the various solution elements.
Element
|
Type
|
Description
|
preCreatePopulate(RegulatorySubmission regulatorySubmission)
|
API
|
Method to populate data in the given regulatory submission during the create process before persistence.
|
createPopulate(RegulatorySubmission regulatorySubmission)
|
API
|
Method to populate data in the given regulatory submission during the create process after persistence.
|
Default Behavior
When creating a new regulatory submission, the submission stage will be set according to its configuration. The Submission Stage attribute is set depending on the configured default on the Submission Stage enumerated list. The default behavior without any configuration changes copies forward all the tracking attribute values and regulatory contents, and the Submission Stage is reset to In Progress.
Creating Custom Classes
To customize attribute population when creating a non-revisable or revisable regulatory submission, create a java class which extends the SimpleRegulatorySubmissionProcessor or the appropriate revisable subtype populators, such as, AERSubmissionProcessor, ERSubmissionProcessor, RPSSubmissionProcessor, or UDISubmissionProcessor and override the preCreatePopulate and createPopulate methods. The example of a new custom class with the minimum requirements of the overridden populateCreatePreNewVersion and createPopulate methods is given below:
/**
* @param regulatorySubmission
* @throws Exception
*/
@Override
public void preCreatePopulate(RegulatorySubmission regulatorySubmission) throws Exception {
/*
* Overriding this method provides the means to add custom data
* population to any hard or soft data on the RegulatorySubmission
* during the create process; before persistence of the new object.
*/
}
/**
* @param regulatorySubmission
* @throws Exception
*/
@Override
public void createPopulate(RegulatorySubmission regulatorySubmission) throws Exception {
/*
* Overriding this method provides the means to add custom data
* population to any hard or soft data on the RegulatorySubmission
* during the create process; after persistence of the new object.
*/
}