Class ProjectAwareRootUrlResolverImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.ProjectAwareRootUrlResolverImpl
-
- All Implemented Interfaces:
ProjectAwareRootUrlResolver
,RootUrlHolder
,ServerUrlProvider
public class ProjectAwareRootUrlResolverImpl extends Object implements ProjectAwareRootUrlResolver
- Author:
- Kirill Lakhtin (kirill.lakhtin@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description ProjectAwareRootUrlResolverImpl(RootUrlHolder rootUrlHolder, ProjectManager projectManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getRootUrl()
Returns the server URLString
getRootUrlByBuildTypeExternalId(String buildTypeExternalId)
Returns project-based URL using external buildType id for determining the project.String
getRootUrlByBuildTypeInternalId(String buildTypeInternalId)
Returns project-based URL using internal buildType id for determining the project.String
getRootUrlByBuildTypeTemplateExternalId(String extTemplateId)
Returns project-based URL using external build type template id for determining the project If extTemplateId is null or the project doesn't exist or it's not configured with url property - returns global server URL, if it's exist.String
getRootUrlByProjectExternalId(String externalProjectId)
Returns project-based URL if it's configured for the project.String
getRootUrlByProjectInternalId(String internalProjectId)
Returns project-based URL by project internal id if it's configured for the project.void
setRootUrl(String rootUrl)
Sets new root URL.
-
-
-
Constructor Detail
-
ProjectAwareRootUrlResolverImpl
public ProjectAwareRootUrlResolverImpl(@NotNull RootUrlHolder rootUrlHolder, @NotNull ProjectManager projectManager)
-
-
Method Detail
-
getRootUrlByProjectExternalId
@NotNull public String getRootUrlByProjectExternalId(@Nullable String externalProjectId)
Description copied from interface:ProjectAwareRootUrlResolver
Returns project-based URL if it's configured for the project. If not (or externalProjectId is null) - returns global server URL, if it's exist. If not - returns default value.- Specified by:
getRootUrlByProjectExternalId
in interfaceProjectAwareRootUrlResolver
-
getRootUrlByProjectInternalId
@NotNull public String getRootUrlByProjectInternalId(@Nullable String internalProjectId)
Description copied from interface:ProjectAwareRootUrlResolver
Returns project-based URL by project internal id if it's configured for the project. If not (or internalProjectId is null) - returns global server URL, if it's exist. If not - returns default value.- Specified by:
getRootUrlByProjectInternalId
in interfaceProjectAwareRootUrlResolver
-
getRootUrlByBuildTypeExternalId
@NotNull public String getRootUrlByBuildTypeExternalId(@Nullable String buildTypeExternalId)
Description copied from interface:ProjectAwareRootUrlResolver
Returns project-based URL using external buildType id for determining the project. If buildTypeExternalId is null or the project doesn't exist or it's not configured with url property - returns global server URL, if it's exist. If not - returns default value.- Specified by:
getRootUrlByBuildTypeExternalId
in interfaceProjectAwareRootUrlResolver
-
getRootUrlByBuildTypeInternalId
@NotNull public String getRootUrlByBuildTypeInternalId(@Nullable String buildTypeInternalId)
Description copied from interface:ProjectAwareRootUrlResolver
Returns project-based URL using internal buildType id for determining the project. If buildTypeInternalId is null or the project doesn't exist or it's not configured with url property - returns global server URL, if it's exist. If not - returns default value.- Specified by:
getRootUrlByBuildTypeInternalId
in interfaceProjectAwareRootUrlResolver
-
getRootUrlByBuildTypeTemplateExternalId
@NotNull public String getRootUrlByBuildTypeTemplateExternalId(@Nullable String extTemplateId)
Description copied from interface:ProjectAwareRootUrlResolver
Returns project-based URL using external build type template id for determining the project If extTemplateId is null or the project doesn't exist or it's not configured with url property - returns global server URL, if it's exist. If not - returns default value.- Specified by:
getRootUrlByBuildTypeTemplateExternalId
in interfaceProjectAwareRootUrlResolver
-
getRootUrl
@NotNull public String getRootUrl()
Description copied from interface:ServerUrlProvider
Returns the server URL- Specified by:
getRootUrl
in interfaceServerUrlProvider
- Returns:
- server root URL
-
setRootUrl
public void setRootUrl(@NotNull String rootUrl)
Description copied from interface:RootUrlHolder
Sets new root URL.- Specified by:
setRootUrl
in interfaceRootUrlHolder
- Parameters:
rootUrl
- new root URL
-
-