Class EditChangeItemFormProcessor
java.lang.Object
com.ptc.core.components.forms.DefaultObjectFormProcessor
com.ptc.core.components.forms.DefaultEditFormProcessor
com.ptc.windchill.enterprise.change2.forms.processors.EditChangeItemFormProcessor
- All Implemented Interfaces:
ObjectFormProcessor,com.ptc.windchill.enterprise.change2.forms.processors.ChangeFormProcessor
- Direct Known Subclasses:
CreateCapaReviewFormProcessor,EditCapaChangeRequestFormProcessor,EditChangeIssueFormProcessor,EditChangeNoticeFormProcessor,EditChangeRequestFormProcessor,EditChangeReviewFormProcessor,EditChangeTaskFormProcessor,EditCustomerExperienceFormProcessor,EditNCFormProcessor,EditVarianceFormProcessor
public abstract class EditChangeItemFormProcessor
extends DefaultEditFormProcessor
implements com.ptc.windchill.enterprise.change2.forms.processors.ChangeFormProcessor
A class for handling general change management edit wizard processing. This
class implements the preProcess, doOperation, postProcess methods in order to
process a transaction for different change object wizards such as Problem
Reports, Variances, Change Requests, Change Notices, and Change Tasks.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Field Summary
Fields inherited from class com.ptc.core.components.forms.DefaultEditFormProcessor
isAliasAttrOnMasterFields 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> objectBeanList) Saves the change object that was initialized in the preProcess() method which stored in eachObjectBeanthat is in the passed in object bean list.protected abstract LocalizableMessageRequired when extending EditChangeItemFormProcessor.postProcess(NmCommandBean clientData, List<ObjectBean> objectBeanList) Post Process using the wizard form data perObjectBeanin the object bean list checks to see if the if the user chose to submit now.preProcess(NmCommandBean clientData, List<ObjectBean> objectBeanList) Gets and initailizes the change object from the wizard form data.protected abstract WTListsaveChangeItem(WTList changeItems) Required when extending EditChangeItemFormProcessor.setResultNextAction(FormResult result, NmCommandBean clientData, List<ObjectBean> objectBeans) If the edit is launched from info page Actions drop down menu or table level action in the info page, then the whole page is refreshed.Methods inherited from class com.ptc.core.components.forms.DefaultEditFormProcessor
checkForMasterAttributes, getObjectBeingEdited, getObjFromDatabaseMethods inherited from class com.ptc.core.components.forms.DefaultObjectFormProcessor
continueProcessing, execute, getDelegates, getSuccessFeedbackMessage, getSuccessFeedbackMessage, getSuccessMessageBody, getSuccessMessageBodyForMulti, getSuccessMessageTitle, isUseObjectReference, mergeIntermediateResult, postTransactionProcess, processDelegates, removeTempFiles, setUseObjectReference
-
Method Details
-
preProcess
public FormResult preProcess(NmCommandBean clientData, List<ObjectBean> objectBeanList) throws WTException Gets and initailizes the change object from the wizard form data. This method invokes super to initialize the change objects inside each of the object beans in theObjectBeanlist. This method then checks to see if the name field for the change object has been modified and stores the value in arenameNameList.
Supported API: true- Specified by:
preProcessin interfaceObjectFormProcessor- Overrides:
preProcessin classDefaultEditFormProcessor- Parameters:
clientData- The original wizard form data. This in general should not be used to get wizard form data. The wizard form data should be retrieved from eachObjectBeanin theObjectBeanlist that is passed in.objectBeanList- The List of object beans that have been initialized with the appropriate wizard from data for each individualObjectBean.- Returns:
- A form result that indicates if the operation was succesful or not.
- Throws:
WTException- is thrown if initailizing the change object fails- See Also:
-
doOperation
public FormResult doOperation(NmCommandBean clientData, List<ObjectBean> objectBeanList) throws WTException Saves the change object that was initialized in the preProcess() method which stored in eachObjectBeanthat is in the passed in object bean list.
Supported API: true- Specified by:
doOperationin interfaceObjectFormProcessor- Overrides:
doOperationin classDefaultEditFormProcessor- Parameters:
clientData- The original wizard form data. This in general should not be used to get wizard form data. The wizard form data should be retrieved from eachObjectBeanin theObjectBeanlist that is passed in.objectBeanList- The List of object beans that have the appropriate wizard from data for each individualObjectBeanand the initialized object for eachObjectBeanfrom the previous call to the preProcess method.- Returns:
- A form result that indicates if the operation was succesful or not.
- Throws:
WTException- See Also:
-
postProcess
public FormResult postProcess(NmCommandBean clientData, List<ObjectBean> objectBeanList) throws WTException Post Process using the wizard form data perObjectBeanin the object bean list checks to see if the if the user chose to submit now.
Supported API: true- Specified by:
postProcessin interfaceObjectFormProcessor- Overrides:
postProcessin classDefaultObjectFormProcessor- Parameters:
clientData- The original wizard form data. This in general should not be used to get wizard form data. The wizard form data should be retrieved from eachObjectBeanin theObjectBeanlist that is passed in.objectBeanList- The List of object beans that have been saved with the appropriate wizard from data for each individualObjectBean.- Returns:
- A form result that indicates if the operation was succesful or not.
- Throws:
WTException
-
setResultNextAction
public FormResult setResultNextAction(FormResult result, NmCommandBean clientData, List<ObjectBean> objectBeans) throws WTException If the edit is launched from info page Actions drop down menu or table level action in the info page, then the whole page is refreshed. If it is a row level action, then only the row is refreshed.
Supported API: true- Specified by:
setResultNextActionin interfaceObjectFormProcessor- Overrides:
setResultNextActionin classDefaultObjectFormProcessor- Parameters:
result- - The FormResult to which the action info should be added. Input and output. Required.clientData- The original wizard form data. This in general should not be used to get wizard form data. The wizard form data should be retrieved from eachObjectBeanin theObjectBeanlist that is passed in.objectBeans- The current List of object beans.- Returns:
- A form result that indicates if the operation was successful or not.
- Throws:
WTException
-
getProcessorErrorMessage
Required when extending EditChangeItemFormProcessor. The purpose of this method is to handle error messaging that is unique to the change object type.
An example implementaton would look like the following:
private static final String RESOURCE = "com.ptc.windchill.enterprise.change2.change2ClientResource"; private static final LocalizableMessage ECN_ERROR_MSG = new WTMessage(RESOURCE, change2ClientResource.EDITCHANGENOTICE_PROCESSING_ERROR, null);- Returns:
- LocalizableMessage
-
saveChangeItem
Required when extending EditChangeItemFormProcessor. The purpose of this method is to handle persistance for the different types change objects. All change objects in the list that is passed in are of the same type. The order of the list needs to be maintained and return in the same order as a list of persisted change objects.
Supported API: true- Parameters:
changeItems- The list of change objects to be persisted.- Returns:
- The list of change objects that have been persisted.
- Throws:
WTException- is thrown if saving the change object fails.
-