Additional Windchill Capabilities > Manufacturing Process Management > Customizing the Product Structure Explorer (PSE) > Disabling Actions by Object Type > Validator isValidTypeValidator
  
Validator isValidTypeValidator
The validator isValidTypeValidator is implemented by the class: com.ptc.windchill.explorer.structureexplorer.validators.IsValidTypeValidator. For a given set of type definitions, this validator will return ‘true’ if the type of the currently selected part is in the aformentioned set. For example, if an instance of this validator is defined with type definitions for types A, B and D. When a part of type A, B or D is selected, the validator will return true. If a part of any other type, e.g. C, is selected, it will return false.
A <ValidatorDefinition> which would return true if the selected type is A, B or D would be defined in the following way:
<ValidatorDefinition id="com.my.IsEqualToOneOfTypesABDVAL"
validatorClass="com.ptc.windchill.explorer.structureexplorer.vali
dators.IsValidTypeValidator">
<Import id="com.my.MyTypeATD"/>
<Import id="com.my.MyTypeBTD"/>
<Import id="com.my.MyTypeDTD"/>
</ValidatorDefinition>
Conversely, a <ValidatorDefinition> which would return false if the selected type is A, B or D would be defined in the following way (note the inclusion of the ‘inverted’ attribute):
<ValidatorDefinition id="com.my.IsNotEqualToTypesABDVAL"
validatorClass="com.ptc.windchill.explorer.structureexplorer.vali
dators.IsValidTypeValidator" inverted="true">
<Import id="com.my.MyTypeATD"/>
<Import id="com.my.MyTypeBTD"/>
<Import id="com.my.MyTypeDTD"/>
</ValidatorDefinition>
The <Import> elements refer to <TypeDefinition> elements which would be defined as follows (assuming that each type is a direct child of WTPart):
<TypeDefinition id="com.my.MyTypeATD"
typeId="WCTYPE|wt.part.WTPart|org.my.MyTypeA"/>

<TypeDefinition id="com.my.MyTypeBTD"
typeId="WCTYPE|wt.part.WTPart|org.my.MyTypeB"/>

<TypeDefinition id="com.my.MyTypeDTD"
typeId="WCTYPE|wt.part.WTPart|org.my.MyTypeD"/>