Interface IArguments


public interface IArguments
Encapsulation of the condition/function/validator arguments, as defined in the workflow definition file. Provides convenience methods for retrieval of different argument types, together with checking of argument presence.
Author:
dobisekm
  • Field Details

  • Method Details

    • getAsString

      @NotNull String getAsString(@NotNull String argName)
      Returns the value of a parameter as String.
      Parameters:
      argName - a String object representing the name of the argument to get the value for
      Returns:
      the value of argName as String
      Throws:
      UserFriendlyRuntimeException - if no such argument exists.
    • getAsString

      @Nullable String getAsString(@NotNull String argName, @Nullable String defaultVal)
      Returns the value of a parameter as String.
      Parameters:
      argName - a String object representing the name of the argument to get the value for
      defaultVal - a String object representing the default value to use if the specified argument does not exist
      Returns:
      a String object representing the argument value, if no such argument is defined defaultVal
    • getAsInt

      int getAsInt(@NotNull String argName)
      Returns the value of a parameter as int.
      Parameters:
      argName - a String object representing the name of the argument to get the value for
      Returns:
      an int value representing the argument value
      Throws:
      UserFriendlyRuntimeException - if no such argument exists.
    • getAsInt

      int getAsInt(@NotNull String argName, int defaultVal)
      Returns the value of a parameter as int. *
      Parameters:
      argName - a String object representing the name of the argument to get the value for *
      defaultVal - a int value representing the default value to use if the specified argument does not exist
      Returns:
      an int value representing the argument value, if no such argument is defined defaultVal
    • getAsBoolean

      boolean getAsBoolean(@NotNull String argName)
      Returns the value of argName as boolean.
      Parameters:
      argName - a String object representing the name of the argument to get the value for
      Returns:
      true if given argument value is 'true' (ignoring case), false otherwise
      Throws:
      UserFriendlyRuntimeException - if no such argument exists.
    • getAsBoolean

      boolean getAsBoolean(@NotNull String argName, boolean defaultVal)
      Returns the value of argName as boolean.
      Parameters:
      argName - a String object representing the name of the argument to get the value for
      defaultVal - a boolean value representing the default value to use if the specified argument does not exist
      Returns:
      true if given argument value is true (ignoring case), if argument is undefined defaultVal, otherwise false
    • getAsSet

      @NotNull Set<String> getAsSet(@NotNull String argName)
      Treats the given argument as comma-separated list of Strings and turns such a representation into set.
      Parameters:
      argName - a String object representing the name of the argument to get the value for
      Returns:
      a Set object containing the comma-separated Strings in the argument value
      Throws:
      UserFriendlyRuntimeException - if no such argument exists.
    • getAsSetOptional

      @NotNull Set<String> getAsSetOptional(@NotNull String argName)
      Same as getAsSet(String), but in case of non existing argument an empty set is returned.
      Parameters:
      argName - a String object representing the name of the argument to get the value for
      Returns:
      a Set object containing the comma-separated Strings in the argument value, if undefined an empty Set
    • getFieldName

      @Nullable String getFieldName()
      Returns the id of a filed to work with by checking several standard arguments. For backward compatibility multiple attribute names are checked, in the following order:
      1. ATTR_FIELD_NAME ("field.name")
      2. ATTR_FIELD ("field")
      3. ATTR_FEATURE ("feature")
      Returns:
      a String object representing the name (id) of the field to work with
      Throws:
      UserFriendlyRuntimeException - If the field id can not be found in either argument
    • getFieldArgumentName

      @Nullable String getFieldArgumentName()
      Returns the name of the argument the value of which is returned by getFieldName().
      Since:
      3.7.0
      See Also:
    • getArguments

      @NotNull Map<String,String> getArguments()
      Returns all the arguments as Map.
      Returns:
      a Map object containing all the arguments.
      Since:
      3.10.2
    • getArgumentsWithPrefix

      @NotNull Map<String,String> getArgumentsWithPrefix(@NotNull String prefix)
      Returns arguments started with prefix as Map.
      Parameters:
      prefix - a String object representing the prefix of the arguments to get the values for
      Returns:
      a Map object containing all the arguments started with prefix where keys are stripped of prefixes.
      Since:
      3.10.2