Package hudson.model
Class AbstractProject.LabelValidator
java.lang.Object
hudson.model.AbstractProject.LabelValidator
- All Implemented Interfaces:
ExtensionPoint
- Enclosing class:
- AbstractProject<P extends AbstractProject<P,
R>, R extends AbstractBuild<P, R>>
@Deprecated
public abstract static class AbstractProject.LabelValidator
extends Object
implements ExtensionPoint
Deprecated.
Plugins may want to contribute additional restrictions on the use of specific labels for specific projects.
This extension point allows such restrictions.
- Since:
- 1.540
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract FormValidation
check
(AbstractProject<?, ?> project, Label label) Deprecated.Check the use of the label within the specified context.Deprecated.Validates the use of a label within a particular context.
-
Constructor Details
-
LabelValidator
public LabelValidator()Deprecated.
-
-
Method Details
-
check
@NonNull public abstract FormValidation check(@NonNull AbstractProject<?, ?> project, @NonNull Label label) Deprecated.Check the use of the label within the specified 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:
project
- the project that wants to restrict itself to the specified label.label
- the label that the project wants to restrict itself to.- Returns:
- the
FormValidation
result.
-
checkItem
Deprecated.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.
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).- 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.
- Since:
- 2.243
-
LabelValidator
instead.