Interface RepositoryManager

    • Method Detail

      • getRepositories

        Collection<Repository> getRepositories()
        Gets all registered repositories.
        Returns:
        a read-only collection of repositories or an empty one if no repositories was defined
      • getRepositoryNames

        List<String> getRepositoryNames()
        Gets the names of registered repositories.
        Returns:
        a list of repository names
        Since:
        5.9.3
      • getRepository

        Repository getRepository​(String name)
        Gets a repository by its name.
        Parameters:
        name - the repository name
        Returns:
        the repository or null if not found
      • addRepository

        void addRepository​(Repository repository)
        Registers a new repository.
        Parameters:
        repository - the repository to register
      • removeRepository

        void removeRepository​(String name)
        Removes a registered repository.

        Do nothing if the repository is not registered.

        Parameters:
        name - the repository name to unregister
      • getDefaultRepository

        Repository getDefaultRepository()
        Gets the default repository.

        If there is not a default repository returns the first registered. repository

        This is a convenient method to get the repository for application having a single repository.

        Returns:
        the default repository
      • getDefaultRepositoryName

        String getDefaultRepositoryName()
        Gets the name of the default repository.

        If there is not a default repository, returns the name of the first registered repository.

        Returns:
        the default repository name