Package jetbrains.buildServer.vcs
Interface VcsRootsManager
-
- All Known Subinterfaces:
VcsManager
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(java.lang.String vcsRootExternalId)
Returns vcs root with specified external id.SVcsRoot
findRootById(long id)
returns vcs root with specified idjava.util.Collection<? extends SVcsRoot>
findRootsByVcsName(java.lang.String vcsSupportName)
Returns collection of VCS roots corresponding to VcsSupport with specified name (seeVcsSupportConfig.getName()
)java.util.List<SVcsRoot>
findUnusedVcsRootsByScope(VcsRootScope scope)
Returns list of VCS roots having specified scope and having no usages in build configurations.java.util.Collection<? extends SVcsRoot>
findVcsRoots(java.util.Collection<java.lang.Long> ids)
returns available vcs roots with the given idsjava.util.List<SVcsRoot>
findVcsRootsByScope(VcsRootScope scope)
Returns all VCS roots having specified scope.java.util.List<SBuildType>
getAllConfigurationUsages(VcsRoot root)
Returns all configurations which use the root.java.util.List<SProject>
getAllProjectUsages(VcsRoot root)
returns all project which contain configurations which use the root.java.util.List<SVcsRoot>
getAllRegisteredVcsRoots()
returns list of all registered vcs rootsjava.util.List<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 java.lang.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 java.util.List<SVcsRoot> getAllRegisteredVcsRoots()
returns list of all registered vcs roots- Returns:
- see above
-
findVcsRootsByScope
@NotNull java.util.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
java.util.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 java.util.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
java.util.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 java.util.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 java.util.Collection<? extends SVcsRoot> findVcsRoots(@NotNull java.util.Collection<java.lang.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 java.util.Collection<? extends SVcsRoot> findRootsByVcsName(java.lang.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
-
-