Class IniFileParameterBuilder

java.lang.Object
nz.org.riskscape.engine.ini.IdentifiedObjectBuilder.Base<nz.org.riskscape.engine.bind.UserDefinedParameter>
nz.org.riskscape.engine.ini.IniFileParameterBuilder
All Implemented Interfaces:
IdentifiedObjectBuilder<nz.org.riskscape.engine.bind.UserDefinedParameter>

public class IniFileParameterBuilder extends IdentifiedObjectBuilder.Base<nz.org.riskscape.engine.bind.UserDefinedParameter>

Builds a user-defined parameter from an INI definition.

  • Field Details

    • PARAMETER_KEY

      public static final String PARAMETER_KEY

      The INI file keyword, i.e. denotes a [parameter foo] section.

      See Also:
    • KEYS

      public static final List<String> KEYS

      Specifies the INI file keys that the [parameter xyz] section can contain

    • PROBLEMS

      public static final nz.org.riskscape.engine.ini.IniFileParameterBuilder.LocalProblems PROBLEMS
  • Constructor Details

    • IniFileParameterBuilder

      public IniFileParameterBuilder(nz.org.riskscape.engine.Project project)
  • Method Details

    • getSettings

      public static List<nz.org.riskscape.engine.util.Pair<String,String>> getSettings(nz.org.riskscape.engine.bind.ParameterTemplate template)
      Returns:
      the effective settings for a ParameterTemplate, i.e. the config required to build it
    • build

      public nz.org.riskscape.engine.bind.ParameterTemplate build(Map<String,List<String>> config) throws nz.org.riskscape.problem.ProblemException
      Throws:
      nz.org.riskscape.problem.ProblemException
    • build

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.bind.UserDefinedParameter> build(String id, nz.org.riskscape.config.ConfigSection section)
      Description copied from interface: IdentifiedObjectBuilder

      Builds the item based on the given INI section.

      Returns:
      the item successfully built, or any problems that occurred.