Class ChangeableContraintsValidator
java.lang.Object
com.ptc.core.ui.validation.DefaultValidationFilter
com.ptc.core.ui.validation.DefaultUIComponentValidator
com.ptc.windchill.enterprise.change2.constraints.ChangeableContraintsValidator
- All Implemented Interfaces:
UIComponentValidator,ValidationFilter
Validates that the association of the changeable object for given change
object is valid for the association link type. The association link type is
derived from the base link class for the association. The validator can
either be extended by another validator or be invoked using calling the
Supported API: true
Extendable: true
performValidation method. The base link class for the
association can be automatically derived when added objects through a
collector, picker or paste. When performing a revise, creating one-off
versions, or hanging change links the resulting object link class needs to be
specified prior to calling this validator. To make sure that the correct base
link class is used when evaluating the constraints add the
ChangeMgmtConstraintsClientHelper.BASE_LINK_CLASS to the form data
request parameter map. For example to validate that adding the revised
objects from the affected objects table to the resulting objects you would
need to add the wt.change2.ChangeRecord2 class string for the
base link class:
FormDataHolder#getParameterMap().put(ChangeMgmtConstraintsClientHelper.BASE_LINK_CLASS, "wt.change2.ChangeRecord2");
Supported API: true
Extendable: true
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<UIValidationFeedbackMsg> getInvalidMessageList(UIValidationResultSet resultSet) Returns the list of feedback messages for target objects with that are not valid for the association.static WTCollectiongetInvalidTargets(UIValidationResultSet resultSet) Filters out the valid target objects and return a collection only the invalid target objects.static WTCollectiongetValidTargets(UIValidationResultSet resultSet) Filters out the invalid target objects and return a collection only the valid target objects.static UIValidationResultSetperformValidation(UIValidationCriteria criteria, Locale locale) Invokes the validator for the selector "changeableContraintsValidation" and calls.performFullPreValidation(UIValidationKey, UIValidationCriteria, Locale)static UIValidationResultSetperformValidation(NmCommandBean clientData, WTCollection targets) Invokes the validator for the selector "changeableContraintsValidation" and calls.performFullPreValidation(UIValidationKey, UIValidationCriteria, Locale)Methods inherited from class com.ptc.core.ui.validation.DefaultUIComponentValidator
getSubValidator, getSubValidator, performLimitedPreValidation, preValidateAction, preValidateAttribute, preValidateMultiTargetAction, validateFormSubmission, validateSelectedAction, validateSelectedMultiSelectActionMethods inherited from class com.ptc.core.ui.validation.DefaultValidationFilter
populateResultSet
-
Method Details
-
performValidation
public static UIValidationResultSet performValidation(NmCommandBean clientData, WTCollection targets) throws WTException Invokes the validator for the selector "changeableContraintsValidation" and calls. The method could be used outside of a validator.performFullPreValidation(UIValidationKey, UIValidationCriteria, Locale)
Supported API: true- Throws:
WTException
-
performValidation
public static UIValidationResultSet performValidation(UIValidationCriteria criteria, Locale locale) throws WTException Invokes the validator for the selector "changeableContraintsValidation" and calls. This method could be used to call the changeable constraints validator with having to extend it.performFullPreValidation(UIValidationKey, UIValidationCriteria, Locale)
Supported API: true- Throws:
WTException
-
getValidTargets
Filters out the invalid target objects and return a collection only the valid target objects.
Supported API: true -
getInvalidTargets
Filters out the valid target objects and return a collection only the invalid target objects.
Supported API: true -
getInvalidMessageList
Returns the list of feedback messages for target objects with that are not valid for the association.
Supported API: true
-