Package org.yamcs.activities
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 Summary
Modifier and TypeMethodDescriptioncreateExecution
(Activity activity, User user) Create an executable activity with the provided argumentsdescribeActivity
(Map<String, Object> args) Return a short (one-line) descriptive text for an activity that would have the specified args.Specify the allowed arguments of an activityThe activity recognized by this executorShort imperative description of this type of activity.UI-friendly display name for this type of activitygetIcon()
Icon hint for UI purpose.getSpec()
Specify the options for this executor.void
init
(ActivityService activityService, YConfiguration options) Initialize this executor.
-
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
isscriptExecution
. It is suggested to use the same naming strategy. -
init
Initialize this executor. Called when the activity service starts. -
getActivitySpec
Spec getActivitySpec()Specify the allowed arguments of an activity -
describeActivity
Return a short (one-line) descriptive text for an activity that would have the specified args. -
createExecution
Create an executable activity with the provided arguments- Parameters:
activity
- the activity to executeuser
- the calling user- Throws:
ValidationException
-