Package jenkins.model.labels
Interface LabelValidator
-
- All Superinterfaces:
ExtensionPoint
public interface LabelValidator extends ExtensionPoint
Plugins may want to contribute additional restrictions on the use of specific labels for specific context items. This extension point allows such restrictions.- Since:
- 2.243
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FormValidation
check(Item item, Label label)
Validates the use of a label within a particular context.
-
-
-
Method Detail
-
check
@NonNull FormValidation check(@NonNull Item item, @NonNull Label label)
Validates the use of a label within a particular context.Note that "OK" responses (and any text/markup that may be set on them) will be ignored. Only warnings and errors are taken into account, and aggregated across all validators.
- Parameters:
item
- The context item to be restricted by the label.label
- The label that the job wants to restrict itself to.- Returns:
- The validation result.
-
-