com.atlassian.jira.jql.util
Interface JqlIssueSupport

All Known Implementing Classes:
JqlIssueSupportImpl

@Internal
public interface JqlIssueSupport

Some helper IssueLookup functions for JIRA.

Since:
v4.0

Method Summary
 Set<Long> getIdsOfMissingIssues(Set<Long> issueIds)
          Check existence of issues for the given set of IDs
 Issue getIssue(long id)
          Get the issue given its id.
 Issue getIssue(long id, ApplicationUser user)
          Get the issue given its id if the passed user can see it.
 Issue getIssue(long id, com.atlassian.crowd.embedded.api.User user)
          Deprecated. Use getIssue(long, com.atlassian.jira.user.ApplicationUser) instead. Since v6.1.
 Issue getIssue(String issueKey)
          Get the issue with the passed key.
 Issue getIssue(String issueKey, ApplicationUser user)
          Get the issue with the passed key if the passed user can see it.
 List<Issue> getIssues(String issueKey)
          Deprecated. Use getIssue(String) instead. Since v6.1.
 List<Issue> getIssues(String issueKey, com.atlassian.crowd.embedded.api.User user)
          Deprecated. Use getIssue(String, com.atlassian.jira.user.ApplicationUser) instead. Since v6.1.
 Set<String> getKeysOfMissingIssues(Set<String> issueKeys)
          Check existence of issues for the given set of keys
 Set<Pair<Long,String>> getProjectIssueTypePairsByIds(Set<Long> issueIds)
          Returns a set of project ID / issue type combinations that given issue IDs cover.
 Set<Pair<Long,String>> getProjectIssueTypePairsByKeys(Set<String> issueKeys)
          Returns a set of project ID / issue type combinations that given issue keys cover.
 

Method Detail

getIssue

Issue getIssue(long id,
               ApplicationUser user)
Get the issue given its id if the passed user can see it. A null will be returned if the issue key is not within JIRA or if the user does not have permission to see the issue.

Parameters:
id - the id of the issue to retreieve. A null key is assumed not to exist within JIRA.
user - the user who must have permission to see the issue.
Returns:
the issue identified by the passed id if it can be seen by the passed user. A null value will be returned if the issue does not exist or the user cannot see the issue.

getIssue

@Deprecated
Issue getIssue(long id,
                          com.atlassian.crowd.embedded.api.User user)
Deprecated. Use getIssue(long, com.atlassian.jira.user.ApplicationUser) instead. Since v6.1.

Get the issue given its id if the passed user can see it. A null will be returned if the issue key is not within JIRA or if the user does not have permission to see the issue.

Parameters:
id - the id of the issue to retreieve. A null key is assumed not to exist within JIRA.
user - the user who must have permission to see the issue.
Returns:
the issue identified by the passed id if it can be seen by the passed user. A null value will be returned if the issue does not exist or the user cannot see the issue.

getIssue

Issue getIssue(long id)
Get the issue given its id. A null will be returned if the issue is not within JIRA.

Parameters:
id - the id of the issue to retrieve.
Returns:
the issue identified by the passed id. A null value will be returned if the issue does not exist.

getIssue

Issue getIssue(String issueKey,
               ApplicationUser user)
Get the issue with the passed key if the passed user can see it.

Parameters:
issueKey - they key of the issue to retrieve. A null key is assumed not to exist within JIRA.
user - the user who must have permission to see the issue.
Returns:
the issue identified by the passed key if it can be seen by the passed user. Null is returned if the issue key is not within JIRA or if the user does not have permission to see the issue.
See Also:
for a version with no permission check

getIssue

Issue getIssue(String issueKey)
Get the issue with the passed key.

Parameters:
issueKey - they key of the issue to retrieve. A null key is assumed not to exist within JIRA.
Returns:
the issue identified by the passed key. Null is returned if the issue key is not within JIRA.
See Also:
for a version with permission checks

getIssues

@Deprecated
List<Issue> getIssues(String issueKey,
                                 com.atlassian.crowd.embedded.api.User user)
Deprecated. Use getIssue(String, com.atlassian.jira.user.ApplicationUser) instead. Since v6.1.

Get the issues with the passed key if the passed user can see it. An empty list will be returned if the issue key is not within JIRA or if the user does not have permission to see any of the issues. Note: This no longer tries to do a case insensitive lookup

Parameters:
issueKey - they key of the issue to retrieve. A null key is assumed not to exist within JIRA.
user - the user who must have permission to see the issue.
Returns:
the issues identified by the passed key if they can be seen by the passed user. An empty list will be returned if the issue key is not within JIRA or if the user does not have permission to see any of the issues.
See Also:
for a version with no permission check

getIssues

@Deprecated
List<Issue> getIssues(String issueKey)
Deprecated. Use getIssue(String) instead. Since v6.1.

Get the issues with the passed key. An empty list will be returned if the issue key is not within JIRA. Note: This no longer tries to do a case insensitive lookup.

Parameters:
issueKey - they key of the issue to retreieve. A null key is assumed not to exist within JIRA.
Returns:
the issues identified by the passed key. An empty list will be returned if the issue key is not within JIRA.
See Also:
for a version with permission checks

getProjectIssueTypePairsByKeys

@Internal
@Nonnull
Set<Pair<Long,String>> getProjectIssueTypePairsByKeys(@Nonnull
                                                                       Set<String> issueKeys)
Returns a set of project ID / issue type combinations that given issue keys cover.

Parameters:
issueKeys - Set of issue keys
Returns:
Project ID / issue type pairs

getProjectIssueTypePairsByIds

@Internal
@Nonnull
Set<Pair<Long,String>> getProjectIssueTypePairsByIds(@Nonnull
                                                                      Set<Long> issueIds)
Returns a set of project ID / issue type combinations that given issue IDs cover.

Parameters:
issueIds - Set of issue IDs
Returns:
Project ID / issue type pairs

getKeysOfMissingIssues

@Internal
@Nonnull
Set<String> getKeysOfMissingIssues(@Nonnull
                                                    Set<String> issueKeys)
Check existence of issues for the given set of keys

Parameters:
issueKeys - Set of issue keys
Returns:
Set of invalid keys or the ones that don't represent an issue

getIdsOfMissingIssues

@Internal
@Nonnull
Set<Long> getIdsOfMissingIssues(@Nonnull
                                                 Set<Long> issueIds)
Check existence of issues for the given set of IDs

Parameters:
issueIds - Set of issue IDs
Returns:
Set of IDs that don't represent an issue


Copyright © 2002-2014 Atlassian. All Rights Reserved.