LabelValidator
instead.@Deprecated public abstract static class AbstractProject.LabelValidator extends Object implements ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
LabelValidator()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract FormValidation |
check(AbstractProject<?,?> project,
Label label)
Deprecated.
Check the use of the label within the specified context.
|
FormValidation |
checkItem(Item item,
Label label)
Deprecated.
Validates the use of a label within a particular context.
|
@NonNull public abstract FormValidation check(@NonNull AbstractProject<?,?> project, @NonNull Label label)
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.
project
- the project that wants to restrict itself to the specified label.label
- the label that the project wants to restrict itself to.FormValidation
result.@NonNull public FormValidation checkItem(@NonNull Item item, @NonNull Label label)
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.
This method exists to allow plugins to implement an override for it, enabling checking in non-AbstractProject
contexts without needing to update their Jenkins dependency (and using the new
LabelValidator
instead).
item
- The context item to be restricted by the label.label
- The label that the job wants to restrict itself to.Copyright © 2004–2021. All rights reserved.