Interface ScriptTask

All Superinterfaces:
ScheduleTask

public interface ScriptTask extends ScheduleTask
Definition of a task to execute a script.
Since:
4.0
  • Method Details

    • getType

      ScriptTask.Type getType()
      the Type of this script
      Since:
      4.0
    • setType

      void setType(ScriptTask.Type type)
      Sets the script type.
      Parameters:
      type - the Type of this script
      Since:
      4.0
    • getSource

      String getSource()
      the source code of this script
      Since:
      4.0
    • setSource

      void setSource(String value)
      Sets the source code of this script.
      Parameters:
      value - the source code of this script
      Since:
      4.0
    • getProperties

      Properties getProperties()
      Provides the defined properties.
      Returns:
      The properties.
      Since:
      4.0
    • getParameters

      @NotNull @NotNull List<Map.Entry<String,String>> getParameters()
      A set of paramaters set for this ScriptTask
      Since:
      4.0
    • setParameter

      void setParameter(@NotNull @NotNull String name, @Nullable @Nullable String value)
      Set a parameter value having the given name to the provided value.
      Parameters:
      name - The parameter's name.
      value - The value to be set.
      Since:
      4.0
    • removeParameter

      void removeParameter(@NotNull @NotNull String name)
      Removes a parameter having the given name.
      Parameters:
      name - The parameter's name.
      Since:
      4.0
    • getExecutable

      Executable getExecutable()
      Provides an executable defined with this script.
      Returns:
      An executable.
      Since:
      4.0.120
    • setUseCustomConnection

      void setUseCustomConnection(@NotNull @NotNull String login, @NotNull @NotNull String password) throws AuthenticationException
      Use a custom user Connection to execute this script.
      Parameters:
      login - The connection user login
      password - The connection user password
      Throws:
      AuthenticationException - Thrown if the authentication of the user failed
      Since:
      5.2.515
    • getUseCustomConnection

      boolean getUseCustomConnection()
      Returns true if this script uses a custom user Connection, false is returned if a system Connection is used.
      Returns:
      True if this script used a custom user connection
      Since:
      5.2.515
    • getCustomConnectionLogin

      @Nullable @Nullable String getCustomConnectionLogin()
      If this script uses a custom user Connection, the user login of the Connection is returned, null is returned if a system connection is used.
      Returns:
      Returns the user login of the custom Connection, null if a system connection is used.
      Since:
      5.2.515
    • setUseSystemConnection

      void setUseSystemConnection()
      Use a default system Connection to execute this script and clear all custom connection credentials.
      Since:
      5.2.515