Class CompoundRepository

  • All Implemented Interfaces:
    Repository

    class CompoundRepository
    extends AbstractRepository
    Compound repository.

    This repository aggregates zero or more other repositories. The repositories are ordered by preference.

    All requests are forwarded to repositories backing this compound repository. If no repositories are aggregated then this repository is equivalent to empty repository.

    • Constructor Summary

      Constructors 
      Constructor Description
      CompoundRepository​(java.lang.String namespace, java.nio.file.Path prefix, java.util.List<Repository> slaveRepositories)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.file.Path getPrimaryArtifactPath​(Artifact artifact, ArtifactContext context, java.lang.String pattern)
      Obtain the preferred path to given artifact in this repository.
      java.util.Set<java.nio.file.Path> getRootPaths()  
      private java.nio.file.Path prefix​(java.nio.file.Path path)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • prefix

        private final java.nio.file.Path prefix
      • slaveRepositories

        private final java.util.List<Repository> slaveRepositories
    • Constructor Detail

      • CompoundRepository

        public CompoundRepository​(java.lang.String namespace,
                                  java.nio.file.Path prefix,
                                  java.util.List<Repository> slaveRepositories)
    • Method Detail

      • prefix

        private java.nio.file.Path prefix​(java.nio.file.Path path)
      • getPrimaryArtifactPath

        public java.nio.file.Path getPrimaryArtifactPath​(Artifact artifact,
                                                         ArtifactContext context,
                                                         java.lang.String pattern)
        Description copied from interface: Repository
        Obtain the preferred path to given artifact in this repository.

        Returned path is relative to the repository base.

        context - TODO
        pattern - TODO
        Returns:
        preferred artifact path
      • getRootPaths

        public java.util.Set<java.nio.file.Path> getRootPaths()