Interface ActivityExecutor

All Known Implementing Classes:
CommandExecutor, CommandStackExecutor, ScriptExecutor

public interface ActivityExecutor
An executor capable of executing any amount of activities of a specified type.
  • Method Details

    • getActivityType

      String getActivityType()
      The activity recognized by this executor
    • getDisplayName

      String getDisplayName()
      UI-friendly display name for this type of activity
    • getDescription

      String getDescription()
      Short imperative description of this type of activity.
    • getIcon

      String getIcon()
      Icon hint for UI purpose. This should be a name present in Material Icons.
    • getSpec

      Spec.NamedSpec getSpec()
      Specify the options for this executor.

      The name of this spec, is where the options are to be defined as part of the ActivityService configuration.

      For example, the name for ScriptExecutor is scriptExecution. It is suggested to use the same naming strategy.

    • init

      void init(ActivityService activityService, YConfiguration options)
      Initialize this executor. Called when the activity service starts.
    • getActivitySpec

      Spec getActivitySpec()
      Specify the allowed arguments of an activity
    • describeActivity

      String describeActivity(Map<String,Object> args)
      Return a short (one-line) descriptive text for an activity that would have the specified args.
    • createExecution

      ActivityExecution createExecution(Activity activity, User user) throws ValidationException
      Create an executable activity with the provided arguments
      Parameters:
      activity - the activity to execute
      user - the calling user
      Throws:
      ValidationException