Package wt.impact
Class ImpactorDelegate
java.lang.Object
wt.impact.ImpactDelegate
wt.impact.ImpactorDelegate
- All Implemented Interfaces:
Serializable,Comparable<ImpactDelegate>
- Direct Known Subclasses:
ChangeActivity2ImpactorDelegate
Delegate used to abstract the behavior of
Supported API: true
Extendable: true
Impactor objects.
All extended delegates must implement constructors:
- A constructor with no arguments that calls
super(). - A constructor with only an Impactor argument that calls
super(impactor).
Concrete delegate implementations must be registered in the service.properties file as:
<Service context="default" name="wt.impact.ImpactorDelegate">
<Option selector="order-number" cardinality="duplicate"
serviceClass="delegate-class-name"
requestor="impactor-class-name"/<
</Service>
Where:
order-number = Integer value defining the ascending order in
which this delegate is applied (e.g., "10").
delegate-class-name = Full class name of this delegate.
impactor-class-name = Full class name of the Impactor object
that this delegate supports.
Supported API: true
Extendable: true
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ImpactorDelegate(Impactor impactor) Construct ImpactorDelegate for an Impactor object. -
Method Summary
Modifier and TypeMethodDescriptionabstract List<ImpactIntentType>Get general list of impact intent values for an impacting object.abstract List<ImpactIntentType>getAllowedIntents(Persistable impactingObject) Get list of impact intent values for an impacting object.final Set<ImpactIntentType>getCommonIntents(WTCollection collection) Retrieve the intersection of common intents for all of the objects in the given WTCollection.abstract ImpactIntentTypeReturn the default impact intent value used when the actual intent value is null.abstract WTKeyedMapGet impacting object map.final ImpactorReturn the Impactor object for this delegate.final TypeIdentifierReturn the Impactor type for this delegate (may be null).final voidsetImpactorType(TypeIdentifier impactorType) Set the Impactor type for this delegate.Methods inherited from class wt.impact.ImpactDelegate
compareTo, filterCopyFowardForNewIteration, filterCopyFowardForNewRevision, filterLinks, getExcludedTypes, getImpactClass, getRegisteredClass, getSelector, getSingleExcludedTypes, isCreateRuleValidationEnabled, isNewIterationCopyForwardEnabled, isNewRevisionCopyForwardEnabled, isRemoveRuleValidationEnabled
-
Constructor Details
-
ImpactorDelegate
public ImpactorDelegate()Default constructor.
Supported API: true -
ImpactorDelegate
Construct ImpactorDelegate for an Impactor object.
Supported API: true
-
-
Method Details
-
getImpactor
Return the Impactor object for this delegate.
Supported API: true -
getImpactorType
Return the Impactor type for this delegate (may be null).
Supported API: true -
setImpactorType
Set the Impactor type for this delegate. This method can only be called for delegates that were not constructed with an Impactor object, and may only be called once for a delegate instance.
Supported API: true- Parameters:
impactorType- TypeIdentifier of intended Impactor type (must be non-null). The class derived from this TypeIdentifier must be compatible with the Impactor class supported by this delegate.- Throws:
WTRuntimeException
-
getDefaultIntent
Return the default impact intent value used when the actual intent value is null. Return value must be non-null.
Supported API: true -
getAllowedIntents
Get general list of impact intent values for an impacting object.
Supported API: true- Returns:
- Immutable list of impact intent values allowed by this delegate. A null or empty list may be returned if none are allowed.
-
getAllowedIntents
Get list of impact intent values for an impacting object.
Supported API: true- Parameters:
impactingObject- Specific object used to apply an impact. This object may be theImpactIntentobject itself, or an object associated with it. For example, if the ImpactIntent object is a link then the impacting object be the link itself or one of its role objects.- Returns:
- Immutable list of impact intent values allowed for the impacting object. A null or empty list may be returned if none are allowed.
-
getCommonIntents
Retrieve the intersection of common intents for all of the objects in the given WTCollection.
Supported API: true- Parameters:
collection-- Returns:
-
getImpactIntents
Get impacting object map. Implementations that can return a very large number of impact objects should create a deflated map.
Supported API: true- Returns:
- Map of impacting objects to their ImpactIntentType values. Impacting objects may be
the
ImpactIntentobject itself, or an object associated with it. - Throws:
WTException
-