Class LaunchParameter

java.lang.Object
org.gcube.vremanagement.executor.api.types.LaunchParameter
All Implemented Interfaces:
Comparable<LaunchParameter>

public class LaunchParameter extends Object implements Comparable<LaunchParameter>
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

    • PLUGIN_NAME

      public static final String PLUGIN_NAME
      JSON property name for plugin name
      See Also:
    • PLUGIN_VERSION

      public static final String PLUGIN_VERSION
      JSON property name for plugin version
      See Also:
    • pluginName

      protected String pluginName
      The name of the plugin to launch
    • pluginVersion

      protected String pluginVersion
      The version of the plugin to launch. Version can be null, this means that no specific version is required. In other words, null means any version.
    • pluginCapabilities

      protected Map<String,String> pluginCapabilities
      The Plugin Capabilities which has to be satisfied to launch the plugin instance execution. The SmartExectuor Service check that this capabilities match the capabilities declared from the discovered plugin. If the capabilities does not match the service will not launch the execution. Plugin Capabilities can be null, this means that no capabilities have to be satisfied. In other words, null means that no constraint are required to launch the execution
    • inputs

      protected Map<String,Object> inputs
      Inputs to provide to the plugin instance which have to be executed.
    • pluginStateNotifications

      protected Map<String,Map<String,String>> pluginStateNotifications
      Plugin State Notification to be used and inputs to be provided when instantiated
    • scheduling

      protected Scheduling scheduling
      Scheduling parameters. See {#Scheduling} for further details
  • Constructor Details

    • LaunchParameter

      protected LaunchParameter()
      Protected default constructor for serialization purposes.
    • LaunchParameter

      public LaunchParameter(LaunchParameter launchParameter)
      Copy constructor.
      Parameters:
      launchParameter - the LaunchParameter to copy
    • LaunchParameter

      public LaunchParameter(String pluginName, Map<String,Object> inputs)
      Constructor with plugin name and inputs.
      Parameters:
      pluginName - the name of the plugin to launch
      inputs - the input parameters for the plugin
    • LaunchParameter

      public LaunchParameter(String pluginName, Map<String,String> pluginCapabilities, Map<String,Object> inputs)
      Constructor with plugin name, capabilities and inputs.
      Parameters:
      pluginName - the name of the plugin to launch
      pluginCapabilities - the required plugin capabilities
      inputs - the input parameters for the plugin
    • LaunchParameter

      public LaunchParameter(String pluginName, Map<String,Object> inputs, Scheduling scheduling)
      Constructor with plugin name, inputs and scheduling.
      Parameters:
      pluginName - the name of the plugin to launch
      inputs - the input parameters for the plugin
      scheduling - the scheduling parameters
    • LaunchParameter

      public LaunchParameter(String pluginName, Map<String,String> pluginCapabilities, Map<String,Object> inputs, Scheduling scheduling)
      Constructor with plugin name, capabilities, inputs and scheduling.
      Parameters:
      pluginName - the name of the plugin to launch
      pluginCapabilities - the required plugin capabilities
      inputs - the input parameters for the plugin
      scheduling - the scheduling parameters
    • LaunchParameter

      public LaunchParameter(String pluginName, String pluginVersion, Map<String,String> pluginCapabilities, Map<String,Object> inputs, Scheduling scheduling)
      Full constructor with all parameters.
      Parameters:
      pluginName - the name of the plugin to launch
      pluginVersion - the specific version of the plugin (can be null)
      pluginCapabilities - the required plugin capabilities
      inputs - the input parameters for the plugin
      scheduling - the scheduling parameters
  • Method Details

    • getPluginName

      public String getPluginName()
      Returns:
      the name
    • getPluginCapabilities

      public Map<String,String> getPluginCapabilities()
      Returns:
      the pluginCapabilities
    • setPluginCapabilities

      public void setPluginCapabilities(Map<String,String> pluginCapabilities)
      Parameters:
      pluginCapabilities - the pluginCapabilities to set
    • getInputs

      public Map<String,Object> getInputs()
      Returns:
      the inputs
    • getScheduling

      public Scheduling getScheduling()
      Returns:
      the scheduling
    • setScheduling

      public void setScheduling(Scheduling scheduling)
      Parameters:
      scheduling - the scheduling
    • addPluginStateNotifications

      public void addPluginStateNotifications(Class<? extends PluginStateNotification> pluginStateNotification, Map<String,String> inputs)
      Adds a plugin state notification configuration.
      Parameters:
      pluginStateNotification - the notification class to add
      inputs - the configuration inputs for the notification
    • getPluginStateNotifications

      public Map<String,Map<String,String>> getPluginStateNotifications()
      Gets all configured plugin state notifications.
      Returns:
      map of notification class names to their configuration inputs
    • setPluginStateNotifications

      public void setPluginStateNotifications(Map<String,Map<String,String>> pluginStateNotifications)
      Sets the plugin state notifications configuration.
      Parameters:
      pluginStateNotifications - map of notification configurations
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(LaunchParameter launchParameter)
      Specified by:
      compareTo in interface Comparable<LaunchParameter>