Class AbstractRegulatorySubmissionProcessor
- All Implemented Interfaces:
RegulatorySubmissionProcessorInterface
- Direct Known Subclasses:
AbstractRegSubmission2Processor,RegulatorySubmission2Processor,SimpleRegulatorySubmissionProcessor
Supported API: true
Extendable: true
- See Also:
-
Field Summary
Fields inherited from interface com.ptc.qualitymanagement.regmstr.impl.RegulatorySubmissionProcessorInterface
USE_PRIMARY_CONTENT_AS_TRANSMISSION_PAYLOAD -
Method Summary
Modifier and TypeMethodDescriptioncleanTransmissionContent(RegulatorySubmission regulatorySubmission) Default implementation using getRegulatoryContentCategoriesToClean() to determine Regulatory Content Types to be deleted.createCustomEditUrl(RegulatorySubmission regulatorySubmission)
Supported API: truevoidcreatePopulate(RegulatorySubmission regulatorySubmission)
Supported API: trueboolean
Supported API: trueexpireRegulatorySubmission(RegulatorySubmission submission) Default implementation: Marks the provided regulatory submission as expired, changes itsSubmissionStageto expired, and fires theRegulatoryMasterServiceEvent.AUTO_EXPIREDevent.generatePayload(RegulatorySubmission regulatorySubmission) Sample implementation of a payload generation process.generatePrimaryContent(RegulatorySubmission regulatorySubmission) Deprecated.generatePrimaryContent(RegulatorySubmission regulatorySubmission, boolean draft) Generates the primary content.com.ptc.qualitymanagement.regmstr.SubmissionStageProvides the Regulatory Submission Stage for Cancellation
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().com.ptc.qualitymanagement.regmstr.SubmissionStageProvides the Regulatory Submission Stage for Submitted
Supported API: truegetTransmissionDelegate(RegulatorySubmission regulatorySubmission) Default implementation: Returns the SimulateTransmissionDelegate if no delegate for the Type is found, Registered with this following entry:
<Service name="com.ptc.qualitymanagement.regmstr.impl.RegulatoryTransmissionDelegateInterface">
<Option requestor="null" serviceClass="com.ptc.qualitymanagement.regmstr.impl.SimulateTransmissionDelegate" selector="default" cardinality="duplicate">
</Service>
Supported API: trueReturns RegulatoryContentCategory.REGULATORY_SUBMISSION_PAYLOAD.booleanDefault implementation: Returns False since the action isn't supported for the Simple Regulatory Submission
Supported API: truepostCancellation(RegulatorySubmission regulatorySubmission) Used to perform work required after the cancellation of the submission process of a regulatory submission.postComplete(RegulatorySubmission regulatorySubmission) Used to Perform work required after a successful acknowledgement from the Regulatory Agency.postSubmissionProcessing(RegulatorySubmission regulatorySubmission) Default implementation: Sets the submittedDate to the current date and sets the submissionStage to Submitted.voidpreCreatePopulate(RegulatorySubmission regulatorySubmission)
Supported API: trueprocessAcknowledgement(String transmissionName, byte[] transmissionContent) Sample implementation with a two phase acknowledgement.voidrevisePopulateNewVersion(RegulatorySubmission regulatorySubmission)
Supported API: truevoidrevisePopulatePreNewVersion(RegulatorySubmission regulatorySubmission)
Supported API: truesubmitRegulatorySubmission(RegulatorySubmission regulatorySubmission) Default Implementation: Submits the Regulatory Submission using the SimulateTransmissionDelegate.
-
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
@Deprecated public RegulatorySubmission generatePrimaryContent(RegulatorySubmission regulatorySubmission) throws Exception Deprecated.Generates the primary content with draft equal to false.- Specified by:
generatePrimaryContentin interfaceRegulatorySubmissionProcessorInterface- Throws:
Exception- See Also:
-
generatePrimaryContent
public RegulatorySubmission generatePrimaryContent(RegulatorySubmission regulatorySubmission, boolean draft) throws Exception Generates the primary content.
Supported API: true- Specified by:
generatePrimaryContentin interfaceRegulatorySubmissionProcessorInterface- Throws:
Exception- See Also:
-
processAcknowledgement
public ApplicationData processAcknowledgement(String transmissionName, byte[] transmissionContent) throws Exception Sample implementation with a two phase acknowledgement.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 acknowledgement events are only dispatched when Ack2 is received. The acknowledgement message is saved for a failed event. The type name is included as this is a sample generic acknowledgement 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- Parameters:
transmissionName-transmissionContent-- 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 Used to Perform work required after a successful acknowledgement from the Regulatory Agency.Default implementation:
On the provided regulatory submission, use getCompleteStage() to set the Submission Stage attribute and when the approval date is null, set it to the current time.
If a predecessor regulatory submission version exists, use getHistoryStage() to set the Submission Stage.
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[]
-
getSubmittedStage
public com.ptc.qualitymanagement.regmstr.SubmissionStage getSubmittedStage()Provides the Regulatory Submission Stage for Submitted
Supported API: true- Returns:
- SubmissionStage - Configured Submitted Stage
-
getTransmissionPayloadCategory
Returns RegulatoryContentCategory.REGULATORY_SUBMISSION_PAYLOAD.
Supported API: true- Specified by:
getTransmissionPayloadCategoryin interfaceRegulatorySubmissionProcessorInterface- Returns:
-
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
-
getCancellationStage
public com.ptc.qualitymanagement.regmstr.SubmissionStage getCancellationStage()Provides the Regulatory Submission Stage for Cancellation
Supported API: true- Returns:
- SubmissionStage - Configured Cancellation 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- Parameters:
regulatorySubmission-- Returns:
- RegulatorySubmission
- Throws:
Exception
-
getTransmissionDelegate
public RegulatoryTransmissionDelegateInterface getTransmissionDelegate(RegulatorySubmission regulatorySubmission) throws Exception Default implementation: Returns the SimulateTransmissionDelegate if no delegate for the Type is found, Registered with this following entry:
<Service name="com.ptc.qualitymanagement.regmstr.impl.RegulatoryTransmissionDelegateInterface">
<Option requestor="null" serviceClass="com.ptc.qualitymanagement.regmstr.impl.SimulateTransmissionDelegate" selector="default" cardinality="duplicate">
</Service>
Supported API: true- Specified by:
getTransmissionDelegatein interfaceRegulatorySubmissionProcessorInterface- Parameters:
regulatorySubmission-- Returns:
- RegulatoryTransmissionDelegateInterface
- Throws:
Exception
-
submitRegulatorySubmission
public RegulatorySubmission submitRegulatorySubmission(RegulatorySubmission regulatorySubmission) throws Exception Default Implementation: Submits the Regulatory Submission using the SimulateTransmissionDelegate. Do not modify the Regulatory Submission in any implementation of this method. Customization can be performed by overridingRegulatorySubmissionProcessorInterface.postSubmissionProcessing(RegulatorySubmission)
Supported API: true- Specified by:
submitRegulatorySubmissionin interfaceRegulatorySubmissionProcessorInterface- Parameters:
regulatorySubmission-- Returns:
- RegulatorySubmission
- Throws:
Exception
-
postSubmissionProcessing
public RegulatorySubmission postSubmissionProcessing(RegulatorySubmission regulatorySubmission) throws Exception Default implementation: Sets the submittedDate to the current date and sets the submissionStage to Submitted. Uses theConditionalAutoCheckoutRunnerwrapper class, to ensure the regulatory submission object is checked-out and checked-in.
Supported API: true- Specified by:
postSubmissionProcessingin interfaceRegulatorySubmissionProcessorInterface- Parameters:
regulatorySubmission-- Returns:
- RegulatorySubmission
- Throws:
Exception
-
expireRegulatorySubmission
public RegulatorySubmission expireRegulatorySubmission(RegulatorySubmission submission) throws WTException, IllegalArgumentException Default implementation: Marks the provided regulatory submission as expired, changes itsSubmissionStageto expired, and fires theRegulatoryMasterServiceEvent.AUTO_EXPIREDevent. Additionally, will auto check out and check in a revision-controlled regulatory submission using theConditionalAutoCheckoutRunnerif a working copy is not provided and does not already exist. Will not mark a checked out revision-controlled regulatory submission as expired
Supported API: true- Specified by:
expireRegulatorySubmissionin interfaceRegulatorySubmissionProcessorInterface- Parameters:
submission- The regulatory submission to be expired- Returns:
- The version of the regulatory submission which has been marked expired.
- Throws:
WTExceptionIllegalArgumentException
-
postCancellation
public RegulatorySubmission postCancellation(RegulatorySubmission regulatorySubmission) throws Exception Used to perform work required after the cancellation of the submission process of a regulatory submission.Default implementation:
On the provided regulatory submission, use getCancellationStage() to set the Submission Stage attribute. Additionally, set the terminated date to the current time if it is currently null
Supported API: true- Specified by:
postCancellationin interfaceRegulatorySubmissionProcessorInterface- Parameters:
regulatorySubmission-- Returns:
- RegulatorySubmission
- Throws:
Exception
-
performTrackRegSubActionValidation
Default implementation: Returns False since the action isn't supported for the Simple Regulatory Submission
Supported API: true- Specified by:
performTrackRegSubActionValidationin interfaceRegulatorySubmissionProcessorInterface- Parameters:
regSub2-- Returns:
- Throws:
WTException
-