public interface JiraIssueHelper
Modifier and Type | Method and Description |
---|---|
Set<String> |
findIssueKeysInText(String string)
Find the JIRA issue keys within the given string.
|
Set<String> |
findIssueKeysInText(String string,
boolean ignoreIfInUrl)
Find the JIRA issue keys within the given string.
|
List<String> |
findIssueKeysInTextAsList(String string,
boolean ignoreIfInUrl)
Deprecated.
since 6.5 use
findIssueKeysInText(String, boolean) instead |
List<String> |
findIssueKeysInTextAsList(String string,
boolean ignoreIfInUrl,
Pattern issueKeyBoundaryRegex)
Deprecated.
since 6.5 use
findIssueKeysInText(String, boolean) instead |
LinkedHashSet<String> |
findPotentialIssueKeys(String string,
boolean ignoreIfInUrl,
Pattern issueKeyLeftBoundaryRegex,
Pattern issueKeyRightBoundaryRegex)
Find the JIRA issue keys within the given string.
|
boolean |
isJiraServerSetup()
Whether any JIRA server is linked with this instance of Bamboo.
|
boolean |
isValidIssueKey(String string)
Checks whether a given string could be a valid issue key.
|
boolean isValidIssueKey(@NotNull String string)
@NotNull Set<String> findIssueKeysInText(@NotNull String string)
string
- text to search@NotNull Set<String> findIssueKeysInText(@NotNull String string, boolean ignoreIfInUrl)
string
- text to searchignoreIfInUrl
- whether to ignore found keys if they're part of URLs@NotNull LinkedHashSet<String> findPotentialIssueKeys(@NotNull String string, boolean ignoreIfInUrl, Pattern issueKeyLeftBoundaryRegex, Pattern issueKeyRightBoundaryRegex)
@NotNull @Deprecated List<String> findIssueKeysInTextAsList(@NotNull String string, boolean ignoreIfInUrl)
findIssueKeysInText(String, boolean)
insteadstring
- text to searchignoreIfInUrl
- whether to ignore found keys if they're part of URLs@NotNull @Deprecated List<String> findIssueKeysInTextAsList(@NotNull String string, boolean ignoreIfInUrl, @NotNull Pattern issueKeyBoundaryRegex)
findIssueKeysInText(String, boolean)
insteadThis method accepts a Pattern
as a parameter to test characters before and after discovered issue key,
in order to adjust sensitivity of the search. As an example, for text "CR-BAM-1534", if the character "-" is
disallowed by the boundary regex, the key "BAM-1534" will not be returned (as the "-" character is present in the
text just before the key).
string
- text to searchignoreIfInUrl
- whether to ignore found keys if they're part of URLsissueKeyBoundaryRegex
- regular expression which has to match characters before and after discovered issue
key, for example "[^a-zA-Z0-9-]"boolean isJiraServerSetup()
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.