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 class
Class 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 TypeMethodDescriptionboolean
add
(String repoId, SearchableRepository.ResourceDescriptor rd) Add a resource descriptor to the index.void
Add a new event listenerboolean
boolean
deleteCache
(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.void
Remove an event listenervoid
void
setExecutor
(Executor executor) void
setIndexFile
(File file) void
setReporter
(aQute.service.reporter.Reporter processor) void
setURLConnector
(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:
filter
in interfaceResourceRepository
- Parameters:
filter
- An OSGi filter matched against theSearchableRepository.ResourceDescriptor
- Returns:
- an immutable list of resource descriptors
- Throws:
Exception
-
delete
- Specified by:
delete
in interfaceResourceRepository
- Throws:
Exception
-
deleteCache
Delete a cache entry- Specified by:
deleteCache
in interfaceResourceRepository
- Throws:
Exception
-
add
Add a resource descriptor to the index.- Specified by:
add
in interfaceResourceRepository
- Throws:
Exception
-
getResource
Get the file belonging to a Resource Descriptor- Specified by:
getResource
in interfaceResourceRepository
- Throws:
Exception
-
addListener
Add a new event listener- Specified by:
addListener
in interfaceResourceRepository
-
removeListener
Remove an event listener -
getResourceDescriptor
List the resources. We skip the filter for now.- Specified by:
getResourceDescriptor
in 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:
find
in interfaceResourceRepository
- Throws:
Exception
-
getCacheDir
- Specified by:
getCacheDir
in interfaceResourceRepository
-
toString
-