Class CreatePartFormProcessor
- All Implemented Interfaces:
ObjectFormProcessor
This class implements its own refresh logic to handle the refresh of the calling web page since this can be invoked from multiple launch points.
Implementation of CreatePartFormProcessor extends the
CreateObjectFormProcessor class and override the super class
methods setResultNextActionand doOperation
methods to explicitly set the next action and do operation.
Supported API: true
Extendable: true
-
Field Summary
Fields inherited from class com.ptc.core.components.forms.DefaultObjectFormProcessor
delegates, DO_OPERATION, overallResult, POST_PROCESS, POST_TRANSACTION_PROCESS, PRE_PROCESS -
Method Summary
Modifier and TypeMethodDescriptiondoOperation(NmCommandBean clientData, List<ObjectBean> objectBeans) The method implementation overrides theFormResulttype methoddoOperationinCreateObjectFormProcessor.preProcess(NmCommandBean clientData, List<ObjectBean> objectBeans) Calls the preProcess() methods of the wizard's ObjectFormProcessorDelegates.setResultNextAction(FormResult result, NmCommandBean clientData, List<ObjectBean> objectBeans) This method overrides thesetResultNextActionmethod inCreateObjectFormProcessorand sets the "nextAction" attribute on the given FormResult based on the processing status.Methods inherited from class com.ptc.core.components.forms.CreateObjectFormProcessor
createAndValidateTypeInstance, createItemInstance, createPersistable, getSuccessMessageBody, getSuccessMessageBodyForMulti, getSuccessMessageTitle, translateTIToPersistableMethods inherited from class com.ptc.core.components.forms.DefaultObjectFormProcessor
continueProcessing, execute, getDelegates, getSuccessFeedbackMessage, getSuccessFeedbackMessage, isUseObjectReference, mergeIntermediateResult, postProcess, postTransactionProcess, processDelegates, removeTempFiles, setDelegates, setUseObjectReference
-
Method Details
-
setResultNextAction
public FormResult setResultNextAction(FormResult result, NmCommandBean clientData, List<ObjectBean> objectBeans) throws WTException This method overrides thesetResultNextActionmethod inCreateObjectFormProcessorand sets the "nextAction" attribute on the given FormResult based on the processing status.If the
clientDatais invoked from folder browser it will call the superclass method to handle the set action task. If the status isSUCCESSorNON_FATAL_ERROR, the nextAction is set toREFRESH_OPENERand a success feedback message is added to the FormResult. If the launching window was a folder browser, information needed to dynamically refresh the parent window also will be returned.
Supported API: true- Specified by:
setResultNextActionin interfaceObjectFormProcessor- Overrides:
setResultNextActionin classDefaultObjectFormProcessor- Parameters:
result- The FormResult to which the action info should be added.clientData- Contains all the form data and other wizard context information.objectBeans- Contain the object(s) that were created (if successful) and it will create One bean per object.- Returns:
- result Returns the next action attribute set to be refresh info along with the feed back message.
- Throws:
WTException- Handle exceptions while creating the next action.
-
doOperation
public FormResult doOperation(NmCommandBean clientData, List<ObjectBean> objectBeans) throws WTException The method implementation overrides theFormResulttype methoddoOperationinCreateObjectFormProcessor. Method will validate thenumberToInsertobject that has revision number and if the object contains data method will invokeCreateObjectForInsertRevision(com.ptc.netmarkets.util.beans.NmCommandBean,java.util.List<com.ptc.core.components.beans.ObjectBean>)to form result.
Supported API: true- Specified by:
doOperationin interfaceObjectFormProcessor- Overrides:
doOperationin classCreateObjectFormProcessor- Parameters:
clientData- Contains all of the request form data and other wizard context information.objectBeans- The "object" attribute of these beans contain the object instances to be stored.- Returns:
- phaseResult Returns the object that has data form result data including nextAction, feedback message etc.
- Throws:
WTException- Handle exception.
-
preProcess
public FormResult preProcess(NmCommandBean clientData, List<ObjectBean> objectBeans) throws WTException Calls the preProcess() methods of the wizard's ObjectFormProcessorDelegates. Delegates are called in no particular order.
Supported API: true- Specified by:
preProcessin interfaceObjectFormProcessor- Overrides:
preProcessin classCreateObjectFormProcessor- Parameters:
clientData- - Contains all the request form data and other wizard context information. Input.objectBeans- - Contain the form data for each target object of the wizard. One bean per object. Input.- Returns:
- FormResult - the result of this method
- Throws:
WTException
-