Interface RepositoryCache

  • All Known Implementing Classes:
    RepositoryCacheImpl

    public interface RepositoryCache

    An interface for accessing repository/features information. Simple implementations may just map feature XMLs directly to JAXB model (see: Features).

    In more complex cases, additional processing (blacklisting, overrides, patching) may be performed.

    • Method Detail

      • create

        Repository create​(URI uri,
                          boolean validate)
        Creates Repository without adding it to cache
        Parameters:
        uri - an URI (e.g., mvn:groupId/artifactId/version/xml/features of repository
        validate - whether to perform XML Schema validation of loaded features XML
        Returns:
        a Repository that may be inspected or added to cache
      • addRepository

        void addRepository​(Repository repository)
        Adds existing Repository to be tracked/managed by this cache and later be available e.g., via getRepository(String)
        Parameters:
        repository - existing repository to add to cache
      • removeRepository

        void removeRepository​(URI repositoryUri)
        Removes existing Repository by its URI
        Parameters:
        repositoryUri - URI of the Repository to remove
      • getRepositoryByName

        Repository getRepositoryByName​(String name)
        Gets Repository by its name
        Parameters:
        name - Name of the repository
        Returns:
        Repository as it's stored inside the cache
      • getRepositoryClosure

        Set<Repository> getRepositoryClosure​(Repository repo)
        Returns a set of repositories including passed repository and all referenced repositories.
        Parameters:
        repo - A Repository, that possibly references other feature repositories.
        Returns:
        A closure of repositories