Package org.apache.solr.packagemanager
Class RepositoryManager
- java.lang.Object
-
- org.apache.solr.packagemanager.RepositoryManager
-
public class RepositoryManager extends Object
Handles most of the management of repositories and packages present in external repositories.
-
-
Constructor Summary
Constructors Constructor Description RepositoryManager(org.apache.solr.client.solrj.SolrClient solrClient, PackageManager packageManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addKey(byte[] key, String destinationKeyFilename)
void
addRepository(String repoName, String uri)
Add a repository to SolrSolrPackage.SolrPackageRelease
getLastPackageRelease(String packageName)
List<SolrPackage>
getPackages()
Map<String,SolrPackage>
getPackagesMap()
Get a map of package name toSolrPackage
objectsList<PackageRepository>
getRepositories()
List of added repositoriesboolean
hasPackageUpdate(String packageName)
Is there a version of the package available in the repositories that is more latest than our latest installed version of the package?boolean
install(String packageName, String version)
Install a version of the package.
-
-
-
Constructor Detail
-
RepositoryManager
public RepositoryManager(org.apache.solr.client.solrj.SolrClient solrClient, PackageManager packageManager)
-
-
Method Detail
-
getPackages
public List<SolrPackage> getPackages()
-
getPackagesMap
public Map<String,SolrPackage> getPackagesMap()
Get a map of package name toSolrPackage
objects
-
getRepositories
public List<PackageRepository> getRepositories()
List of added repositories
-
addRepository
public void addRepository(String repoName, String uri) throws Exception
Add a repository to Solr- Throws:
Exception
-
addKey
public void addKey(byte[] key, String destinationKeyFilename) throws Exception
- Throws:
Exception
-
getLastPackageRelease
public SolrPackage.SolrPackageRelease getLastPackageRelease(String packageName)
-
hasPackageUpdate
public boolean hasPackageUpdate(String packageName)
Is there a version of the package available in the repositories that is more latest than our latest installed version of the package?
-
install
public boolean install(String packageName, String version) throws org.apache.solr.common.SolrException
Install a version of the package. Also, run verify commands in case some collection was usingSolrPackageLoader.LATEST
version of this package and got auto-updated.- Throws:
org.apache.solr.common.SolrException
-
-