Class PromotionTargetsReviseValidator
java.lang.Object
com.ptc.core.ui.validation.DefaultValidationFilter
com.ptc.core.ui.validation.DefaultUIComponentValidator
com.ptc.windchill.enterprise.maturity.validators.PromotionTargetsReviseValidator
- All Implemented Interfaces:
UIComponentValidator,ValidationFilter
Validates that the promotion candidates are ready to be revised. Objects that
are eligible to revised are returned in the result set as a result with a
status of UIValidationStatus.ENABLED or UIValidationStatus.PERMITTED. For
promotion candidates that are not eligible for revising the result will
contain a feedback message that is of type FeedbackType.ERROR.
In order to invoke this validator call the
. This API will instantiate
this validator class or the validator registered for "revisePromotionTargets"
selector.
Supported API: true
Extendable: true
In order to invoke this validator call the
invalid reference
#performFullPreValidation(PromotionNotice)
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetReviseResultSetMessage(UIValidationResultSet resultSet, Locale locale) Given a validation result set will filter any results with a status UIValidationStatus.PERMITTED or UIValidationStatus.ENABLED in order to generate a message of the promotion candidates that were not able to be revised.protected WTCollectionvalidatePromotionRevisePreference(UIValidationResultSet resultSet, PromotionNotice pn, WTCollection promotionTargets, Locale locale) Checks the revise promotion targets preference for all targets, targets only with new series, or none and then will filter based on the preference.protected WTCollectionvalidatePromotionTargetsArePromoted(UIValidationResultSet resultSet, PromotionNotice pn, WTCollection promotionTargets, Locale locale) Validate that the promotion targets have been promoted already if not returns an empty list of valid promotion targets.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
-
validatePromotionTargetsArePromoted
protected WTCollection validatePromotionTargetsArePromoted(UIValidationResultSet resultSet, PromotionNotice pn, WTCollection promotionTargets, Locale locale) Validate that the promotion targets have been promoted already if not returns an empty list of valid promotion targets. The promotion date is set when the promotion targets are promoted.
Supported API: true- Parameters:
resultSet-pn-promotionTargets-locale-
-
validatePromotionRevisePreference
protected WTCollection validatePromotionRevisePreference(UIValidationResultSet resultSet, PromotionNotice pn, WTCollection promotionTargets, Locale locale) throws WTException Checks the revise promotion targets preference for all targets, targets only with new series, or none and then will filter based on the preference. Will update the UIValidationResultSet with the denied target objects and return the collection only with valid objects eligible for revision. Following actions will take place depending on the preference selected:
None-Do nothing - The return collection will be empty with UIValidationStatus to DENIED for all the promotables.
Automatically revise all the promotion candidates - Will return the passed in promotionTargets collection.
Automatically revise only the promotion targets with versioning scheme changed - Will update theUIValidationStatus.DENIEDstatus to objects with no versioning series changed.
Preference value is calculated for the container of the Promotable.
Supported API: true- Parameters:
resultSet-pn-promotionTargets-locale-- Throws:
WTException
-
getReviseResultSetMessage
public static String getReviseResultSetMessage(UIValidationResultSet resultSet, Locale locale) throws WTException Given a validation result set will filter any results with a status UIValidationStatus.PERMITTED or UIValidationStatus.ENABLED in order to generate a message of the promotion candidates that were not able to be revised. If an empty message is returned then all promotion candidates were successfully revised.
Supported API: true- Throws:
WTException
-