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 String
cutOffBaseUrl(String url)
Deprecated.useRelativeWebLinks
instead.String
getHelp(String pageName)
String
getHelp(String pageName, String anchor)
String
getRootUrl()
Deprecated.use getRootUrlByProjectExternalId or getRootUrlByProjectInternalId instead.String
getRootUrlByProjectExternalId(String extProjectId)
Returns root server URL by project external id.String
getRootUrlByProjectInternalId(String internalId)
Returns root server URL by project internal id.protected String
prepareProjectUrl(String relativeUrl, String externalProjectID)
Returns URL for the particular project.protected String
prepareProjectUrlByBuildTypeTemplateExternalId(String relativeUrl, String extTemplateId)
Returns URL by external build template id.protected String
prepareProjectUrlByExternalBuildTypeId(String relativeUrl, String extBuildTypeId)
Returns URL by external BuildType id.protected String
prepareProjectUrlByInternalBuildTypeId(String relativeUrl, String intBuildTypeId)
Returns URL by internal BuildType id.protected String
prepareUrl(String relativeUrl)
void
setUrlHolder(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.useRelativeWebLinks
instead.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:
prepareUrl
in classRelativeWebLinks
-
prepareProjectUrl
@NotNull protected String prepareProjectUrl(@NotNull String relativeUrl, @Nullable String externalProjectID)
Description copied from class:RelativeWebLinks
Returns URL for the particular project. Can be overloaded in children.- Overrides:
prepareProjectUrl
in classRelativeWebLinks
-
prepareProjectUrlByExternalBuildTypeId
@NotNull protected String prepareProjectUrlByExternalBuildTypeId(@NotNull String relativeUrl, @Nullable String extBuildTypeId)
Description copied from class:RelativeWebLinks
Returns URL by external BuildType id. Can be overloaded in children.- Overrides:
prepareProjectUrlByExternalBuildTypeId
in classRelativeWebLinks
-
prepareProjectUrlByInternalBuildTypeId
@NotNull protected String prepareProjectUrlByInternalBuildTypeId(@NotNull String relativeUrl, @Nullable String intBuildTypeId)
Description copied from class:RelativeWebLinks
Returns URL by internal BuildType id. Can be overloaded in children.- Overrides:
prepareProjectUrlByInternalBuildTypeId
in classRelativeWebLinks
-
prepareProjectUrlByBuildTypeTemplateExternalId
@NotNull protected String prepareProjectUrlByBuildTypeTemplateExternalId(@NotNull String relativeUrl, @Nullable String extTemplateId)
Description copied from class:RelativeWebLinks
Returns URL by external build template id. Can be overloaded in children.- Overrides:
prepareProjectUrlByBuildTypeTemplateExternalId
in classRelativeWebLinks
-
-