Package wt.lotbaseline
Class LotBaselineImpactedDelegate
java.lang.Object
wt.impact.ImpactDelegate
wt.impact.ImpactedDelegate
wt.lotbaseline.LotBaselineImpactedDelegate
- All Implemented Interfaces:
Serializable,Comparable<ImpactDelegate>
Delegate used to control the impacted behavior of
Supported API: true
Extendable: true
LotBaseline objects.
This delegate should be registered as:
<Service context="default" name="wt.impact.ImpactedDelegate">
<Option selector="10" cardinality="duplicate"
serviceClass="wt.lotbaseline.LotBaselineImpactedDelegate"
requestor="wt.lotbaseline.LotBaseline"/<
</Service>
Where:
selector = Integer value defining the ascending order in which
this delegate is applied. OOTB value is "10", but may
be modified as needed per installation.
Supported API: true
Extendable: true
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.LotBaselineImpactedDelegate(WTCollection impacteds) Construct LotBaselineImpactedDelegate for a collection of Impacted objects.LotBaselineImpactedDelegate(Impacted impacted) Construct LotBaselineImpactedDelegate for an Impacted object. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddOrReplaceMemberLinks(Impacted lotBaseline, WTSet members) Add or replace LotBaseline membership and maintain the common member link map.protected booleanapplyAddImpact(LotBaseline lotBaseline, WTSet addedObjs) Add new members that are not already in the baseline.protected booleanapplyAddOrReplaceLatestImpact(LotBaseline lotBaseline, WTSet addedReplacedObjs) Add new members that are not already in the baseline or replace existing members with a later version.protected booleanapplyRemoveImpact(LotBaseline lotBaseline, WTSet removedObjs) Remove baseline members with matching revisions.protected booleanapplyReplaceImpact(LotBaseline lotBaseline, WTSet replacedObjs) Replace members that are already in the baseline with a different revision.protected WTCollectioncreateFloatingBaselineMemberLinks(LotBaseline lotBaseline, WTSet members) Wrapper around call toLotBaselineService.createFloatingBaselineMemberLinks(LotBaseline, WTCollection).protected WTValuedMapgetMasterToLinkMap(Impacted lotBaseline) Get map of all lot baseline member masters to member links.protected WTKeyedMapGet map of master and version references for impacting objects.protected voidinitializeMasterVersionRefPairMap(WTSet impactingObjs) Initialize a cached, deflated map of object reference toWTPairobject.protected WTCollectionremoveBaselinableObjects(LotBaseline lotBaseline, WTSet masterRefs) Wrapper around call tocom.ptc.windchill.lotbaseline.LotBaselineService#removeBaselinableObjects(LotBaseline, WTCollection).protected voidremoveMemberLinks(Impacted lotBaseline, WTSet links) Remove LotBaseline membership and maintain the common member link map.protected voidupdateMasterToLinkMap(Impacted lotBaseline, WTCollection memberLinks, boolean addToMap) Update the common member links map.Methods inherited from class wt.impact.ImpactedDelegate
allowMultipleImpacteds, applyImpacts, applyImpacts, compatibleOneOffs, determineLaterRevisions, equivalentViews, filterImpactedsForApply, filterImpactingObjects, getImpacteds, getIntentApplyOrder, getUnsupportedImpactorTypes, invertImpactIntentMap, isSupported, isSupportedMethods inherited from class wt.impact.ImpactDelegate
compareTo, filterCopyFowardForNewIteration, filterCopyFowardForNewRevision, filterLinks, getExcludedTypes, getRegisteredClass, getSelector, getSingleExcludedTypes, isCreateRuleValidationEnabled, isNewIterationCopyForwardEnabled, isNewRevisionCopyForwardEnabled, isRemoveRuleValidationEnabled
-
Constructor Details
-
LotBaselineImpactedDelegate
public LotBaselineImpactedDelegate()Default constructor.
Supported API: true -
LotBaselineImpactedDelegate
Construct LotBaselineImpactedDelegate for an Impacted object.
Supported API: true -
LotBaselineImpactedDelegate
Construct LotBaselineImpactedDelegate for a collection of Impacted objects.
Supported API: true
-
-
Method Details
-
getMasterToLinkMap
Get map of all lot baseline member masters to member links. The map is cached so it can be used by different apply methods. Apply methods should add and remove map entries to keep the map up to date.
Supported API: true- Parameters:
lotBaseline- LotBaseline object for which map is returned.- Returns:
- WTValuedMap of member master (deflated) to member link (inflated). Map is guaranteed non-null, but may be empty.
- Throws:
WTException
-
updateMasterToLinkMap
protected void updateMasterToLinkMap(Impacted lotBaseline, WTCollection memberLinks, boolean addToMap) throws WTException Update the common member links map.
Supported API: true- Parameters:
memberLinks- A single or collection of FloatingBaselineMember links to be added to the map. All link references will be deflated.addToMap- True to add links to the map, false to remove them.- Throws:
WTException
-
applyRemoveImpact
Remove baseline members with matching revisions.
Supported API: true- Parameters:
lotBaseline- LotBaseline object whose membership is being changed.removedObjs- Objects to be removed from membership. An object is only removed from baseline membership if it has same revision as the member link.- Returns:
- True if one or more objects was removed from membership.
- Throws:
WTException
-
applyAddImpact
Add new members that are not already in the baseline.
Supported API: true- Parameters:
lotBaseline- LotBaseline object whose membership is being changed.addedObjs- Objects to be added as new members. An object is only added to baseline membership if its master is not already a member.- Returns:
- True if one or more objects was added to membership.
- Throws:
WTException
-
applyReplaceImpact
protected boolean applyReplaceImpact(LotBaseline lotBaseline, WTSet replacedObjs) throws WTException Replace members that are already in the baseline with a different revision.
Supported API: true- Parameters:
lotBaseline- LotBaseline object whose membership is being changed.replacedObjs- Objects to be replaced in the membership. An object is only replaced if it has a different revision already in the baseline.- Returns:
- True if one or more objects was replaced in the membership.
- Throws:
WTException
-
applyAddOrReplaceLatestImpact
protected boolean applyAddOrReplaceLatestImpact(LotBaseline lotBaseline, WTSet addedReplacedObjs) throws WTException Add new members that are not already in the baseline or replace existing members with a later version.
Supported API: true- Parameters:
lotBaseline- LotBaseline object whose membership is being changed.addedReplacedObjs- Objects to be added/replaced as new members. An object is only added to baseline membership if its master is not already a member, or replaces an existing member if it is a later version.- Returns:
- True if one or more objects was added to or replaced in the membership.
- Throws:
WTException
-
getMasterVersionRefPairMap
Get map of master and version references for impacting objects. May only be called after first callinginitializeMasterVersionRefPairMap(WTSet).
Supported API: true- Returns:
- Deflated map of impacting object reference to
WTPairobject. The WTPair contains deflated master (ref1) and version references (ref2) for the object. Guaranteed non-null, but may be empty. - Throws:
WTException
-
initializeMasterVersionRefPairMap
Initialize a cached, deflated map of object reference toWTPairobject. The WTPair contains deflated master (ref1) and version references (ref2) for the object. Subsequent calls togetMasterVersionRefPairMap()will return the intialized map.
Supported API: true- Parameters:
impactingObjs- Set of impacting objects.- Throws:
WTException
-
addOrReplaceMemberLinks
Add or replace LotBaseline membership and maintain the common member link map.
Supported API: true- Parameters:
lotBaseline- LotBaseline object whose membership is being changed.members- New members and new revisions of existing members. Set will be automatically deflated unless it is fully inflated when passed in.- Throws:
WTException
-
createFloatingBaselineMemberLinks
protected WTCollection createFloatingBaselineMemberLinks(LotBaseline lotBaseline, WTSet members) throws WTException Wrapper around call toLotBaselineService.createFloatingBaselineMemberLinks(LotBaseline, WTCollection). Extended delegates can override this method to get the set of new members being added and new versions being updated.
Supported API: true- Parameters:
lotBaseline- LotBaseline object whose membership is being changed.members- New members and new revisions of existing members.- Returns:
- Collection of created and updated links.
- Throws:
WTException
-
removeMemberLinks
Remove LotBaseline membership and maintain the common member link map.
Supported API: true- Parameters:
lotBaseline- LotBaseline object whose membership is being changed.links- ExistingFloatingBaselineMemberlinks being removed.- Throws:
WTException
-
removeBaselinableObjects
protected WTCollection removeBaselinableObjects(LotBaseline lotBaseline, WTSet masterRefs) throws WTException Wrapper around call tocom.ptc.windchill.lotbaseline.LotBaselineService#removeBaselinableObjects(LotBaseline, WTCollection). Extended delegates can override this method to get the set of existing members being removed.
Supported API: true- Parameters:
lotBaseline- LotBaseline object whose membership is being changed.masterRefs- Set of references to masters being removed.- Returns:
- Collection of deleted links.
- Throws:
WTException
-