Class MassChangeOperationValidator
java.lang.Object
com.ptc.core.ui.validation.DefaultValidationFilter
com.ptc.core.ui.validation.DefaultUIComponentValidator
com.ptc.windchill.enterprise.massChange.validators.MassChangeOperationValidator
- All Implemented Interfaces:
UIComponentValidator,ValidationFilter
The mass change operations are controlled by properties for supported and
excluded types for a specific operation. The supported and excluded types for
selected target objects for the mass change operation can be registered
against the mass change operation in wt.properties. To specify the supported
types for a particular mass change operation the following name convention
should be followed
Out-of-the-box, the validator MassChangeOperationValidator, is provided that can be used to leverage the supportedTypes and excludedTypes. This validator should be able to handle most cases in the field. Validating the items applicability beyond its type (for example not allowing mass change on checked-out items) should be handled within the Filter delegates (overriding the evaluate() or getServerExcludedItems() methods) see
Recipe to restrict the mass change operation to only certain types:
Example of the out of the box supported types for Insert existing part operation (addPartUsage):
Supported API: true
Extendable: false
massChange.operationName.supportedTypes likewise
for excluded types it is
massChange.operationName.excludedTypes. To include
or exclude an object type the external form of the type is used. For example
to include Part it the string is WCTYPE|wt.part.WTPart. If no supported types
are specified for a mass change operation than all objects are supported for
the operation.Out-of-the-box, the validator MassChangeOperationValidator, is provided that can be used to leverage the supportedTypes and excludedTypes. This validator should be able to handle most cases in the field. Validating the items applicability beyond its type (for example not allowing mass change on checked-out items) should be handled within the Filter delegates (overriding the evaluate() or getServerExcludedItems() methods) see
MassChangeFilterDelegate
. Recipe to restrict the mass change operation to only certain types:
Example of the out of the box supported types for Insert existing part operation (addPartUsage):
-
Using xconfmanager, add a property to wt.properties that specifies the
supportedTypes. The output should look similar to the Insert Part Usage
operation property:
massChange.addPartUsage.supportedTypes=WCTYPE|wt.part.WTPart
-
Register a validator using xconfmanager for the operation key in
service.properties. Note that the selector is the operation with
_filter appended to the end. As stated above, the
MassChangeOperationValidator is designed to use the supportedTypes and
excludedTypes properties entries automatically:
wt.services/svc/default/com.ptc.core.ui.validation.UIComponentValidator/addPartUsage_filter/null/0=com.ptc.windchill.enterprise.massChange.validators. /duplicate
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionperformFullPreValidation(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) Validates whether an the mass change operation is valid for the types of the selected target objects.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
-
performFullPreValidation
public UIValidationResultSet performFullPreValidation(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) throws WTException Validates whether an the mass change operation is valid for the types of the selected target objects.
Supported API: true- Specified by:
performFullPreValidationin interfaceUIComponentValidator- Overrides:
performFullPreValidationin classDefaultUIComponentValidator- Parameters:
validationKey- A UIValidationKey object representing the action or UI component to be validated.validationCriteria- Object holding information required to perform validation tasks.locale- The user's Locale. If a null value is passed in, the session locale will be used.- Returns:
- UIValidationResultSet
- Throws:
WTException- See Also:
-