Package aQute.bnd.resource.repository
Class ResourceRepositoryImpl
java.lang.Object
aQute.bnd.resource.repository.ResourceRepositoryImpl
- All Implemented Interfaces:
ResourceRepository
This class implements a hidden repository. This repo is kept in a text file
that is under scm control. Files are fetched on demand. The idea is that bnd
will bootstrap from this repo and downloads plugins. These plugins then
provide faces on this hidden repository.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass maintains the info stored in the text file in the cnf directory that holds our contents.Nested classes/interfaces inherited from interface aQute.bnd.service.repository.ResourceRepository
ResourceRepository.Listener, ResourceRepository.ResourceRepositoryEvent, ResourceRepository.TYPE -
Field Summary
FieldsFields inherited from interface aQute.bnd.service.repository.ResourceRepository
FILENAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(String repoId, SearchableRepository.ResourceDescriptor rd) Add a resource descriptor to the index.voidAdd a new event listenerbooleanbooleandeleteCache(byte[] id) Delete a cache entryList the resources.find(String repoId, String bsn, VersionRange range) getCacheDir(String name) getResource(byte[] rd, RepositoryPlugin.DownloadListener... blockers) Get the file belonging to a Resource DescriptorgetResourceDescriptor(byte[] rd) List the resources.voidRemove an event listenervoidvoidsetExecutor(Executor executor) voidsetIndexFile(File file) voidsetReporter(aQute.service.reporter.Reporter processor) voidsetURLConnector(URLConnectionHandler connector) toString()
-
Field Details
-
EMPTY_LISTENER
-
-
Constructor Details
-
ResourceRepositoryImpl
public ResourceRepositoryImpl()
-
-
Method Details
-
filter
List the resources. We skip the filter for now.- Specified by:
filterin interfaceResourceRepository- Parameters:
filter- An OSGi filter matched against theSearchableRepository.ResourceDescriptor- Returns:
- an immutable list of resource descriptors
- Throws:
Exception
-
delete
- Specified by:
deletein interfaceResourceRepository- Throws:
Exception
-
deleteCache
Delete a cache entry- Specified by:
deleteCachein interfaceResourceRepository- Throws:
Exception
-
add
Add a resource descriptor to the index.- Specified by:
addin interfaceResourceRepository- Throws:
Exception
-
getResource
Get the file belonging to a Resource Descriptor- Specified by:
getResourcein interfaceResourceRepository- Throws:
Exception
-
addListener
Add a new event listener- Specified by:
addListenerin interfaceResourceRepository
-
removeListener
Remove an event listener -
getResourceDescriptor
List the resources. We skip the filter for now.- Specified by:
getResourceDescriptorin interfaceResourceRepository- Throws:
Exception
-
setReporter
public void setReporter(aQute.service.reporter.Reporter processor) -
setIndexFile
-
setCache
-
setExecutor
- Throws:
Exception
-
setURLConnector
- Throws:
Exception
-
find
public SortedSet<SearchableRepository.ResourceDescriptor> find(String repoId, String bsn, VersionRange range) throws Exception - Specified by:
findin interfaceResourceRepository- Throws:
Exception
-
getCacheDir
- Specified by:
getCacheDirin interfaceResourceRepository
-
toString
-