Class ReplacePartUsageFilterDelegate
java.lang.Object
com.ptc.windchill.enterprise.massChange.filters.AbstractDefaultFilterDelegate
com.ptc.windchill.enterprise.massChange.filters.AbstractWorkableFilterDelegate
com.ptc.windchill.enterprise.massChange.filters.AbstractPartUsageFilterDelegate
com.ptc.windchill.enterprise.massChange.filters.ReplacePartUsageFilterDelegate
- All Implemented Interfaces:
MassChangeFilterDelegate
This filter delegate determines whether the selected objects are eligible for
the mass change operation for the selected parts. The delegate filters
invalid selected objects or replaces the part usage links for the valid
objects selected with the user specified replacement part.
If this delegate is extended or replaced with a customized delegate, the
action for the mass change operation should be overridden in a customized
actions.xml. The customized delegate should be registered as the command
class in the overridden mass change operation action.
This operation is currently registered with the action name
replacePartUsage.
Extendable: true
Supported API: true
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ptc.windchill.enterprise.massChange.filters.AbstractPartUsageFilterDelegate
AbstractPartUsageFilterDelegate.BranchInfo -
Field Summary
Fields inherited from class com.ptc.windchill.enterprise.massChange.filters.AbstractPartUsageFilterDelegate
LOGGERFields inherited from class com.ptc.windchill.enterprise.massChange.filters.AbstractWorkableFilterDelegate
logFields inherited from class com.ptc.windchill.enterprise.massChange.filters.AbstractDefaultFilterDelegate
RESOURCE -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the hint text for the replacement mass change operation.protected WTPartReturns the original copy of the part that is going to replace the existing one.protected voidpreEvaluate(MassChangeFilterState mcFilterState) Filter out mass change target parts that: Share the same master as the new child part. Violate an association constraint with the new child part. Do not actually use the child part or have different line or find number values. Filtered objects will be marked as excluded.protected voidpreProcessOperation(MassChangeFilterState mcFilterState) Replace associations between target objects and the specified part.validateFormSubmission(UIValidationCriteria validationCriteria) Validates the selected replacement part is not the same as the selected current part.Methods inherited from class com.ptc.windchill.enterprise.massChange.filters.AbstractPartUsageFilterDelegate
filterBuiltFromCad, filterCadAdminLock, filterCadCheckout, filterCadNotInChange, filterCadPermission, filterDuplicateLineFindNumber, filterForReferenceDesignator, filterPublishToCad, filterSameMaster, filterUsage, generateHintText, getAssociationLinkTypeMap, getCadPublishableTargets, getChangeableSourceName, getChildPart, getSearchFindNumber, getSearchLineNumber, getUsageLinks, getUsageLinks, isBuildTargets, isSupportedSourceType, queryCadDocs, queryForBranchInfo, setUsageLinksChanged, usageLinksChanged, validateQuantityUnitMethods inherited from class com.ptc.windchill.enterprise.massChange.filters.AbstractWorkableFilterDelegate
checkin, filterCheckout, filterView, getCheckedOutByMe, getFilterView, getOriginalCopyMap, getSourceChangeable, getTargetWorkingCopies, getWorkingCopyMap, isCheckedOut, isCheckedOutByMe, isCheckedOutToSandbox, isViewValid, postProcessOperation, undoCheckoutsMethods inherited from class com.ptc.windchill.enterprise.massChange.filters.AbstractDefaultFilterDelegate
evaluate, filterAdminLock, filterAssociationType, filterForRedline, filterPermission, filterType, getCadPublishMap, getCommandBean, getFormResult, getModifiableObjects, getServerExcludedItems, getSourceChangeable, postEvaluate, processOperation, setCommandBean, setFormResult
-
Method Details
-
preProcessOperation
Replace associations between target objects and the specified part.
Overridden methods must have first line:super.preProcessOperation(mcFilterState)
Supported API: true- Overrides:
preProcessOperationin classAbstractPartUsageFilterDelegate- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.- Throws:
WTException
-
preEvaluate
Filter out mass change target parts that:- Share the same master as the new child part.
- Violate an association constraint with the new child part.
- Do not actually use the child part or have different line or find number values.
Overridden methods must have first line:
super.preEvaluate(mcFilterState)
Supported API: true- Overrides:
preEvaluatein classAbstractPartUsageFilterDelegate- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.- Throws:
WTException
-
getHintText
Retrieve the hint text for the replacement mass change operation.
Supported API: true- Specified by:
getHintTextin interfaceMassChangeFilterDelegate- Overrides:
getHintTextin classAbstractDefaultFilterDelegate- Returns:
- String
-
validateFormSubmission
public UIValidationResult validateFormSubmission(UIValidationCriteria validationCriteria) throws WTException Validates the selected replacement part is not the same as the selected current part.- Specified by:
validateFormSubmissionin interfaceMassChangeFilterDelegate- Overrides:
validateFormSubmissionin classAbstractPartUsageFilterDelegate- Parameters:
validationCriteria- - UIValidationCriteria object that holds client data- Returns:
- UIValidationStatus.DENIED when the replacement part and current part are the same.
Supported API: true - Throws:
WTException
-
getReplacementChildPart
Returns the original copy of the part that is going to replace the existing one. If one is not found, or if it is not a WTPart, then this will return null.
Supported API: true- Throws:
WTException- thrown if the object found is not a Changeable2
-