Class CreatePartFormProcessor

All Implemented Interfaces:
ObjectFormProcessor

public class CreatePartFormProcessor extends CreateObjectFormProcessor
CreatePartFormProcessor is invoked by JCA infrastructure when user clicks the OK button in the Create Part Wizard. The processor creates a part using the data specified by the user and persists it in the database using persistence manager.

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

  • Method Details

    • setResultNextAction

      public FormResult setResultNextAction(FormResult result, NmCommandBean clientData, List<ObjectBean> objectBeans) throws WTException
      This method overrides the setResultNextAction method in CreateObjectFormProcessor and sets the "nextAction" attribute on the given FormResult based on the processing status.

      If the clientData is invoked from folder browser it will call the superclass method to handle the set action task. If the status is SUCCESS or NON_FATAL_ERROR, the nextAction is set to REFRESH_OPENER and 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:
      setResultNextAction in interface ObjectFormProcessor
      Overrides:
      setResultNextAction in class DefaultObjectFormProcessor
      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 the FormResult type method doOperation in CreateObjectFormProcessor. Method will validate the numberToInsert object that has revision number and if the object contains data method will invoke CreateObjectForInsertRevision(com.ptc.netmarkets.util.beans.NmCommandBean,java.util.List<com.ptc.core.components.beans.ObjectBean>) to form result.

      Supported API: true
      Specified by:
      doOperation in interface ObjectFormProcessor
      Overrides:
      doOperation in class CreateObjectFormProcessor
      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:
      preProcess in interface ObjectFormProcessor
      Overrides:
      preProcess in class CreateObjectFormProcessor
      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