Class LabelExpression

All Implemented Interfaces:
ModelObject, SearchableModelObject, SearchItem, Comparable<Label>, ModelObjectWithChildren, ModelObjectWithContextMenu
Direct Known Subclasses:
LabelExpression.Binary, LabelExpression.Not, LabelExpression.Paren

public abstract class LabelExpression extends Label
Boolean expression of labels.
Since:
1.372
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • LabelExpression

      protected LabelExpression(String name)
  • Method Details

    • getExpression

      public String getExpression()
      Description copied from class: Label
      Returns a label expression that represents this label.
      Specified by:
      getExpression in class Label
    • autoComplete

      @NonNull public static AutoCompletionCandidates autoComplete(@Nullable String label)
      Generates auto-completion candidates for a (partial) label.
      Parameters:
      label - The (partial) label for which auto-completion is being requested.
      Returns:
      A set of auto-completion candidates.
      Since:
      2.243
    • validate

      @NonNull public static FormValidation validate(@Nullable String expression)
      Validates a label expression.
      Parameters:
      expression - The expression to validate.
      Returns:
      The validation result.
      Since:
      2.243
    • validate

      @NonNull public static FormValidation validate(@Nullable String expression, @CheckForNull Item item)
      Validates a label expression.
      Parameters:
      expression - The label expression to validate.
      item - The context item (like a job or a folder), if applicable; used for potential additional restrictions via LabelValidator instances.
      Returns:
      The validation result.
      Since:
      2.243