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 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 buildType)
           
 java.lang.String getDownloadAllArtefactsUrl(Build build)
           
 java.lang.String getDownloadArtefactUrl(java.lang.String buildTypeExternalId, long buildId, java.lang.String path)
           
 java.lang.String getDownloadArtefactUrl(java.lang.String buildTypeExternalId, 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 projectExternalId)
          Returns the URL of the muted problems page.
 java.lang.String getOverviewUrl()
           
 java.lang.String getPersonalQueuedBuildUrl(long personalChangeId, BuildType buildType)
          URL of the specified personal queued build.
 java.lang.String getPluginUrl()
           
 java.lang.String getProjectPageUrl(java.lang.String projectExternalId)
           
 java.lang.String getQueuedBuildUrl(QueuedBuild queuedBuild)
          URL of the specified queued build.
 java.lang.String getResponsibilitiesUrl(java.lang.String projectExternalId, 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 projectExternalId, long testNameId)
           
 java.lang.String getTestDetailsUrl(java.lang.String projectExternalId, long testNameId, java.lang.String buildTypeId)
           
 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(@NotNull
                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

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

getViewResultsUrl

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

getViewChangesUrl

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

getViewLogUrl

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

getViewArtifactsUrl

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

getUserSettingsUrl

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

getUserNotificationsUrl

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

getDownloadArtefactUrl

@NotNull
public java.lang.String getDownloadArtefactUrl(@NotNull
                                                       java.lang.String buildTypeExternalId,
                                                       long buildId,
                                                       @NotNull
                                                       java.lang.String path)

getDownloadArtefactUrl

@NotNull
public java.lang.String getDownloadArtefactUrl(@NotNull
                                                       java.lang.String buildTypeExternalId,
                                                       @NotNull
                                                       java.lang.String buildNumber,
                                                       @NotNull
                                                       java.lang.String path)

getDownloadAllArtefactsUrl

@NotNull
public java.lang.String getDownloadAllArtefactsUrl(@NotNull
                                                           Build build)

getChangeUrl

@NotNull
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

@NotNull
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

getQueuedBuildUrl

@NotNull
public java.lang.String getQueuedBuildUrl(@NotNull
                                                  QueuedBuild queuedBuild)
URL of the specified queued build.

Parameters:
queuedBuild - queued build
Returns:
see above
Since:
8.0

getPersonalQueuedBuildUrl

@NotNull
public java.lang.String getPersonalQueuedBuildUrl(long personalChangeId,
                                                          @NotNull
                                                          BuildType buildType)
URL of the specified personal queued build.

Parameters:
personalChangeId - personal change id
buildType - specified build configuration
Returns:
see above
Since:
8.0

getConfigurationHomePageUrl

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

getProjectPageUrl

@NotNull
public java.lang.String getProjectPageUrl(@NotNull
                                                  java.lang.String projectExternalId)
Parameters:
projectExternalId - specified project external id
Returns:
URL of the specified project page

getOverviewUrl

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

getEditNotificationsUrl

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

getPluginUrl

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

getHelp

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

getTestDetailsUrl

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

getTestDetailsUrl

@NotNull
public java.lang.String getTestDetailsUrl(@NotNull
                                                  java.lang.String projectExternalId,
                                                  long testNameId,
                                                  @Nullable
                                                  java.lang.String buildTypeId)
Parameters:
projectExternalId - the project id
testNameId - test name id
Returns:
URL of the test details page
Since:
7.1

getHelp

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

getResponsibilitiesUrl

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

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

getMutedProblemsUrl

@NotNull
public java.lang.String getMutedProblemsUrl(@NotNull
                                                    java.lang.String projectExternalId)
Returns the URL of the muted problems page.

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

cutOffBaseUrl

@NotNull
public java.lang.String cutOffBaseUrl(@NotNull
                                              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