Class JiraRemoteIssueManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.jira.jiraissues.JiraRemoteIssueManagerImpl
-
- All Implemented Interfaces:
JiraRemoteIssueManager
public class JiraRemoteIssueManagerImpl extends Object implements JiraRemoteIssueManager
-
-
Constructor Summary
Constructors Constructor Description JiraRemoteIssueManagerImpl(JiraApplinksService jiraApplinksService, JiraIssueDetailsBuilderFactory jiraIssueDetailsBuilderFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @NotNull StringconstructSearchUrl(@NotNull String projectKey, @NotNull List<String> issueKeys)Construct JIRA search URL@NotNull Result<com.atlassian.applinks.api.CredentialsRequiredException,List<JiraIssueDetails>>fetchIssueDetailsFromJira(@NotNull com.atlassian.applinks.api.ApplicationLink applicationLink, @NotNull String jiraProjectKey, @NotNull Set<String> jiraIssueKeys)Fetch issue details from JIRA via XML Search.protected Result<com.atlassian.applinks.api.CredentialsRequiredException,Iterable<JiraIssueDetails>>fetchPartitionedIssueDetailsFromJira(@NotNull com.atlassian.applinks.api.ApplicationLink applicationLink, @NotNull String jiraProjectKey, @NotNull List<String> jiraIssueKeysBatch)Fetch details of JIRA issues using JQL and XML search@NotNull Iterable<com.atlassian.applinks.host.spi.EntityReference>fetchProjectInformationFromJira(@NotNull com.atlassian.applinks.api.ApplicationLink applicationLink)Fetch project list from JIRA using REST service provided by applinks.com.atlassian.applinks.api.ApplicationLinkgetJiraApplicationLink(@NotNull String jiraProjectKey, @Nullable Project project)Retrieves the 'best' application link for a given JIRA project key.
-
-
-
Constructor Detail
-
JiraRemoteIssueManagerImpl
public JiraRemoteIssueManagerImpl(JiraApplinksService jiraApplinksService, JiraIssueDetailsBuilderFactory jiraIssueDetailsBuilderFactory)
-
-
Method Detail
-
fetchIssueDetailsFromJira
@NotNull public @NotNull Result<com.atlassian.applinks.api.CredentialsRequiredException,List<JiraIssueDetails>> fetchIssueDetailsFromJira(@NotNull @NotNull com.atlassian.applinks.api.ApplicationLink applicationLink, @NotNull @NotNull String jiraProjectKey, @NotNull @NotNull Set<String> jiraIssueKeys)
Description copied from interface:JiraRemoteIssueManagerFetch issue details from JIRA via XML Search. Internally issue keys are partitioned to avoid too big queries to JIRA.- Specified by:
fetchIssueDetailsFromJirain interfaceJiraRemoteIssueManager- Parameters:
applicationLink- identifies JIRA application to fetch issue details fromjiraProjectKey- JIRA project key (all issue keys should be from this project)jiraIssueKeys- keys of issues to be searched in JIRA- Returns:
- List of
JiraIssueDetailsobjects representing JIRA issues or CredentialsRequiredException when authentication is required in order to establish connection with JIRA
-
fetchProjectInformationFromJira
@NotNull public @NotNull Iterable<com.atlassian.applinks.host.spi.EntityReference> fetchProjectInformationFromJira(@NotNull @NotNull com.atlassian.applinks.api.ApplicationLink applicationLink) throws CredentialsRequiredContextException, com.atlassian.sal.api.net.ResponseException
Description copied from interface:JiraRemoteIssueManagerFetch project list from JIRA using REST service provided by applinks.- Specified by:
fetchProjectInformationFromJirain interfaceJiraRemoteIssueManager- Parameters:
applicationLink- identifies JIRA application to fetch project list from- Returns:
- Iterable of
EntityReferenceobjects representing JIRA projects - Throws:
CredentialsRequiredContextExceptioncom.atlassian.sal.api.net.ResponseException
-
getJiraApplicationLink
public com.atlassian.applinks.api.ApplicationLink getJiraApplicationLink(@NotNull @NotNull String jiraProjectKey, @Nullable @Nullable Project project) throws CredentialsRequiredContextException, com.atlassian.sal.api.net.ResponseExceptionDescription copied from interface:JiraRemoteIssueManagerRetrieves the 'best' application link for a given JIRA project key. If project is supplied, It checks the primary entity link first, then proceeds with all other links. If project is not supplied, or no entity link has been found, then application links are searched: primary first, the all others.- Specified by:
getJiraApplicationLinkin interfaceJiraRemoteIssueManager- Parameters:
jiraProjectKey- the JIRA project key that has to be available in the returned application.project- the project to check for entity links (optional)- Returns:
- application link to an application with a defined jiraProjectKey
- Throws:
CredentialsRequiredContextExceptioncom.atlassian.sal.api.net.ResponseException
-
fetchPartitionedIssueDetailsFromJira
protected Result<com.atlassian.applinks.api.CredentialsRequiredException,Iterable<JiraIssueDetails>> fetchPartitionedIssueDetailsFromJira(@NotNull @NotNull com.atlassian.applinks.api.ApplicationLink applicationLink, @NotNull @NotNull String jiraProjectKey, @NotNull @NotNull List<String> jiraIssueKeysBatch)
Fetch details of JIRA issues using JQL and XML search- Parameters:
applicationLink- link to JIRA application which will handle search operationjiraProjectKey- JIRA project keyjiraIssueKeysBatch- JIRA issue keys (up to XML_SEARCH_MAX_QUERY_SIZE)- Returns:
IterableofJiraIssueDetailsfetched from JIRA or CredentialsRequiredException when authentication is required
-
constructSearchUrl
@NotNull protected @NotNull String constructSearchUrl(@NotNull @NotNull String projectKey, @NotNull @NotNull List<String> issueKeys)
Construct JIRA search URL- Parameters:
projectKey- JIRA project keyissueKeys- JIRA issue keys to be searched- Returns:
- String to be added to JIRA RPC url to be used in http request
-
-