Class ParameterDisplay

java.lang.Object
io.jenkins.plugins.batchcontrol.store.ParameterDisplay

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class ParameterDisplay extends Object
D-72: the one place where typed ParameterValues become the masked text that Batch Control displays or writes (the request's parameters map, run records, incidents, CSV).

File values are core's FileParameterValue, the file values of the optional file-parameters plugin when it is installed (FileParametersSupport), and any other value whose raw value is an uploaded file item or a File.

  • Field Details

  • Method Details

    • masked

      public static Map<String,String> masked(@CheckForNull Collection<? extends ParameterValue> values)
      The masked display map of values, by parameter name in submission order. Values without a name are left out; with a repeated name the first value wins, as ParametersAction#getParameter reads it (a run request refuses repeated names before this is derived, D-72b (1); run records and incidents mask a build's own values).
    • text

      public static String text(ParameterValue value)
      The masked display text of one value (see the class description).
    • storedText

      @CheckForNull public static String storedText(ParameterValue value)
      D-72b (2): the text a non-file value stores, which the length and character limits apply to: the plaintext of a Secret (a password included, although it is displayed masked), otherwise String.valueOf(value.getValue()), "" for null. A file value has none (null): its content, Base64 included, is bounded by the body cap only. null as well when the value cannot be read as text.
    • isFile

      public static boolean isFile(ParameterValue value)
      Whether value is a file value (see the class description).