@ExperimentalApi public final class IssueKey extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IssueKey.IsValidIssueKeyPredicate |
Constructor and Description |
---|
IssueKey(Project project,
long issueNumber) |
IssueKey(String projectKey,
long issueNumber) |
Modifier and Type | Method and Description |
---|---|
static String |
format(Project project,
long issueNumber) |
static String |
format(String projectKey,
long issueNumber) |
static IssueKey |
from(String key)
Creates an IssueKey object form the given issue key String.
|
long |
getIssueNumber() |
String |
getProjectKey() |
static boolean |
isValidKey(String issueKey)
Returns true if the key is considered "valid"
|
String |
toString() |
public IssueKey(String projectKey, long issueNumber)
public IssueKey(Project project, long issueNumber)
public String getProjectKey()
public long getIssueNumber()
public static IssueKey from(String key)
This does some validation on the format of the given String. It must contain a dash ('-'), and the substring following the final dash must be a valid number. It validates that there is at least one character preceding the dash, but it does not validate that this is an existing key on this instance of JIRA.
key
- The issue key as a string. eg "ABC_X20-1193"IllegalArgumentException
- if the given String is not a valid JIRA Issue keypublic static boolean isValidKey(String issueKey)
issueKey
- the keyCopyright © 2002-2015 Atlassian. All Rights Reserved.