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 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 a externalId.
        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 with ProjectManager.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 (see VcsSupportConfig.getName())
        Parameters:
        vcsSupportName - name of VcsSupport
        Returns:
        see above
        Since:
        6.0