Class SelectionCodec

java.lang.Object
io.jenkins.plugins.smartselect.SelectionCodec

public final class SelectionCodec extends Object
Stateless parsing/validation shared by form submits, API builds and Pipeline. No Jenkins dependencies: easy to check independently and reuse in tests. The v0.1 wire format is a comma-separated string, so a choice cannot contain a comma.
  • Method Details

    • choicesFrom

      public static List<String> choicesFrom(Object input)
      Accepts newline-separated textarea values or a Jenkinsfile List<String>.
    • defaultsFrom

      public static List<String> defaultsFrom(Object input)
      Default values from a comma-delimited config field or Jenkinsfile list.
    • selectedFrom

      public static List<String> selectedFrom(String submitted, List<String> allowed, boolean multi)
    • join

      public static String join(List<String> values)