Interface ITriggerPointAdvisor

All Known Implementing Classes:
WorkbenchTriggerPointAdvisor

public interface ITriggerPointAdvisor
The trigger point advisor is a mechanism provided by the workbench that is consulted whenever code that is considered a trigger point is hit. It is the role of the advisor to determine what, if any, activities should be enabled as a consequence of this action. The advisor also has the option of vetoing the operation.
Since:
3.1
See Also:
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Method Summary

    Modifier and Type
    Method
    Description
    allow(ITriggerPoint triggerPoint, IIdentifier identifier)
    Answer whether the activities bound to the identifier should be enabled when triggered by the provided trigger point.
    boolean
    computeEnablement(IActivityManager activityManager, IIdentifier identifier)
    Calculate the identifier's enabled state for a combination of activities with and without enabled when core expressions.
  • Method Details

    • allow

      Set<String> allow(ITriggerPoint triggerPoint, IIdentifier identifier)
      Answer whether the activities bound to the identifier should be enabled when triggered by the provided trigger point.
      Parameters:
      triggerPoint - the trigger point to test
      identifier - the identifier to test against the trigger point
      Returns:
      the set of activities that should be enabled if this the contribution represented by this identifier is to be used. If this is not null, the caller can proceed with usage of the contribution provided that the collection of activities is enabled. If this is null, the caller should assume that the operation involving the contribution should be aborted. If this method returns the empty set then the operation can proceed without any changes to activity enablement state. Please note that it is the callers responsibility to ensure that the Set returned by this method is actually enabled - after setting the enabled state of the required activities the change should be verified by consulting IActivityManager.getEnabledActivityIds().
    • computeEnablement

      boolean computeEnablement(IActivityManager activityManager, IIdentifier identifier)
      Calculate the identifier's enabled state for a combination of activities with and without enabled when core expressions.
      Parameters:
      activityManager - the activity manager
      identifier - the identifier to update
      Returns:
      true if this identifier should be enabled, false otherwise
      Since:
      3.4