Klasse ValidationUtilities

java.lang.Object
io.jenkins.plugins.util.ValidationUtilities

public class ValidationUtilities extends Object
Validates UI parameters. For the validated UI elements, also additional utility methods are provided.
Autor:
Ullrich Hafner
  • Konstruktordetails

    • ValidationUtilities

      public ValidationUtilities()
  • Methodendetails

    • getAllCharsets

      public ComboBoxModel getAllCharsets()
      Returns all available character set names.
      Gibt zurück:
      all available character set names
    • getCharset

      public Charset getCharset(@CheckForNull String charset)
      Returns the default charset for the specified encoding string. If the default encoding is empty or null, or if the charset is not valid then the default encoding of the platform is returned.
      Parameter:
      charset - identifier of the character set
      Gibt zurück:
      the default charset for the specified encoding string
    • validateCharset

      public FormValidation validateCharset(String reportEncoding)
      Performs on-the-fly validation of the character encoding.
      Parameter:
      reportEncoding - the character encoding
      Gibt zurück:
      the validation result
    • ensureValidId

      public void ensureValidId(String id)
      Ensures that the specified ID is valid.
      Parameter:
      id - the custom ID of the tool
      Löst aus:
      IllegalArgumentException - if the ID is not valid
    • validateId

      public FormValidation validateId(String id)
      Performs on-the-fly validation of the ID.
      Parameter:
      id - the custom ID of the tool
      Gibt zurück:
      the validation result
    • doCheckPattern

      public FormValidation doCheckPattern(AbstractProject<?,?> project, String pattern)
      Performs on-the-fly validation on the ant pattern for input files.
      Parameter:
      project - the project that is configured
      pattern - the file pattern
      Gibt zurück:
      the validation result