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 ResourceRepository
filter
- An OSGi filter matched against the SearchableRepository.ResourceDescriptor
Exception
public boolean delete(String repoId, byte[] id) throws Exception
delete
in interface ResourceRepository
Exception
public boolean deleteCache(byte[] id) throws Exception
deleteCache
in interface ResourceRepository
Exception
public boolean add(String repoId, SearchableRepository.ResourceDescriptor rd) throws Exception
add
in interface ResourceRepository
Exception
public File getResource(byte[] rd, RepositoryPlugin.DownloadListener... blockers) throws Exception
getResource
in interface ResourceRepository
Exception
public void addListener(ResourceRepository.Listener rrl)
addListener
in interface ResourceRepository
public void removeListener(ResourceRepository.Listener rrl)
public ResourceDescriptorImpl getResourceDescriptor(byte[] rd) throws Exception
getResourceDescriptor
in interface ResourceRepository
Exception
public void setReporter(Reporter processor)
public void setIndexFile(File file)
public void setCache(File cache)
public void setURLConnector(URLConnectionHandler connector) throws Exception
Exception
public SortedSet<SearchableRepository.ResourceDescriptor> find(String repoId, String bsn, VersionRange range) throws Exception
find
in interface ResourceRepository
Exception
public File getCacheDir(String name)
getCacheDir
in interface ResourceRepository
Copyright © 2015 aQute SARL. All rights reserved.