Package jetbrains.buildServer.vcs
Interface VcsRootsManager
-
- All Known Subinterfaces:
VcsManager
,VcsManagerEx
,VcsRootsManagerEx
- All Known Implementing Classes:
SecuredVcsManager
,VcsManagerImpl
,VcsRootsManagerImpl
public interface VcsRootsManager
Created 21.08.13 19:29 //TODO: should be common with ProjectVcsRoots- Since:
- 8.1
- Author:
- Eugene Petrenko (eugene.petrenko@jetbrains.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SVcsRoot
findRootByExternalId(String vcsRootExternalId)
Returns vcs root with specified external id.SVcsRoot
findRootById(long id)
returns vcs root with specified idCollection<? extends SVcsRoot>
findRootsByVcsName(String vcsSupportName)
Returns collection of VCS roots corresponding to VcsSupport with specified name (seeVcsSupportConfig.getName()
)List<SVcsRoot>
findUnusedVcsRootsByScope(VcsRootScope scope)
Returns list of VCS roots having specified scope and having no usages in build configurations.Collection<? extends SVcsRoot>
findVcsRoots(Collection<Long> ids)
returns available vcs roots with the given idsList<SVcsRoot>
findVcsRootsByScope(VcsRootScope scope)
Returns all VCS roots having specified scope.List<SBuildType>
getAllConfigurationUsages(VcsRoot root)
Returns all configurations which use the root.List<SProject>
getAllProjectUsages(VcsRoot root)
returns all project which contain configurations which use the root.List<SVcsRoot>
getAllRegisteredVcsRoots()
returns list of all registered vcs rootsList<BuildTypeTemplate>
getAllTemplateUsages(VcsRoot root)
Returns all templates with specified vcs root attached.int
getNumberOfUsagesInConfigurations(VcsRoot root)
Returns number of usages of the specified VCS root in build configurationsint
getNumberOfUsagesInProjects(VcsRoot root)
Returns number of usages of this VCS root in projects build configurations and templatesboolean
isUsedInProjects(SVcsRoot vcsRoot)
-
-
-
Method Detail
-
findRootById
@Nullable SVcsRoot findRootById(long id)
returns vcs root with specified id- Parameters:
id
- vcs root id- Returns:
- vcs root by id
-
findRootByExternalId
@Nullable SVcsRoot findRootByExternalId(@Nullable String vcsRootExternalId)
Returns vcs root with specified external id. Since 8.1 the method also looks up the vcs root by the previous external ids. So the result project can have a different external id after a call. But the later is impossible if there is a vcs root that currently has aexternalId
.- Parameters:
vcsRootExternalId
- vcs root external id- Returns:
- vcs root by external id
- Since:
- 8.0
-
getAllRegisteredVcsRoots
@NotNull List<SVcsRoot> getAllRegisteredVcsRoots()
returns list of all registered vcs roots- Returns:
- see above
-
findVcsRootsByScope
@NotNull List<SVcsRoot> findVcsRootsByScope(@NotNull VcsRootScope scope)
Returns all VCS roots having specified scope.- Parameters:
scope
- scope of VCS roots- Returns:
- all VCS roots with specified scope
-
findUnusedVcsRootsByScope
List<SVcsRoot> findUnusedVcsRootsByScope(@NotNull VcsRootScope scope)
Returns list of VCS roots having specified scope and having no usages in build configurations.- Parameters:
scope
- scope to filter VCS roots- Returns:
- list of unused VCS roots
-
getAllProjectUsages
@NotNull List<SProject> getAllProjectUsages(@NotNull VcsRoot root)
returns all project which contain configurations which use the root. Projects are sorted withProjectManager.getProjectsComparator()
.- Parameters:
root
- specified vcs root- Returns:
- all root usages in projects
-
getNumberOfUsagesInProjects
int getNumberOfUsagesInProjects(VcsRoot root)
Returns number of usages of this VCS root in projects build configurations and templates- Parameters:
root
- VCS root whose usages should be found- Returns:
- see above
-
isUsedInProjects
boolean isUsedInProjects(@NotNull SVcsRoot vcsRoot)
- Parameters:
vcsRoot
- VCS Root to check- Returns:
- true if VCS root is used by any project (is attached to a build configuration or template, or is used as Versioned Settings VCS root)
-
getAllConfigurationUsages
List<SBuildType> getAllConfigurationUsages(VcsRoot root)
Returns all configurations which use the root. Build configurations are sorted by project name then by build configuration name.- Parameters:
root
- specified vcs root- Returns:
- all root usages in configuration
-
getAllTemplateUsages
@NotNull List<BuildTypeTemplate> getAllTemplateUsages(@NotNull VcsRoot root)
Returns all templates with specified vcs root attached.- Parameters:
root
- vcs root- Returns:
- all templates with specified vcs root
- Since:
- 5.0
-
getNumberOfUsagesInConfigurations
int getNumberOfUsagesInConfigurations(VcsRoot root)
Returns number of usages of the specified VCS root in build configurations- Parameters:
root
- VCS root whose usages are searched for- Returns:
- see above
-
findVcsRoots
@NotNull Collection<? extends SVcsRoot> findVcsRoots(@NotNull Collection<Long> ids)
returns available vcs roots with the given ids- Parameters:
ids
- root ids- Returns:
- collection of available object identified by the given ids
- Since:
- 5.0
-
findRootsByVcsName
@NotNull Collection<? extends SVcsRoot> findRootsByVcsName(String vcsSupportName)
Returns collection of VCS roots corresponding to VcsSupport with specified name (seeVcsSupportConfig.getName()
)- Parameters:
vcsSupportName
- name of VcsSupport- Returns:
- see above
- Since:
- 6.0
-
-