Class Overview
This class provides a number of static utility methods for validating labels.
Summary
Nested Classes |
interface |
LabelParser.CreateFromString<T> |
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
int
MAX_LABEL_LENGTH
Constant Value:
255
(0x000000ff)
Fields
public
static
final
Pattern
INVALID_PATTERN
Public Constructors
Public Methods
public
static
Set<Y>
buildFromString
(CreateFromString<Y> factory, String labelsString)
Takes a set of labels represented as a string and parses them out. Any invalid labels will be
transformed to that they become valid.
Parameters
factory
| class that will convert a string to the object required |
labelsString
| the string to parse. |
Returns
- the collection of labels contained within the string.
public
static
Set<Label>
buildFromString
(String labelsString)
Takes a set of labels represented as a string and parses them out.
Parameters
labelsString
| a String containing labels separated by LabelsField#SEPARATOR_CHAR |
public
static
String
getCleanLabel
(String label)
Cleans up the label so that it can be stored in JIRA. It may replace characters in the label to ensure
it can be stored within JIRA.
Parameters
label
| the label to clean. |
Returns
- the cleaned label that can be stored in JIRA. Will return null on label that cannot be corrected.
public
static
boolean
isValidLabelName
(String name)
Checks if the label provided contains any invalid chars
Parameters
name
| The label to check for invalid chars |
Returns
- true if any invalid chars were found false otherwise