Package wt.impact
Class ImpactDelegate
java.lang.Object
wt.impact.ImpactDelegate
- All Implemented Interfaces:
Serializable,Comparable<ImpactDelegate>
- Direct Known Subclasses:
ImpactedDelegate,ImpactorDelegate
public abstract class ImpactDelegate
extends Object
implements Serializable, Comparable<ImpactDelegate>
Delegate used to abstract the behavior of
Supported API: true
Extendable: false
Impactor and Impacted objects.
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ImpactDelegate other) Compare method used to order delegates for applying an impact.filterCopyFowardForNewIteration(IteratedImpact impactObj, WTSet impactLinks) Filter links being copied forward for new iterations ofIteratedImpactobjects.filterCopyFowardForNewRevision(IteratedImpact impactObj, WTSet impactLinks) Filter links being copied forward for new revisions ofIteratedImpactobjects.filterLinks(WTSet links, WTSet impactObjs) Filter links for association rule validation.Return immutable set of TypeIdentifier objects defining the excluded sub-types (may be null or empty).abstract Class<?>final Class<?>Return the registered class of this delegate.final StringReturn the selector value for this delegate.Return immutable set of TypeIdentifier objects defining the single excluded sub-types (may be null or empty).booleanisCreateRuleValidationEnabled(Impact impactObj) Determine if a newImpactobject should be validated for creation by the association rules.booleanisNewIterationCopyForwardEnabled(IteratedImpact impactObj) Return true (default) if impact links should be copied forward for new iterations ofIteratedImpactobjects.booleanisNewRevisionCopyForwardEnabled(IteratedImpact impactObj) Return true (default) if impact links should be copied forward for new revisions ofIteratedImpactororIteratedImpactedobjects.booleanisRemoveRuleValidationEnabled(Impact impactObj) Determine if a deletedImpactobject should be validated for removal by the association rules.
-
Method Details
-
getImpactClass
-
getSelector
Return the selector value for this delegate.
Supported API: true -
getRegisteredClass
Return the registered class of this delegate.
Supported API: true -
getExcludedTypes
Return immutable set of TypeIdentifier objects defining the excluded sub-types (may be null or empty). Excluded types, and all of their sub-types, are subtracted from the set of included types. Excluded types must assignable to the class returned bygetRegisteredClass().
Supported API: true- Returns:
- Set of excluded types (null or empty for no excluded types).
- Throws:
WTException
-
getSingleExcludedTypes
Return immutable set of TypeIdentifier objects defining the single excluded sub-types (may be null or empty). Single excluded types are subtracted from the set of included types, but none of their sub-types are excluded. Excluded types must assignable to the class returned bygetRegisteredClass().
Supported API: true- Returns:
- Set of excluded types (null or empty for no excluded types).
- Throws:
WTException
-
isCreateRuleValidationEnabled
Determine if a newImpactobject should be validated for creation by the association rules.
Supported API: true- Parameters:
impactObj- New Impact object being created (other types ignored).- Returns:
- True to enable validation (default), false to disable validation.
- Throws:
WTException
-
isRemoveRuleValidationEnabled
Determine if a deletedImpactobject should be validated for removal by the association rules.
Supported API: true- Parameters:
impactObj- Existing Impact object being deleted (other types ignored).- Returns:
- True to enable validation (default), false to disable validation.
- Throws:
WTException
-
isNewIterationCopyForwardEnabled
Return true (default) if impact links should be copied forward for new iterations ofIteratedImpactobjects.
Supported API: true- Parameters:
impactObj- New iteration of an IteratedImpact object.- Throws:
WTException
-
filterCopyFowardForNewIteration
public WTSet filterCopyFowardForNewIteration(IteratedImpact impactObj, WTSet impactLinks) throws WTException Filter links being copied forward for new iterations ofIteratedImpactobjects. This method allows extended delegates to choose what it copied forward. For example, if a specific Impact object requires that only links to the latest versions of other side objects are copied forward then this method can be overridden to filter out non-latest.
Supported API: true- Parameters:
impactObj- New iteration of IteratedImpact object. One of the role objects of every link in the copyForwardLinks set is the predecessor version of this object.impactLinks- Set of allImpactLinkcandidates to be copied forward (guaranteed to have at least one link). May include links to non-latest iterations and non-latest revisions of the other side objects.- Returns:
- Subset of candidate links to be copied forward (may be null or empty). The returned set may only contain links that were passed in. The default behavior is to copy all links forward.
- Throws:
WTException
-
isNewRevisionCopyForwardEnabled
Return true (default) if impact links should be copied forward for new revisions ofIteratedImpactororIteratedImpactedobjects.
Supported API: true- Parameters:
impactObj- New revision of an IteratedImpact object.- Throws:
WTException
-
filterCopyFowardForNewRevision
public WTSet filterCopyFowardForNewRevision(IteratedImpact impactObj, WTSet impactLinks) throws WTException Filter links being copied forward for new revisions ofIteratedImpactobjects. This method allows extended delegates to choose what it copied forward. For example, if a specific Impact object requires that only links to the latest versions of other side objects are copied forward then this method can be overridden to filter out non-latest.
Supported API: true- Parameters:
impactObj- New revision of IteratedImpact object. One of the role objects of every link in the copyForwardLinks set is the predecessor version of this object.impactLinks- Set of allImpactLinkcandidates to be copied forward (guaranteed to have at least one link). May include links to non-latest iterations and non-latest revisions of the other side objects.- Returns:
- Subset of candidate links to be copied forward (may be null or empty). The returned set may only contain links that were passed in. The default behavior is to copy all links forward.
- Throws:
WTException
-
filterLinks
Filter links for association rule validation. This method allows extended delegates to implement the appropriate filtering algorithm for their objects. For example, filtering out links to non-latest versions of impact objects. This delegate method is called byImpactService.queryAndFilterImpactLinks(wt.fc.collections.WTCollection, Boolean).
Supported API: true- Parameters:
links- Set ofImpactLinkobjects to be filtered.impactObjs- Set of originalImpactororImpactedrole objects used to query for the links.- Returns:
- Set of filtered ImpactLink objects. Return null (default) if the delegate does implement filtering and all links will be used. Return empty set if no links should be used.
- Throws:
WTException
-
compareTo
Compare method used to order delegates for applying an impact. Default ordering priority:- Increasing selector number
- Increasing alphanumeric by fully qualified class name (tie breaker)
Supported API: true- Specified by:
compareToin interfaceComparable<ImpactDelegate>
-