Package com.ptc.core.ui.validation
Class DefaultUIComponentValidator
java.lang.Object
com.ptc.core.ui.validation.DefaultValidationFilter
com.ptc.core.ui.validation.DefaultUIComponentValidator
- All Implemented Interfaces:
UIComponentValidator,ValidationFilter
- Direct Known Subclasses:
AttachmentsEditActionValidator,ChangeableContraintsValidator,ChangeablePreReleaseValidator,ChangeBaselineReportValidator,ChangeTaskSequenceValidator,CreateDeliveryValidator,com.ptc.core.components.validators.DefaultCreateValidator,DefaultURLValidator,com.ptc.windchill.enterprise.wip.DefaultWIPValidator,ESIViewShopOrdersInfoActionValidator,GenerateXliffValidator,MassChangeOperationValidator,PlanActivityStartActionValidator,PlannableStateValidator,PromotionObjectsValidator,PromotionTargetsReviseValidator,RelatedChangesValidator,RemovePackageMembersValidator,RevisionLabelValidator,UserInfoPageAttributeValidator
public class DefaultUIComponentValidator
extends DefaultValidationFilter
implements UIComponentValidator
This class serves as a default implementation of the UIComponentValidator Interface. Application developers should
never need to modify the content of this class. Developers creating their own implementation of the
UIComponentValidator Interface should extend this class, as opposed to implementing the Interface directly.
This default implementation of a UIComponentValidator will always return results indicating that a given
action/component is enabled/permitted/etc. It will never deny access/availability to an action/component.
Developers who extend this class when creating their own implementation of a UIComponentValidator class only need to
implement the APIs where they want non-defualt behavior. If a given API is not defined in the subclass, the default
behavior defined in this class (always enabled/permitted/etc.) will be executed.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptiongetSubValidator(String componentId) Gets and returns an instance of a class that implements the UIComponentValidator interface, based on the componentId argument.getSubValidator(String componentId, Object requestor) Gets and returns an instance of a class that implements the UIComponentValidator interface, based on the componentId and requestor arguments.performFullPreValidation(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) This implementation of performFullPreValdiation will return a UIValidationResultBean whose UIValidationResult objects all have an ENABLED status.performLimitedPreValidation(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) This implementation of performLimitedPreValdiation will return a UIValidationResultBean whose UIValidationResult objects all have an ENABLED status.preValidateAction(UIValidationKey validationKey, UIValidationCriteria validationCriteria)
Supported API: truepreValidateAttribute(UIValidationKey validationKey, UIValidationCriteria validationCriteria)
Supported API: truepreValidateMultiTargetAction(UIValidationKey validationKey, UIValidationCriteria validationCriteria)
Supported API: truevalidateFormSubmission(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) This implementation of validateFormSubmission will return a UIValidationResult object with a PERMITTED status.validateSelectedAction(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) This implementation of validateSelectedAction will return a UIValidationResult object with a PERMITTED status.validateSelectedMultiSelectAction(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) This implementation of validateSelectedMultiSelectAction will return a UIValidationResultBean whose UIValidationResult objects all have a PERMITTED status.Methods inherited from class com.ptc.core.ui.validation.DefaultValidationFilter
populateResultSet
-
Method Details
-
getSubValidator
Gets and returns an instance of a class that implements the UIComponentValidator interface, based on the componentId argument. This method will return null if no validator is registered for the provided componentId.
The intent is that this method is called from Validators who need to delegate some validation logic to another validator. They can call this method to find the validator (and not worry about module dependencies), and then call whatever method they need to on that validator.
It will use entries like the one below to perform its lookup:
wt.services/svc/default/com.ptc.core.ui.validation.UIComponentValidator/componentId/null/0=(UIComponentValidator fully-qualified class name)
Supported API: true- Parameters:
componentId- - the selector used to register the desired validator in service.properties- Returns:
- UIComponentValidator - will be null if no validator is registered for the given componentId
-
getSubValidator
Gets and returns an instance of a class that implements the UIComponentValidator interface, based on the componentId and requestor arguments. This method will return null if no validator is registered for the provided componentId and requestor combination.
The intent is that this method is called from Validators who need to delegate some validation logic to another validator. They can call this method to find the validator (and not worry about module dependencies), and then call whatever method they need to on that validator.
It will use entries like the one below to perform its lookup:
wt.services/svc/default/com.ptc.core.ui.validation.UIComponentValidator/componentId/requestor/0=(UIComponentValidator fully-qualified class name)
Supported API: true- Parameters:
componentId- - the selector used to register the desired validator in service.propertiesrequestor- - the requestor used to register the desired validator in service.properties- Returns:
- UIComponentValidator - will be null if no validator is registered for the given componentId and requestor
-
performFullPreValidation
public UIValidationResultSet performFullPreValidation(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) throws WTException This implementation of performFullPreValdiation will return a UIValidationResultBean whose UIValidationResult objects all have an ENABLED status.
Supported API: true- Specified by:
performFullPreValidationin interfaceUIComponentValidator- 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:
-
performLimitedPreValidation
public UIValidationResultSet performLimitedPreValidation(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) throws WTException This implementation of performLimitedPreValdiation will return a UIValidationResultBean whose UIValidationResult objects all have an ENABLED status.
Supported API: true- Specified by:
performLimitedPreValidationin interfaceUIComponentValidator- 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
-
preValidateAction
public UIValidationStatus preValidateAction(UIValidationKey validationKey, UIValidationCriteria validationCriteria)
Supported API: true- Specified by:
preValidateActionin interfaceValidationFilter- Overrides:
preValidateActionin classDefaultValidationFilter- Parameters:
validationKey- A UIValidationKey object representing the action or UI component to be validated.validationCriteria- Object holding information required to perform validation tasks.- Returns:
- UIValidationStatus
- See Also:
-
preValidateAttribute
public UIValidationStatus preValidateAttribute(UIValidationKey validationKey, UIValidationCriteria validationCriteria)
Supported API: true- Specified by:
preValidateAttributein interfaceValidationFilter- Overrides:
preValidateAttributein classDefaultValidationFilter- Parameters:
validationKey- A UIValidationKey object representing the action or UI component to be validated.validationCriteria- Object holding information required to perform validation tasks.- Returns:
- UIValidationStatus
- See Also:
-
preValidateMultiTargetAction
public UIValidationResultSet preValidateMultiTargetAction(UIValidationKey validationKey, UIValidationCriteria validationCriteria)
Supported API: true- Specified by:
preValidateMultiTargetActionin interfaceValidationFilter- Overrides:
preValidateMultiTargetActionin classDefaultValidationFilter- Parameters:
validationKey- A UIValidationKey object representing the action or UI component to be validated.validationCriteria- Object holding information required to perform validation tasks.- Returns:
- UIValidationResultSet
- See Also:
-
validateFormSubmission
public UIValidationResult validateFormSubmission(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) throws WTException This implementation of validateFormSubmission will return a UIValidationResult object with a PERMITTED status.
Supported API: true- Specified by:
validateFormSubmissionin interfaceUIComponentValidator- 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:
- UIValidationResult
- Throws:
WTException
-
validateSelectedAction
public UIValidationResult validateSelectedAction(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) throws WTException This implementation of validateSelectedAction will return a UIValidationResult object with a PERMITTED status.
Supported API: true- Specified by:
validateSelectedActionin interfaceUIComponentValidator- 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:
- UIValidationResult
- Throws:
WTException
-
validateSelectedMultiSelectAction
public UIValidationResultSet validateSelectedMultiSelectAction(UIValidationKey validationKey, UIValidationCriteria validationCriteria, Locale locale) throws WTException This implementation of validateSelectedMultiSelectAction will return a UIValidationResultBean whose UIValidationResult objects all have a PERMITTED status.
Supported API: true- Specified by:
validateSelectedMultiSelectActionin interfaceUIComponentValidator- 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
-