Package com.ptc.windchill.esi.tgt
Class ESITargetAssignmentValidator
java.lang.Object
com.ptc.windchill.esi.tgt.ESITargetAssignmentValidator
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisTargetValid(Persistable obj, ESITarget target) Checks if the target is valid for explicit assignment.static booleanisTargetValidForAutoAssignment(Persistable obj, ESITarget target) Checks if the target is valid for auto assignment.
-
Method Details
-
isTargetValidForAutoAssignment
public static boolean isTargetValidForAutoAssignment(Persistable obj, ESITarget target) throws WTException Checks if the target is valid for auto assignment. A target is considered valid for auto assignment if any of the following conditions is met:
1) The target's view as given by the preference "View To Distribution Target Mappings" is identical to the view associated with the input object.
2) The input object is other than a process plan or a part.
3) The input object is not associated to any view.
4) The number of the input target is not found as a value in the view to distribution target mappings.
Supported API: true- Parameters:
obj- - Input persistable object.target- - ESITarget object that needs to be validated for auto assignment.- Returns:
- - true if the input target is auto assignable to the input object, false otherwise.
- Throws:
WTException
-
isTargetValid
Checks if the target is valid for explicit assignment. A target is considered valid for explicit assignment if any of the following conditions is met : 1. The target's view as given by the preference "View To Distribution Target Mappings" is identical to, or is a child of the view associated with the input object 2. The input object is other than a WTPart 3. The input object is not associated to any view 4. The number of the input target is not found as a value in the view to distribution target mappings
Supported API: true- Parameters:
obj- - Input persistable object.target- - ESITarget object that needs to be validated for explicit assignment.- Returns:
- - true if the input target is assignable to the input object, false otherwise.
- Throws:
WTException
-