jetbrains.buildServer.serverSide
Class WebLinks

java.lang.Object
  extended by jetbrains.buildServer.serverSide.WebLinks

public class WebLinks
extends java.lang.Object

This helper creates links to different TeamCity pages.


Constructor Summary
WebLinks(RootUrlHolder urlHolder)
          Creates new links helper.
 
Method Summary
 java.lang.String createOverviewUrl()
          Deprecated. see #getOverviewUrl
 java.lang.String cutOffBaseUrl(java.lang.String url)
          Cuts the base URL off, when the link path should not include the domain.
 java.lang.String getChangeFilesUrl(long modificationId, boolean isPersonal)
          Returns the URL of change details page (files tab)
 java.lang.String getChangeUrl(long modificationId, boolean isPersonal)
           
 java.lang.String getConfigurationHomePageUrl(BuildType type)
           
 java.lang.String getDownloadAllArtefactsUrl(Build build)
           
 java.lang.String getDownloadArtefactUrl(java.lang.String buildTypeId, long buildId, java.lang.String path)
           
 java.lang.String getDownloadArtefactUrl(java.lang.String buildTypeId, java.lang.String buildNumber, java.lang.String path)
           
 java.lang.String getEditNotificationsUrl(java.lang.String notificatorType)
           
 java.lang.String getHelp(java.lang.String pageName)
           
 java.lang.String getHelp(java.lang.String pageName, java.lang.String anchor)
           
 java.lang.String getMutedProblemsUrl(java.lang.String projectId)
          Returns the URL of the muted problems page.
 java.lang.String getOverviewUrl()
           
 java.lang.String getPluginUrl()
           
 java.lang.String getProjectPageUrl(java.lang.String projectId)
           
 java.lang.String getResponsibilitiesUrl(java.lang.String projectId, java.lang.String username)
          Returns the URL of the responsibilities (investigations) page for the specified user.
 java.lang.String getRootUrl()
           
 java.lang.String getTestDetailsUrl(java.lang.String projectId, long testNameId)
           
 java.lang.String getUserNotificationsUrl()
           
 java.lang.String getUserSettingsUrl()
           
 java.lang.String getViewArtifactsUrl(Build build)
           
 java.lang.String getViewChangesUrl(Build build)
           
 java.lang.String getViewLogUrl(Build build)
           
 java.lang.String getViewResultsUrl(Build build)
           
 void setUrlHolder(RootUrlHolder holder)
          Changes server root url provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebLinks

public WebLinks(RootUrlHolder urlHolder)
Creates new links helper.

Parameters:
urlHolder - root URL provider.
Method Detail

setUrlHolder

public void setUrlHolder(@NotNull
                         RootUrlHolder holder)
Changes server root url provider.

Parameters:
holder - new provider.

getRootUrl

public java.lang.String getRootUrl()
Returns:
root server URL

getViewResultsUrl

public java.lang.String getViewResultsUrl(Build build)
Parameters:
build - specified build
Returns:
URL to view results page of the specified build

getViewChangesUrl

public java.lang.String getViewChangesUrl(Build build)
Parameters:
build - specified build
Returns:
URL to view changes page of the specified build

getViewLogUrl

public java.lang.String getViewLogUrl(Build build)
Parameters:
build - specified build
Returns:
URL to view log page of the specified build

getViewArtifactsUrl

public java.lang.String getViewArtifactsUrl(Build build)
Parameters:
build - specified build
Returns:
URL to view artifacts page of the specified build

getUserSettingsUrl

public java.lang.String getUserSettingsUrl()
Returns:
URL of the current (for the current session) user general settings page

getUserNotificationsUrl

public java.lang.String getUserNotificationsUrl()
Returns:
URL of the current (for the current session) user notification settings page

getDownloadArtefactUrl

public java.lang.String getDownloadArtefactUrl(java.lang.String buildTypeId,
                                               long buildId,
                                               java.lang.String path)

getDownloadArtefactUrl

public java.lang.String getDownloadArtefactUrl(java.lang.String buildTypeId,
                                               java.lang.String buildNumber,
                                               java.lang.String path)

getDownloadAllArtefactsUrl

public java.lang.String getDownloadAllArtefactsUrl(Build build)

getChangeUrl

public java.lang.String getChangeUrl(long modificationId,
                                     boolean isPersonal)
Parameters:
modificationId - id of modification
isPersonal - true if this modification refers to personal change
Returns:
URL of modification

getChangeFilesUrl

public java.lang.String getChangeFilesUrl(long modificationId,
                                          boolean isPersonal)
Returns the URL of change details page (files tab)

Parameters:
modificationId - id of the modification
isPersonal - true if the modification is personal
Returns:
URL of modification

getConfigurationHomePageUrl

public java.lang.String getConfigurationHomePageUrl(BuildType type)
Parameters:
type - specified build configuration
Returns:
URL of the specified configuration home page

getProjectPageUrl

public java.lang.String getProjectPageUrl(java.lang.String projectId)
Parameters:
projectId - specified project id
Returns:
URL of the specified project page

createOverviewUrl

public java.lang.String createOverviewUrl()
Deprecated. see #getOverviewUrl

Returns:
main overview page URL.

getOverviewUrl

public java.lang.String getOverviewUrl()
Returns:
main overview page URL.

getEditNotificationsUrl

public java.lang.String getEditNotificationsUrl(java.lang.String notificatorType)
Parameters:
notificatorType - specified notificator type.
Returns:
URL to edit specified notificator settings

getPluginUrl

public java.lang.String getPluginUrl()
Returns:
URL to download IDEA plugin

getHelp

public java.lang.String getHelp(java.lang.String pageName)
Parameters:
pageName - specified page name
Returns:
URL of the specified page help

getTestDetailsUrl

public java.lang.String getTestDetailsUrl(java.lang.String projectId,
                                          long testNameId)
Parameters:
projectId - the project id
testNameId - test name id
Returns:
URL of the test details page

getHelp

public java.lang.String getHelp(java.lang.String pageName,
                                java.lang.String anchor)
Parameters:
pageName - specified page name and anchor
anchor - specified anchor
Returns:
URL of the specified page help

getResponsibilitiesUrl

public java.lang.String getResponsibilitiesUrl(java.lang.String projectId,
                                               java.lang.String username)
Returns the URL of the responsibilities (investigations) page for the specified user.

Parameters:
projectId - the project id
username - the username or empty string (i.e. for all users)
Returns:
responsibilities page URL

getMutedProblemsUrl

public java.lang.String getMutedProblemsUrl(java.lang.String projectId)
Returns the URL of the muted problems page.

Parameters:
projectId - the project id
Returns:
muted problems page URL

cutOffBaseUrl

public java.lang.String cutOffBaseUrl(java.lang.String url)
Cuts the base URL off, when the link path should not include the domain.

Parameters:
url - full url
Returns:
absolute path without base URL