Class AbstractPartUsageFilterDelegate
java.lang.Object
com.ptc.windchill.enterprise.massChange.filters.AbstractDefaultFilterDelegate
com.ptc.windchill.enterprise.massChange.filters.AbstractWorkableFilterDelegate
com.ptc.windchill.enterprise.massChange.filters.AbstractPartUsageFilterDelegate
- All Implemented Interfaces:
MassChangeFilterDelegate
- Direct Known Subclasses:
AddPartUsageFilterDelegate,ChangePartUsageFilterDelegate,RemovePartUsageFilterDelegate,ReplacePartUsageFilterDelegate
This delegate contains filter logic to exclude row objects from a mass change operation based on logic that is
specific to
Extendable: true
Supported API: true
WTPartUsageLink operations.
Extendable: true
Supported API: true
- See Also:
-
Field Summary
Fields 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 TypeMethodDescriptionprotected voidfilterBuiltFromCad(MassChangeFilterState mcFilterState) Filter out mass change target parts built from owning CAD documents.protected voidfilterCadNotInChange(MassChangeFilterState mcFilterState, ChangeOrder2 changeOrder) Filter out mass change target parts whose built from owning CAD documents are not in the change order.protected voidfilterDuplicateLineFindNumber(MassChangeFilterState mcFilterState, String lineNumber, String findNumber) Filter out mass change target parts that would result in a duplicate line or find number.protected voidfilterSameMaster(MassChangeFilterState mcFilterState, WTPart childPart) Filter out mass change target parts that share the same master as the new child part.protected voidfilterUsage(MassChangeFilterState mcFilterState, WTPart childPart, String lineNumberOnFilter, String findNumberOnFilter) Filter out mass change target parts that do not actually use the old child part, or do not have the specified line/find number.Returns the original copy of the source child part.protected WTPartReturn child part used to search for usage links created or updated in the mass change operation (null if no usages links can be found).protected StringReturn find number used to search for usage links created or updated in the mass change operation (null if not specified).protected StringReturn line number used to search for usage links created or updated in the mass change operation (null if not specified).protected final WTKeyedMapgetUsageLinks(MassChangeFilterState mcFilterState) Get usage links created or updated in the mass change operation.protected voidpreEvaluate(MassChangeFilterState mcFilterState) Filter out mass change target parts that are either: Built from CAD documents if such parts are to be excluded. Build from CAD if their owning CAD document is not in the change notice and this policy preference is enabled. To be built and published, but the owning CAD document cannot be modified. Filtered objects will be marked as excluded.protected voidpreProcessOperation(MassChangeFilterState mcFilterState) Update associations between target objects and the specified document.protected final booleanReturn true if usage links have been updated by delegate, false if not.validateFormSubmission(UIValidationCriteria validationCriteria) Implementation used for Part Usage operations of the Mass Change wizard.Methods 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, getHintText, getModifiableObjects, getServerExcludedItems, getSourceChangeable, postEvaluate, processOperation, setCommandBean, setFormResult
-
Method Details
-
validateFormSubmission
public UIValidationResult validateFormSubmission(UIValidationCriteria validationCriteria) throws WTException Implementation used for Part Usage operations of the Mass Change wizard. This will validate that if a build option is selected then the child part(s) is build from CAD.
Supported API: true- Specified by:
validateFormSubmissionin interfaceMassChangeFilterDelegate- Overrides:
validateFormSubmissionin classAbstractDefaultFilterDelegate- Parameters:
validationCriteria- - UIValidationCriteria object that holds client data- Returns:
- UIValidationResult
- Throws:
WTException
-
preEvaluate
Filter out mass change target parts that are either:- Built from CAD documents if such parts are to be excluded.
- Build from CAD if their owning CAD document is not in the change notice and this policy preference is enabled.
- To be built and published, but the owning CAD document cannot be modified.
Overridden methods must have first line:
super.preEvaluate(mcFilterState)
Supported API: true- Overrides:
preEvaluatein classAbstractWorkableFilterDelegate- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.- Throws:
WTException
-
filterBuiltFromCad
Filter out mass change target parts built from owning CAD documents. Filtered objects will be marked as excluded. Objects already excluded will not be evaluated.
Supported API: true- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.- Throws:
WTException
-
filterCadNotInChange
protected void filterCadNotInChange(MassChangeFilterState mcFilterState, ChangeOrder2 changeOrder) throws WTException Filter out mass change target parts whose built from owning CAD documents are not in the change order. Filtered objects will be marked as excluded. Objects already excluded will not be evaluated.
Supported API: true- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.changeOrder- Change order from which the mass change operation was invoked.- Throws:
WTException
-
filterSameMaster
protected void filterSameMaster(MassChangeFilterState mcFilterState, WTPart childPart) throws WTException Filter out mass change target parts that share the same master as the new child part. Filtered objects will be marked as excluded. Objects already excluded will not be evaluated.
Supported API: true- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.childPart- Child part used to filter target parts.- Throws:
WTException
-
filterUsage
protected void filterUsage(MassChangeFilterState mcFilterState, WTPart childPart, String lineNumberOnFilter, String findNumberOnFilter) throws WTException Filter out mass change target parts that do not actually use the old child part, or do not have the specified line/find number. Filtered objects will be marked as excluded. Objects already excluded will not be evaluated.
Supported API: true- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.childPart- Child part used to filter target parts.lineNumberOnFilter- Child part usage line number (null if not used).findNumberOnFilter- Child part usage find number (null if not used).- Throws:
WTException
-
filterDuplicateLineFindNumber
protected void filterDuplicateLineFindNumber(MassChangeFilterState mcFilterState, String lineNumber, String findNumber) throws WTException Filter out mass change target parts that would result in a duplicate line or find number. Filtered objects will be marked as excluded. Objects already excluded will not be evaluated.
Supported API: true- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.lineNumber- Line number to compare for duplicates (null if not used).findNumber- Find number to compare for duplicates (null if not used).targetToLinksMap- Map mass change target object to its usage links (created if null).- Throws:
WTException
-
usageLinksChanged
protected final boolean usageLinksChanged()Return true if usage links have been updated by delegate, false if not.
Supported API: true -
getSearchChildPart
Return child part used to search for usage links created or updated in the mass change operation (null if no usages links can be found).
Supported API: true- Throws:
WTException
-
getSearchLineNumber
Return line number used to search for usage links created or updated in the mass change operation (null if not specified).
Supported API: true- Throws:
WTException
-
getSearchFindNumber
Return find number used to search for usage links created or updated in the mass change operation (null if not specified).
Supported API: true- Throws:
WTException
-
getUsageLinks
Get usage links created or updated in the mass change operation.
Supported API: true- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.- Returns:
- Map of original target object to a WTSet of its usage links (guaranteed non-null, may be empty).
- Throws:
WTException
-
preProcessOperation
Update associations between target objects and the specified document.Overridden methods must have first line:
super.preProcessOperation(mcFilterState)
Supported API: true- Overrides:
preProcessOperationin classAbstractWorkableFilterDelegate- Parameters:
mcFilterState- MassChangeFilterState object populated with mass change target objects.- Throws:
WTException
-
getChildPart
Returns the original copy of the source child part. 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
-