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)
Find the JIRA issue keys within the given string.
|
List<String> |
findIssueKeysInTextAsList(String string,
boolean ignoreIfInUrl,
Pattern issueKeyBoundaryRegex)
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 is 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 List<String> findIssueKeysInTextAsList(@NotNull String string, boolean ignoreIfInUrl)
string
- text to searchignoreIfInUrl
- whether to ignore found keys if they're part of URLs@NotNull List<String> findIssueKeysInTextAsList(@NotNull String string, boolean ignoreIfInUrl, @NotNull Pattern issueKeyBoundaryRegex)
This 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 © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.