com.atlassian.bamboo.jira.jiraissues
Class JiraIssueUtils

java.lang.Object
  extended by com.atlassian.bamboo.jira.jiraissues.JiraIssueUtils

public class JiraIssueUtils
extends java.lang.Object


Constructor Summary
JiraIssueUtils()
           
 
Method Summary
 void findAndSaveJiraIssueKeys(java.lang.String string, ResultsSummary buildResultsSummary)
          Finds any jira issue keys in the given input string, and saves them against the given build result summary.
 java.util.Collection<java.lang.String> findIssueKeysInText(java.lang.String string)
          Find the and JIRA issue keys within the given string.
 java.util.Collection<java.lang.String> findIssueKeysInText(java.lang.String string, boolean ignoreIfInUrl)
          Find the and JIRA issue keys within the given string.
 java.util.List<LinkedJiraIssue> getFilteredFixedJiraIssues(java.util.Collection<LinkedJiraIssue> possibleIssues, int numberNeeded)
           
 java.util.List<LinkedJiraIssue> getFilteredJiraIssues(java.util.Collection<LinkedJiraIssue> possibleIssues, int numberNeeded)
          Returns a required length list of jira issues and controls logic behind which are shown * Fixed issues are given preference This is needed so that only the required number of Jira Issues will be retrieved from the jira server
 java.util.List<LinkedJiraIssue> getFilteredRelatedJiraIssues(java.util.Collection<LinkedJiraIssue> possibleIssues, int numberNeeded)
           
 java.util.Collection<LinkedJiraIssue> getFixedJiraIssues(java.util.Collection<LinkedJiraIssue> allIssues)
          returns a set of all jira issues with link type 'fixed'
 java.lang.String getJiraUrl(java.lang.String issueKey)
           
 java.util.Collection<LinkedJiraIssue> getRelatedJiraIssues(java.util.Collection<LinkedJiraIssue> allIssues)
          returns a set of all jira issues with link type 'related'
 java.lang.String getRenderedString(java.lang.String inputString)
          Renders any jira links within the input string
 java.lang.String getRenderedString(java.lang.String inputString, ResultsSummary resultsSummary)
          Renders valid jira issues in the input string, valid issues are determined by what is stored in the BuildResultSummary
 java.lang.String getRenderedString(java.lang.String inputString, java.lang.String buildKey, java.lang.Integer buildNumber)
          Renders valid jira issues in the input string, valid issues are determined by what is stored in the BuildResultSummary
protected  com.opensymphony.xwork.TextProvider getTextProvider()
           
 boolean isJiraServerSetup()
           
 boolean isValidIssueKey(java.lang.String string)
          Checks whether a given string is a valid issue key
 void setEventManager(com.atlassian.event.EventManager eventManager)
           
 void setJiraServerManager(JiraServerManager jiraServerManager)
           
 void setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraIssueUtils

public JiraIssueUtils()
Method Detail

findAndSaveJiraIssueKeys

public void findAndSaveJiraIssueKeys(@NotNull
                                     java.lang.String string,
                                     @NotNull
                                     ResultsSummary buildResultsSummary)
Finds any jira issue keys in the given input string, and saves them against the given build result summary.

Parameters:
string -
buildResultsSummary -

isValidIssueKey

public boolean isValidIssueKey(@NotNull
                               java.lang.String string)
Checks whether a given string is a valid issue key

Parameters:
string -
Returns:

getFixedJiraIssues

@NotNull
public java.util.Collection<LinkedJiraIssue> getFixedJiraIssues(@NotNull
                                                                        java.util.Collection<LinkedJiraIssue> allIssues)
returns a set of all jira issues with link type 'fixed'

Parameters:
allIssues -
Returns:

getRelatedJiraIssues

@NotNull
public java.util.Collection<LinkedJiraIssue> getRelatedJiraIssues(@NotNull
                                                                          java.util.Collection<LinkedJiraIssue> allIssues)
returns a set of all jira issues with link type 'related'

Parameters:
allIssues -
Returns:

findIssueKeysInText

public java.util.Collection<java.lang.String> findIssueKeysInText(@NotNull
                                                                  java.lang.String string)
Find the and JIRA issue keys within the given string.

Parameters:
string -
Returns:
A Collection of JIRA Issue Keys

findIssueKeysInText

public java.util.Collection<java.lang.String> findIssueKeysInText(@NotNull
                                                                  java.lang.String string,
                                                                  boolean ignoreIfInUrl)
Find the and JIRA issue keys within the given string.

Parameters:
string -
ignoreIfInUrl -
Returns:
A Collection of JIRA Issue Keys

getRenderedString

public java.lang.String getRenderedString(@Nullable
                                          java.lang.String inputString,
                                          @NotNull
                                          java.lang.String buildKey,
                                          @NotNull
                                          java.lang.Integer buildNumber)
Renders valid jira issues in the input string, valid issues are determined by what is stored in the BuildResultSummary

Parameters:
inputString -
buildKey -
buildNumber -
Returns:

getRenderedString

public java.lang.String getRenderedString(@Nullable
                                          java.lang.String inputString,
                                          @NotNull
                                          ResultsSummary resultsSummary)
Renders valid jira issues in the input string, valid issues are determined by what is stored in the BuildResultSummary

Parameters:
inputString -
resultsSummary -
Returns:

getRenderedString

public java.lang.String getRenderedString(@Nullable
                                          java.lang.String inputString)
Renders any jira links within the input string

Parameters:
inputString -
Returns:

getJiraUrl

public java.lang.String getJiraUrl(java.lang.String issueKey)

getTextProvider

protected com.opensymphony.xwork.TextProvider getTextProvider()

getFilteredJiraIssues

@NotNull
public java.util.List<LinkedJiraIssue> getFilteredJiraIssues(@Nullable
                                                                     java.util.Collection<LinkedJiraIssue> possibleIssues,
                                                                     int numberNeeded)
Returns a required length list of jira issues and controls logic behind which are shown * Fixed issues are given preference This is needed so that only the required number of Jira Issues will be retrieved from the jira server

Parameters:
possibleIssues -
numberNeeded -
Returns:

getFilteredFixedJiraIssues

@NotNull
public java.util.List<LinkedJiraIssue> getFilteredFixedJiraIssues(@Nullable
                                                                          java.util.Collection<LinkedJiraIssue> possibleIssues,
                                                                          int numberNeeded)

getFilteredRelatedJiraIssues

@NotNull
public java.util.List<LinkedJiraIssue> getFilteredRelatedJiraIssues(@Nullable
                                                                            java.util.Collection<LinkedJiraIssue> possibleIssues,
                                                                            int numberNeeded)

isJiraServerSetup

public boolean isJiraServerSetup()

setJiraServerManager

public void setJiraServerManager(@Nullable
                                 JiraServerManager jiraServerManager)

setResultsSummaryManager

public void setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager)

setEventManager

public void setEventManager(com.atlassian.event.EventManager eventManager)


Copyright © 2010 Atlassian. All Rights Reserved.