public class JiraKeyUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
JiraKeyUtils.KeyMatcher |
Modifier and Type | Field and Description |
---|---|
static String |
STRIKE_THROUGH_CLOSED_KEYS |
Constructor and Description |
---|
JiraKeyUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
fastFormatIssueKey(String projectKey,
Long issueNumber) |
static long |
getCountFromKey(String key)
Deprecated.
Use
IssueKey.from(String) instead. Since v6.1. |
static long |
getFastCountFromKey(String key)
Deprecated.
Use
IssueKey.from(String) instead. Since v6.1. |
static String |
getFastProjectKeyFromIssueKey(String key)
Deprecated.
Use
IssueKey.from(String) instead. Since v6.1. |
static String |
getIssueKeyRegex() |
static List<String> |
getIssueKeysFromString(String body) |
static String |
getProjectKeyFromIssueKey(String key)
Deprecated.
Use
IssueKey.from(String) instead. Since v6.1. |
static boolean |
isKeyInString(String s)
Determines whether any JIRA issue key is in the given string
|
static boolean |
isKeyInString(String issueKey,
String body)
Determines whether the provided key is part of the provided string
|
static boolean |
isPartOfUrl(String body,
int start) |
static boolean |
isReservedKeyword(String key)
Check if the Project Key matches a list of reserved keywords - JRA-8051.
|
static String |
linkBugKeys(String body) |
static void |
resetKeyMatcher()
Resets the configuration of the key matcher so that it will re-read the
ApplicationProperty that specifies how to find an issue key in a string.
|
static String |
slowFormatIssueKey(String projectKey,
Long issueNumber) |
static boolean |
validIssueKey(String key)
Validates the given issue key.
|
static boolean |
validProjectKey(String key)
Validates the given project key and returns true if valid, false otherwise.
|
public static final String STRIKE_THROUGH_CLOSED_KEYS
public static void resetKeyMatcher()
public static boolean validProjectKey(String key)
key
- project key to validatepublic static boolean isReservedKeyword(String key)
This check is only enabled for WINDOWS machines at present as this issue has only been reported in the WINDOWS environment.
key
- project key@Deprecated public static String getProjectKeyFromIssueKey(String key)
IssueKey.from(String)
instead. Since v6.1.key
- issue key@Deprecated public static String getFastProjectKeyFromIssueKey(String key)
IssueKey.from(String)
instead. Since v6.1.getProjectKeyFromIssueKey(String)
except that it does not check key validitykey
- issue key@Deprecated public static long getFastCountFromKey(String key)
IssueKey.from(String)
instead. Since v6.1.getCountFromKey(String)
except that is does not check for key validitykey
- issue key@Deprecated public static long getCountFromKey(String key)
IssueKey.from(String)
instead. Since v6.1.key
- issue keypublic static boolean validIssueKey(String key)
key
- issue keypublic static boolean isKeyInString(String issueKey, String body)
issueKey
- issue keybody
- string to checkpublic static boolean isKeyInString(String s)
s
- string to checkpublic static boolean isPartOfUrl(String body, int start)
public static String getIssueKeyRegex()
@Nullable public static String fastFormatIssueKey(@Nonnull String projectKey, @Nonnull Long issueNumber)
Copyright © 2002-2017 Atlassian. All Rights Reserved.