public class OSGiObrBasedRepository extends Object implements Repository
| Constructor and Description |
|---|
OSGiObrBasedRepository(org.apache.felix.bundlerepository.Repository obr) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addListener(RepositoryChangeListener listener)
Add a listener to changes happening to this repository.
|
ModuleDefinition |
find(String name,
String version)
Finds and returns a
DefaultModuleDefinition instance
for a module given the name and version constraints. |
List<ModuleDefinition> |
findAll()
Returns a list of all modules available in this repository
|
List<ModuleDefinition> |
findAll(String name)
Finds and returns a list of all the available versions of a
module given its name.
|
List<URI> |
getJarLocations()
Returns the plain jar files installed in this repository.
|
URI |
getLocation()
Returns the repository location
|
String |
getName()
Returns the repository name
|
void |
initialize()
Initialize the repository for use.
|
boolean |
removeListener(RepositoryChangeListener listener)
Removes a previously registered listener
|
void |
shutdown()
Shutdown the repository.
|
public OSGiObrBasedRepository(org.apache.felix.bundlerepository.Repository obr)
public String getName()
RepositorygetName in interface Repositorypublic URI getLocation()
RepositorygetLocation in interface Repositorypublic ModuleDefinition find(String name, String version)
RepositoryDefaultModuleDefinition instance
for a module given the name and version constraints.find in interface Repositoryname - the requested module nameversion - the module version. Can be null if the caller doesn't care about the version.DefaultModuleDefinition or null if not found
in this repository.public List<ModuleDefinition> findAll()
RepositoryfindAll in interface Repositorypublic List<ModuleDefinition> findAll(String name)
RepositoryfindAll in interface Repositoryname - the requested module namepublic void initialize()
throws IOException
Repositoryinitialize in interface RepositoryIOException - if an error occur accessing the repositorypublic void shutdown()
throws IOException
Repositoryshutdown in interface RepositoryIOException - if an error occur accessing the repositorypublic List<URI> getJarLocations()
RepositorygetJarLocations in interface Repositorypublic boolean addListener(RepositoryChangeListener listener)
RepositoryaddListener in interface Repositorylistener - implementation listening to this repository changespublic boolean removeListener(RepositoryChangeListener listener)
RepositoryremoveListener in interface Repositorylistener - the previously registered listenerCopyright © 2014 Oracle Corporation. All rights reserved.