Class AbstractRegulatorySubmissionProcessor
- All Implemented Interfaces:
RegulatorySubmissionProcessorInterface
- Direct Known Subclasses:
AbstractRegSubmission2Processor,RegulatorySubmission2Processor,SimpleRegulatorySubmissionProcessor
Supported API: true
Extendable: true
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncleanTransmissionContent(RegulatorySubmission regulatorySubmission) Default implementation using getRegulatoryContentCategoriesToClean() to determine Regulatory Content Types to be deleted Used to Delete Regulatory Content created by the submitting process.createCustomEditUrl(RegulatorySubmission regulatorySubmission)
Supported API: truevoidcreatePopulate(RegulatorySubmission regulatorySubmission) Supported API: trueboolean
Supported API: truegeneratePayload(RegulatorySubmission regulatorySubmission) Sample implementation of a payload generation process.generatePrimaryContent(RegulatorySubmission regulatorySubmission)
Supported API: truecom.ptc.qualitymanagement.regmstr.SubmissionStageProvides the Regulatory Submission Stage for Complete
Supported API: truecom.ptc.qualitymanagement.regmstr.SubmissionStageProvides the Regulatory Submission Stage for History
Supported API: truegetRegulatoryContentCategoriesToClean(RegulatorySubmission regulatorySubmission) Provides the Regulatory Content Types to be deleted by cleanTransmissionContent().postComplete(RegulatorySubmission regulatorySubmission) Default implementation using getCompleteStage() to determine the Regulatory Submission Stage attribute which is set on the Regulatory Submission, and using getHistoryStage() to determine the Regulatory Submission Stage which is set on the predecessor Regulatory Submission (If one exists).voidpreCreatePopulate(RegulatorySubmission regulatorySubmission) Supported API: truebooleanprocessAcknowledgement(String transmissionName, String transmissionContent) Sample implementation with a two phase acknowledgment.voidrevisePopulateNewVersion(RegulatorySubmission regulatorySubmission) Supported API: truevoidrevisePopulatePreNewVersion(RegulatorySubmission regulatorySubmission) Supported API: true
-
Method Details
-
revisePopulatePreNewVersion
Supported API: true- Specified by:
revisePopulatePreNewVersionin interfaceRegulatorySubmissionProcessorInterface- Throws:
Exception
-
revisePopulateNewVersion
Supported API: true- Specified by:
revisePopulateNewVersionin interfaceRegulatorySubmissionProcessorInterface- Throws:
Exception
-
preCreatePopulate
Supported API: true- Specified by:
preCreatePopulatein interfaceRegulatorySubmissionProcessorInterface- Throws:
Exception
-
createPopulate
Supported API: true- Specified by:
createPopulatein interfaceRegulatorySubmissionProcessorInterface- Throws:
Exception
-
enableCustomEditAction
public boolean enableCustomEditAction()
Supported API: true- Specified by:
enableCustomEditActionin interfaceRegulatorySubmissionProcessorInterface
-
createCustomEditUrl
Supported API: true- Specified by:
createCustomEditUrlin interfaceRegulatorySubmissionProcessorInterface
-
generatePrimaryContent
public RegulatorySubmission generatePrimaryContent(RegulatorySubmission regulatorySubmission) throws Exception
Supported API: true- Specified by:
generatePrimaryContentin interfaceRegulatorySubmissionProcessorInterface- Throws:
Exception- See Also:
-
processAcknowledgement
public boolean processAcknowledgement(String transmissionName, String transmissionContent) throws Exception Sample implementation with a two phase acknowledgment.Ack1 contains the type name, number and remote identifier of the Regulatory Submission.
{ "ackNumber": 1, "typeName": "<typeName>" "name": "<regulatorySubmissionName>", "number": "<regulatorySubmissionNumber>", "remoteIdentifier": "<remoteIdentifier>" }Ack2 contains the remote identifier from Ack1, the type name, the certificate number and the result.
Per interface documentation, the acknowledgment events are only dispatched when Ack2 is received. The type name is included as this is a sample generic acknowledgment processor. In production code the type name is known because there is a one-to-one relationship between RegulatorySubmissionProcessor and the type it is registered against. ConditionalCheckoutRunner is used to prevent multiple iterations when multiple service calls are made that perform auto checkout.{ "ackNumber": 2, "typeName": "<typeName>" "remoteIdentifier": "<remoteIdentifier>" "certificationNumber": "<certificateNumber>" "expirationDate": "<expirationDate>" "result": "SUCCESS|FAILURE" }
Supported API: true- Specified by:
processAcknowledgementin interfaceRegulatorySubmissionProcessorInterface- Returns:
- Throws:
Exception
-
cleanTransmissionContent
public RegulatorySubmission cleanTransmissionContent(RegulatorySubmission regulatorySubmission) throws Exception Default implementation using getRegulatoryContentCategoriesToClean() to determine Regulatory Content Types to be deleted Used to Delete Regulatory Content created by the submitting process. Transmission Regulatory Content must be cleaned because exceptions are thrown when attempting to overwrite existing Regulatory Content. Cleaning is required due to the loop back in Regulatory Submission Submitting Workflow when asked to resubmit.
Supported API: true- Specified by:
cleanTransmissionContentin interfaceRegulatorySubmissionProcessorInterface- Parameters:
regulatorySubmission-- Returns:
- RegulatorySubmission
- Throws:
Exception
-
postComplete
public RegulatorySubmission postComplete(RegulatorySubmission regulatorySubmission) throws Exception Default implementation using getCompleteStage() to determine the Regulatory Submission Stage attribute which is set on the Regulatory Submission, and using getHistoryStage() to determine the Regulatory Submission Stage which is set on the predecessor Regulatory Submission (If one exists). Used to Perform work required after a successful acknowledgment from the Regulatory Agency.
Supported API: true- Specified by:
postCompletein interfaceRegulatorySubmissionProcessorInterface- Parameters:
regulatorySubmission-- Returns:
- RegulatorySubmission
- Throws:
Exception
-
getRegulatoryContentCategoriesToClean
public RegulatoryContentCategory[] getRegulatoryContentCategoriesToClean(RegulatorySubmission regulatorySubmission) Provides the Regulatory Content Types to be deleted by cleanTransmissionContent(). Default vales: REGULATORY_SUBMISSION_PAYLOAD, ACKNOWLEDGEMENT1, ACKNOWLEDGEMENT2, ACKNOWLEDGEMENT3.
Supported API: true- Parameters:
regulatorySubmission-- Returns:
- RegulatoryContentCategory[]
-
getCompleteStage
public com.ptc.qualitymanagement.regmstr.SubmissionStage getCompleteStage()Provides the Regulatory Submission Stage for Complete
Supported API: true- Returns:
- SubmissionStage - Configured Complete Stage
-
getHistoryStage
public com.ptc.qualitymanagement.regmstr.SubmissionStage getHistoryStage()Provides the Regulatory Submission Stage for History
Supported API: true- Returns:
- SubmissionStage - Configured History Stage
-
generatePayload
public RegulatorySubmission generatePayload(RegulatorySubmission regulatorySubmission) throws Exception Sample implementation of a payload generation process.A regulatory submission object is provided as a parameter.
Modify permissions are checked.
The
TransactionRunnerwrapper class is used to start a transaction (and eventually return the updated regulatory submission.From the given submission, a JSON Object is created with some selected attributes as key/values.
A JSONArray list of strings is added to the JSON Object to demonstrate list capabilities.
The stringified version of the JSON object is then turned into a ByteArrayInputStream and file description defined.
Using the
ConditionalAutoCheckoutRunnerwrapper class, to ensure the regulatory submission object is checked-out and checked-in, the file is saved using the ByteArrayInputStream, description, and theRegulatoryContentCategory.REGULATORY_SUBMISSION_PAYLOADcontent category. Also, the submissionID attribute is updated on the regulatory submission.Finally, the regulatory submission object is then returned by the
ConditionalAutoCheckoutRunnerandTransactionRunner.
Supported API: true- Specified by:
generatePayloadin interfaceRegulatorySubmissionProcessorInterface- Returns:
- RegulatorySubmission
- Throws:
Exception
-