Package hudson.model.labels
Class LabelExpression
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Actionable
-
- hudson.model.Label
-
- hudson.model.labels.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LabelExpression.And
static class
LabelExpression.Binary
static class
LabelExpression.Iff
static class
LabelExpression.Implies
static class
LabelExpression.Not
static class
LabelExpression.Or
static class
LabelExpression.Paren
No-op but useful for preserving the parenthesis in the user input.-
Nested classes/interfaces inherited from class hudson.model.Label
Label.ConverterImpl
-
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
-
Field Summary
-
Fields inherited from class hudson.model.Label
loadStatistics, name, nodeProvisioner
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LabelExpression(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AutoCompletionCandidates
autoComplete(String label)
Generates auto-completion candidates for a (partial) label.String
getExpression()
Returns a label expression that represents this label.static FormValidation
validate(String expression)
Validates a label expression.static FormValidation
validate(String expression, Item item)
Validates a label expression.-
Methods inherited from class hudson.model.Label
accept, and, compareTo, contains, doChildrenContextMenu, equals, get, getApi, getBusyExecutors, getClouds, getDescription, getDisplayName, getIdleExecutors, getName, getNodes, getSearchUrl, getSortedNodes, getTiedJobCount, getTiedJobs, getTotalConfiguredExecutors, getTotalExecutors, getUrl, hashCode, iff, implies, isAssignable, isAtom, isEmpty, isOffline, isSelfLabel, listAtoms, matches, matches, matches, not, or, paren, parse, parseExpression, precedence, toString
-
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
-
-
-
Constructor Detail
-
LabelExpression
protected LabelExpression(String name)
-
-
Method Detail
-
getExpression
public String getExpression()
Description copied from class:Label
Returns a label expression that represents this label.- Specified by:
getExpression
in classLabel
-
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 viaLabelValidator
instances.- Returns:
- The validation result.
- Since:
- 2.243
-
-