Class RepositoryReferences


  • public final class RepositoryReferences
    extends java.lang.Object
    List of p2 repositories for a p2 operation. Instances of this class store a list of metadata and artifact repositories each, preserving the order in which the repositories were added.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.net.URI> artifactRepos  
      private java.util.List<java.net.URI> metadataRepos  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addArtifactRepository​(java.io.File artifactRepositoryLocation)
      Adds the artifact repository at the given location.
      void addArtifactRepository​(java.net.URI artifactRepository)
      Adds the artifact repository at the given location.
      void addArtifactRepository​(RepositoryBlackboardKey blackboardKey)
      Adds the artifact repository which is stored in memory under the given key.
      void addMetadataRepository​(java.io.File metadataRepositoryLocation)
      Adds the metadata repository at the given location.
      void addMetadataRepository​(java.net.URI metadataRepository)
      Adds the metadata repository at the given location.
      java.util.List<java.net.URI> getArtifactRepositories()
      Returns the list of artifact repositories in the order in which they were added.
      java.util.List<java.net.URI> getMetadataRepositories()
      Returns the list of metadata repositories in the order in which they were added.
      • Methods inherited from class java.lang.Object

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

      • metadataRepos

        private final java.util.List<java.net.URI> metadataRepos
      • artifactRepos

        private final java.util.List<java.net.URI> artifactRepos
    • Constructor Detail

      • RepositoryReferences

        public RepositoryReferences()
    • Method Detail

      • addMetadataRepository

        public void addMetadataRepository​(java.io.File metadataRepositoryLocation)
        Adds the metadata repository at the given location.
        Parameters:
        metadataRepositoryLocation - The folder containing the metadata repository file (content.xml or content.jar)
      • addMetadataRepository

        public void addMetadataRepository​(java.net.URI metadataRepository)
        Adds the metadata repository at the given location.
        Parameters:
        metadataRepositoryLocation - A URL pointing to a p2 metadata repository
      • addArtifactRepository

        public void addArtifactRepository​(java.io.File artifactRepositoryLocation)
        Adds the artifact repository at the given location.
        Parameters:
        artifactRepositoryLocation - The folder containing the artifact repository file structure
      • addArtifactRepository

        public void addArtifactRepository​(java.net.URI artifactRepository)
        Adds the artifact repository at the given location.
        Parameters:
        artifactRepositoryLocation - A URL pointing to a p2 artifact repository
      • addArtifactRepository

        public void addArtifactRepository​(RepositoryBlackboardKey blackboardKey)
        Adds the artifact repository which is stored in memory under the given key.
        Parameters:
        artifactRepositoryLocation - A key identifying a repository registered on the artifact repository blackboard.
      • getMetadataRepositories

        public java.util.List<java.net.URI> getMetadataRepositories()
        Returns the list of metadata repositories in the order in which they were added.
        Returns:
        the list metadata repositories.
      • getArtifactRepositories

        public java.util.List<java.net.URI> getArtifactRepositories()
        Returns the list of artifact repositories in the order in which they were added.
        Returns:
        the list of artifact repositories.