Class SourceFormValidation

java.lang.Object
io.jenkins.plugins.xmleditor.ops.SourceFormValidation

public final class SourceFormValidation extends Object
Live check of the alternative fields that select the document (file, files, text), so that the Snippet Generator and the job configuration report a conflict before the build runs.
  • Method Details

    • onlyOne

      public static FormValidation onlyOne(@CheckForNull Item item, String alternatives, String value, String... others)
      Parameters:
      item - the job being configured, or null outside a job (e.g. the global Snippet Generator)
      alternatives - the alternative fields for the message, e.g. 'file' or 'text'
      value - the value of the field being checked
      others - the values of the other alternative fields
      Returns:
      an error when the field and any other alternative are both set