Class OptionInputBuilder


public class OptionInputBuilder extends AbstractInputBuilder<OptionInputBuilder,Object>
Builder class for input type Option and Options (InputType.OPTION and InputType.OPTIONS).
  • Constructor Details

  • Method Details

    • setOptions

      public OptionInputBuilder setOptions(List<String> options)
      Adds options to the OptionInputBuilder instance.

      Example:

      
       Map driverClasses = ...
      
       optionInputBuilder.addOptions(driverClasses?.driverClassLabel as List)
       
      Parameters:
      options - List of options names
      Returns:
      self
    • addOption

      public OptionInputBuilder addOption(String option)
      Adds the option to the OptionInputBuilder instance.

      Example:

      
       Map driverClasses = ...
      
       driverClasses.each { String driverClassName, String driverClassLabel ->
            optionInputBuilder.addOption(driverClassLabel)
       }
       
      Parameters:
      option - option name
      Returns:
      self
    • setLabels

      public OptionInputBuilder setLabels(Map<String,Object> labels)
      Sets labels of the OptionInputBuilder instance.

      Example:

      
       OptionInputBuilder builder = api.inputBuilderFactory()
                                       .createRadioEntry(inputName)
                                       .setLabels([model : "Services Model",
                                                   type  : "Service Type"])
                                       .setValue(inputValue)
       
      Parameters:
      labels - Map of labs to be set
      Returns:
      self
    • _getInput

      protected Object _getInput()
      Specified by:
      _getInput in class AbstractInputBuilder<OptionInputBuilder,Object>