public class LabelParser extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
LabelParser.CreateFromString<T> |
Modifier and Type | Field and Description |
---|---|
static Pattern |
INVALID_PATTERN |
static int |
MAX_LABEL_LENGTH |
Constructor and Description |
---|
LabelParser() |
Modifier and Type | Method and Description |
---|---|
static <Y> Set<Y> |
buildFromString(LabelParser.CreateFromString<Y> factory,
String labelsString)
Takes a set of labels represented as a string and parses them out.
|
static Set<Label> |
buildFromString(String labelsString)
Takes a set of labels represented as a string and parses them out.
|
static String |
getCleanLabel(String label)
Cleans up the label so that it can be stored in JIRA.
|
static boolean |
isValidLabelName(String name)
Checks if the label provided contains any invalid chars
|
public static final int MAX_LABEL_LENGTH
public static final Pattern INVALID_PATTERN
public static boolean isValidLabelName(String name)
name
- The label to check for invalid charspublic static String getCleanLabel(String label)
label
- the label to clean.public static Set<Label> buildFromString(String labelsString)
labelsString
- a String containing labels separated by LabelsField#SEPARATOR_CHARpublic static <Y> Set<Y> buildFromString(LabelParser.CreateFromString<Y> factory, String labelsString)
labelsString
- the string to parse.factory
- class that will convert a string to the object requiredCopyright © 2002-2023 Atlassian. All Rights Reserved.