クラス ToolsBatchTaskConfig

java.lang.Object
org.iplass.mtp.dev.gradle.tools.batch.ToolsBatchTaskConfig
直系の既知のサブクラス:
ToolsBatchMetaConfigTaskConfig

public class ToolsBatchTaskConfig extends Object
ToolsBatch task configuration.

Manage configuration information to run batches.

  • コンストラクタの詳細

    • ToolsBatchTaskConfig

      public ToolsBatchTaskConfig(Properties props)
      constructor

      property to get configuration information. The available property keys are as follows, setting values to items with the same key name.

      • mainClass = require. main class for javaexec.
      • description = require. task description.
      • args.n = optional. If multiple arguments exist, set them with sequential numbers.
        e.g. args.0=ONE args.1=TWO
      • useStandardInput = optional. Set a boolean value. Default value is false.
      パラメータ:
      props - properties instance.
  • メソッドの詳細

    • getMainClass

      public String getMainClass()
      戻り値:
      main class for javaexec
    • getDescription

      public String getDescription()
      戻り値:
      task description
    • getArgs

      public List<String> getArgs()
      戻り値:
      arguments for javaexec.
    • isUseStandardInput

      public boolean isUseStandardInput()
      Use standard input.

      if true, use standard input.

      戻り値:
      use standard input
    • require

      protected String require(String key)
      Read the required value from the property.

      If the value does not exist, an exception is thrown.

      パラメータ:
      key - key of property
      戻り値:
      value of property
    • getValue

      protected <T> T getValue(String key, Function<String,T> valueConverter, T defaultValue)
      Get value from a property.

      If the specified key value does not exist, the default value is returned.

      型パラメータ:
      T - Return data type.
      パラメータ:
      key - key of property.
      valueConverter - Converts from a string to the specified data type.
      defaultValue - Default value if not present in the property.
      戻り値:
      value of property or default value.
    • list

      protected List<String> list(String baseKey, List<String> defaultValue)
      Get list value from a property.

      In the following example, you can get list ["ONE", "TWO"].

       prop.0=ONE
       prop.1=TWO
       
      パラメータ:
      baseKey - Base key for the property.
      defaultValue - Default value if not present in the property.
      戻り値:
      list value of property or default value.
    • map

      protected Map<String,String> map(String baseKey, Map<String,String> defaultValue)
      Get map value from a property.

      In the following example, you can get map {"KEY1": "A", "KEY2": "", "KEY3": "CCC"}.

       prop.key.0=KEY1
       prop.val.0=A
       prop.key.1=KEY2
       prop.val.1=
       prop.key.2=KEY3
       prop.val.2=CCC
       
      パラメータ:
      baseKey - Base key for the property.
      defaultValue - Default value if not present in the property.
      戻り値:
      map value of property or default value.