public class ResourceRepositoryImpl extends Object implements ResourceRepository
| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceRepositoryImpl.FileLayout
Class maintains the info stored in the text file in the cnf directory
that holds our contents.
|
ResourceRepository.Listener, ResourceRepository.ResourceRepositoryEvent, ResourceRepository.TYPE| Modifier and Type | Field and Description |
|---|---|
protected static RepositoryPlugin.DownloadListener[] |
EMPTY_LISTENER |
FILENAME| Constructor and Description |
|---|
ResourceRepositoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String repoId,
SearchableRepository.ResourceDescriptor rd)
Add a resource descriptor to the index.
|
void |
addListener(ResourceRepository.Listener rrl)
Add a new event listener
|
boolean |
delete(String repoId,
byte[] id) |
boolean |
deleteCache(byte[] id)
Delete a cache entry
|
List<ResourceDescriptorImpl> |
filter(String repoId,
String filter)
List the resources.
|
SortedSet<SearchableRepository.ResourceDescriptor> |
find(String repoId,
String bsn,
VersionRange range) |
File |
getCacheDir(String name) |
File |
getResource(byte[] rd,
RepositoryPlugin.DownloadListener... blockers)
Get the file belonging to a Resource Descriptor
|
ResourceDescriptorImpl |
getResourceDescriptor(byte[] rd)
List the resources.
|
void |
removeListener(ResourceRepository.Listener rrl)
Remove an event listener
|
void |
setCache(File cache) |
void |
setExecutor(Executor executor) |
void |
setIndexFile(File file) |
void |
setReporter(Reporter processor) |
void |
setURLConnector(URLConnectionHandler connector) |
String |
toString() |
protected static final RepositoryPlugin.DownloadListener[] EMPTY_LISTENER
public List<ResourceDescriptorImpl> filter(String repoId, String filter) throws Exception
filter in interface ResourceRepositoryfilter - An OSGi filter matched against the
SearchableRepository.ResourceDescriptorExceptionpublic boolean delete(String repoId, byte[] id) throws Exception
delete in interface ResourceRepositoryExceptionpublic boolean deleteCache(byte[] id)
throws Exception
deleteCache in interface ResourceRepositoryExceptionpublic boolean add(String repoId, SearchableRepository.ResourceDescriptor rd) throws Exception
add in interface ResourceRepositoryExceptionpublic File getResource(byte[] rd, RepositoryPlugin.DownloadListener... blockers) throws Exception
getResource in interface ResourceRepositoryExceptionpublic void addListener(ResourceRepository.Listener rrl)
addListener in interface ResourceRepositorypublic void removeListener(ResourceRepository.Listener rrl)
public ResourceDescriptorImpl getResourceDescriptor(byte[] rd) throws Exception
getResourceDescriptor in interface ResourceRepositoryExceptionpublic void setReporter(Reporter processor)
public void setIndexFile(File file)
public void setCache(File cache)
public void setURLConnector(URLConnectionHandler connector) throws Exception
Exceptionpublic SortedSet<SearchableRepository.ResourceDescriptor> find(String repoId, String bsn, VersionRange range) throws Exception
find in interface ResourceRepositoryExceptionpublic File getCacheDir(String name)
getCacheDir in interface ResourceRepositoryCopyright © 2019 aQute SARL. All rights reserved.