Package jetbrains.buildServer.serverSide
Class WebLinks
- java.lang.Object
-
- jetbrains.buildServer.serverSide.RelativeWebLinks
-
- jetbrains.buildServer.serverSide.WebLinks
-
public class WebLinks extends RelativeWebLinks
This helper creates absolute links to different TeamCity pages.
-
-
Field Summary
-
Fields inherited from class jetbrains.buildServer.serverSide.RelativeWebLinks
BUILD_TAB_CHANGES, BUILD_TAB_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description WebLinks(RootUrlHolder urlHolder)Creates new links helper.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringcutOffBaseUrl(String url)Deprecated.useRelativeWebLinksinstead.StringgetHelp(String pageName)StringgetHelp(String pageName, String anchor)StringgetRootUrl()Deprecated.use getRootUrlByProjectExternalId or getRootUrlByProjectInternalId instead.StringgetRootUrlByProjectExternalId(String extProjectId)Returns root server URL by project external id.StringgetRootUrlByProjectInternalId(String internalId)Returns root server URL by project internal id.protected StringprepareProjectUrl(String relativeUrl, String externalProjectID)Returns URL for the particular project.protected StringprepareProjectUrlByBuildTypeTemplateExternalId(String relativeUrl, String extTemplateId)Returns URL by external build template id.protected StringprepareProjectUrlByExternalBuildTypeId(String relativeUrl, String extBuildTypeId)Returns URL by external BuildType id.protected StringprepareProjectUrlByInternalBuildTypeId(String relativeUrl, String intBuildTypeId)Returns URL by internal BuildType id.protected StringprepareUrl(String relativeUrl)voidsetUrlHolder(RootUrlHolder holder)Changes server root url provider.-
Methods inherited from class jetbrains.buildServer.serverSide.RelativeWebLinks
addParameterQuestionmark, formatBuildTab, getAgentUrl, getBuildDependenciesForQueuedBuildUrl, getBuildDependenciesUrl, getBuildParametersUrl, getBuildUrl, getChangeFilesUrl, getChangeUrl, getCloudImageUrl, getConfigurationHomePageUrl, getCreateConfigurationPageUrl, getCreateProjectPageUrl, getDownloadAllArtefactsUrl, getDownloadArtefactUrl, getDownloadArtefactUrl, getEditBuildFeaturesUrl, getEditConfigurationPageUrl, getEditNotificationsUrl, getEditProjectPageUrl, getEditTemplatePageUrl, getEditVcsRootPageUrl, getEditVcsRootPageUrl, getMutedProblemsUrl, getOverviewUrl, getPersonalQueuedBuildUrl, getPluginUrl, getProjectPageUrl, getQueuedBuildUrl, getResponsibilitiesUrl, getTestDetailsUrl, getTestDetailsUrl, getUserNotificationsUrl, getUserSettingsUrl, getViewArtifactsUrl, getViewChangesUrl, getViewLogUrl, getViewQueuedChangesUrl, getViewResultsUrl
-
-
-
-
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
@Deprecated @NotNull public String getRootUrl()
Deprecated.use getRootUrlByProjectExternalId or getRootUrlByProjectInternalId instead.- Returns:
- root server URL
-
getRootUrlByProjectExternalId
@NotNull public String getRootUrlByProjectExternalId(@Nullable String extProjectId)
Returns root server URL by project external id.
-
getRootUrlByProjectInternalId
@NotNull public String getRootUrlByProjectInternalId(@Nullable String internalId)
Returns root server URL by project internal id.
-
getHelp
@NotNull public String getHelp(@NotNull String pageName)
- Parameters:
pageName- specified page name- Returns:
- URL of the specified page help
-
getHelp
@NotNull public String getHelp(@NotNull String pageName, @Nullable String anchor)
- Parameters:
pageName- specified page name and anchoranchor- specified anchor- Returns:
- URL of the specified page help
-
cutOffBaseUrl
@Deprecated @NotNull public String cutOffBaseUrl(@NotNull String url)
Deprecated.useRelativeWebLinksinstead.Cuts the base URL off, when the link path should not include the domain.- Parameters:
url- full url- Returns:
- absolute path without base URL
-
prepareUrl
@NotNull protected String prepareUrl(@NotNull String relativeUrl)
- Overrides:
prepareUrlin classRelativeWebLinks
-
prepareProjectUrl
@NotNull protected String prepareProjectUrl(@NotNull String relativeUrl, @Nullable String externalProjectID)
Description copied from class:RelativeWebLinksReturns URL for the particular project. Can be overloaded in children.- Overrides:
prepareProjectUrlin classRelativeWebLinks
-
prepareProjectUrlByExternalBuildTypeId
@NotNull protected String prepareProjectUrlByExternalBuildTypeId(@NotNull String relativeUrl, @Nullable String extBuildTypeId)
Description copied from class:RelativeWebLinksReturns URL by external BuildType id. Can be overloaded in children.- Overrides:
prepareProjectUrlByExternalBuildTypeIdin classRelativeWebLinks
-
prepareProjectUrlByInternalBuildTypeId
@NotNull protected String prepareProjectUrlByInternalBuildTypeId(@NotNull String relativeUrl, @Nullable String intBuildTypeId)
Description copied from class:RelativeWebLinksReturns URL by internal BuildType id. Can be overloaded in children.- Overrides:
prepareProjectUrlByInternalBuildTypeIdin classRelativeWebLinks
-
prepareProjectUrlByBuildTypeTemplateExternalId
@NotNull protected String prepareProjectUrlByBuildTypeTemplateExternalId(@NotNull String relativeUrl, @Nullable String extTemplateId)
Description copied from class:RelativeWebLinksReturns URL by external build template id. Can be overloaded in children.- Overrides:
prepareProjectUrlByBuildTypeTemplateExternalIdin classRelativeWebLinks
-
-