Package wt.impact

Class ImpactorDelegate

java.lang.Object
wt.impact.ImpactDelegate
wt.impact.ImpactorDelegate
All Implemented Interfaces:
Serializable, Comparable<ImpactDelegate>
Direct Known Subclasses:
ChangeActivity2ImpactorDelegate

public abstract class ImpactorDelegate extends ImpactDelegate
Delegate used to abstract the behavior of 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:

 &ltService context="default" name="wt.impact.ImpactorDelegate"&gt
     &ltOption selector="order-number" cardinality="duplicate"
     serviceClass="delegate-class-name"
     requestor="impactor-class-name"/&lt
 &lt/Service&gt
 
 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 Details

    • ImpactorDelegate

      public ImpactorDelegate()
      Default constructor.

      Supported API: true
    • ImpactorDelegate

      public ImpactorDelegate(Impactor impactor)
      Construct ImpactorDelegate for an Impactor object.

      Supported API: true
  • Method Details

    • getImpactor

      public final Impactor getImpactor()
      Return the Impactor object for this delegate.

      Supported API: true
    • getImpactorType

      public final TypeIdentifier getImpactorType()
      Return the Impactor type for this delegate (may be null).

      Supported API: true
    • setImpactorType

      public final void setImpactorType(TypeIdentifier impactorType) throws WTRuntimeException
      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

      public abstract ImpactIntentType 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

      public abstract List<ImpactIntentType> 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

      public abstract List<ImpactIntentType> getAllowedIntents(Persistable impactingObject)
      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 the ImpactIntent object 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

      public final Set<ImpactIntentType> getCommonIntents(WTCollection collection)
      Retrieve the intersection of common intents for all of the objects in the given WTCollection.

      Supported API: true
      Parameters:
      collection -
      Returns:
    • getImpactIntents

      public abstract WTKeyedMap getImpactIntents() throws WTException
      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 ImpactIntent object itself, or an object associated with it.
      Throws:
      WTException