Attribute Populators for New Iteration of Regulatory Submissions
This topic explains how to customize specific attributes of a new iteration of a Regulatory Submission.
Intended Outcome
After reading this, you should know how to customize specific attributes for a new iteration of a Regulatory Submission so that key attributes are automatically populated or updated.
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
|
|
getPopulateOnNewIterationAllowedStates(RegulatorySubmission regSub)
|
API
|
This API returns an array of states where the attributes copy forward for new iterations of regulatory submissions. The default states are In Work, Creation, and Rework.
|
|
isPopulateOnNewIterationAllowed(RegulatorySubmission regSub)
|
API
|
This API determines if the attributes for the new iteration populate. By default, it returns true for the latest versions if they are in one of the states defined in getPopulateOnNewIterationAllowedStates.
|
|
processNewIteration(RegulatorySubmission regSub)
|
API
|
This API provides a customization point to copy forward attributes (regular and tracking) and to update the link tables for the regulatory submission. If isPopulateOnNewIterationAllowed returns true, it is called after the data is persisted.
|
|
processPreNewIteration(RegulatorySubmission regSub)
|
API
|
This API provides a customization point to copy forward attributes (regular and tracking). If isPopulateOnNewIterationAllowed returns true, it is called once before the new iteration is persisted.
|
Default Behavior
Creating Custom Classes
To customize specific attributes for a new iteration of a regulatory submission, create a java class which extends the AbstractRegulatorySubmissionProcessor and override the isPopulateOnNewIterationAllowed and processNewIteration methods. The example of a new custom class with the minimum requirements of the overridden isPopulateOnNewIterationAllowed and processNewIteration methods are given below:
/**
* <BR>
* <BR>
* <B>Supported API: </B>true <BR>
*
* Returns the state where the regulatory submission attributes will be copied to new iterations. Default states are
* In Work, Creation and Rework. This API is called in isPopulateOnNewIterationAllowed
* @param regSub - The regulatory submission being iterated
* @return
* @throws WTException
*/
@Override
public State[] getPopulateOnNewIterationAllowedStates(RegulatorySubmission regSub) throws WTException
{
/*
* Overriding this method provides the means to override the states where attributes are copied forward
* for new iterations of regulatory submissions.
*/
}
/**
* Determines if the attributes should be populated on the new iteration. Returns true for latest
* version iterations for the states configured for populating on new iteration. See getPopulateOnNewIterationAllowedStates
*
* <BR>
* <BR>
* <B>Supported API: </B>true <BR>
* <B>Extendable: </B>true <br/>
*
* @param regSub
* An iteration of a latest versions of a regulatory submission
* @return a boolean value indicating whether or not the data should be populated
* for the iteration
* @throws WTException
* if a non latest version of a regulatory submission is provided as input
*/
@Override
boolean isPopulateOnNewIterationAllowed(RegulatorySubmission regSub) throws WTException
{
/*
* Overriding this method provides the means to override the algorithm that determines if the
* new iteration of the regulatory submission should have attributes populated.
*/
}
/**
* <BR>
* <BR>
* <B>Supported API: </B>true <BR>
*
* This API provides a customization point to copy forward attributes (regular and tracking) and to update the links tables for the regulatory submission.
* It will be called after it is persisted.
* <br>
* @param regSub the regulatory submission being processed
* @throws WTException
*/
@Override
public void processNewIteration(RegulatorySubmission regSub) throws WTException
{
/*
* Overriding this method provides the means to add custom data population
* to any hard or soft data on the regulatory submission during the new iteration process; on the new iteration
*/
}
/**
* <BR>
* <BR>
* <B>Supported API: </B>true <BR>
*
* This API provides a customization point to copy forward attributes (regular and tracking).
* It will be called prior to persisting the new iteration.
* <br>
* @param regSub the regulatory submission being processed
* @throws WTException
*/
@Override
public void processPreNewIteration(RegulatorySubmission regSub) throws WTException
{
/*
* Overriding this method provides the means to add custom data population
* to any hard or soft data on the regulatory submission during the new iteration process; on the new iteration
*/
}