Class InvocationParametersFactory

java.lang.Object
org.kigalisim.cloud.InvocationParametersFactory

public class InvocationParametersFactory extends Object
Builds InvocationParameters from a raw query string parameter map.

Centralises all raw-map access so that adding new invocation parameters in the future requires changes only to this class and InvocationParameters.

  • Constructor Details

    • InvocationParametersFactory

      public InvocationParametersFactory()
  • Method Details

    • build

      public static InvocationParameters build(Map<String,String> params)
      Builds an InvocationParameters from the given query string parameter map.

      A script value that is present but blank is treated as absent. A simulation value is split on commas and trimmed to produce a list of scenario names; an absent or blank value produces an empty list. A replicates value is parsed as a positive integer; if absent or blank it defaults to 1, and if non-integer it is stored as 0 (the handler treats any value less than 1 as invalid and returns 400).

      Parameters:
      params - The query string parameter map, or null if none were provided.
      Returns:
      A new InvocationParameters with the extracted values.