Class NexusSearchOsgiRepository
- java.lang.Object
-
- aQute.bnd.osgi.repository.BaseRepository
-
- aQute.bnd.osgi.repository.ResourcesRepository
-
- de.mnl.osgi.bnd.repository.maven.nexussearch.LocalMavenBackedOsgiRepository
-
- de.mnl.osgi.bnd.repository.maven.nexussearch.NexusSearchOsgiRepository
-
- All Implemented Interfaces:
Repository
public class NexusSearchOsgiRepository extends LocalMavenBackedOsgiRepository
Provide an OSGi repository (a collection ofResource
s, seeRepository
), filled with the results of performing a search on a Nexus server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.mnl.osgi.bnd.repository.maven.nexussearch.LocalMavenBackedOsgiRepository
LocalMavenBackedOsgiRepository.MavenRevisionComparator
-
-
Field Summary
-
Fields inherited from interface org.osgi.service.repository.Repository
URL
-
-
Constructor Summary
Constructors Constructor Description NexusSearchOsgiRepository(String name, URL server, File localRepo, File obrIndexFile, File mvnResposFile, String queryString, int searchBreadth, int chunkSize, aQute.service.reporter.Reporter reporter, aQute.bnd.http.HttpClient client)
Create a new instance that uses the provided information/resources to perform its work.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description aQute.maven.api.IMavenRepo
mavenRepository()
Return the Maven repository object used to back this repository.boolean
refresh()
Refresh this repository's content.-
Methods inherited from class de.mnl.osgi.bnd.repository.maven.nexussearch.LocalMavenBackedOsgiRepository
location, name, refresh
-
Methods inherited from class aQute.bnd.osgi.repository.ResourcesRepository
add, addAll, findProvider, findProviders, getResources, set, toCapabilities, toResourcesRepository, toString
-
-
-
-
Constructor Detail
-
NexusSearchOsgiRepository
public NexusSearchOsgiRepository(String name, URL server, File localRepo, File obrIndexFile, File mvnResposFile, String queryString, int searchBreadth, int chunkSize, aQute.service.reporter.Reporter reporter, aQute.bnd.http.HttpClient client) throws Exception
Create a new instance that uses the provided information/resources to perform its work.- Parameters:
name
- the nameserver
- the url of the Nexus serverlocalRepo
- the local Maven repository (cache)obrIndexFile
- the persistent representation of this repository's contentmvnResposFile
- the mvn respos filequeryString
- the query stringsearchBreadth
- the search breadthchunkSize
- the chunk sizereporter
- a reporter for reporting the progressclient
- an HTTP client for obtaining information from the Nexus server- Throws:
Exception
- if a problem occurs
-
-
Method Detail
-
refresh
public boolean refresh() throws Exception
Refresh this repository's content.- Specified by:
refresh
in classLocalMavenBackedOsgiRepository
- Returns:
- true if refreshed, false if not refreshed possibly due to error
- Throws:
Exception
- if a problem occurs
-
mavenRepository
public aQute.maven.api.IMavenRepo mavenRepository() throws Exception
Return the Maven repository object used to back this repository.- Returns:
- the maven repository
- Throws:
Exception
- if a problem occurs
-
-