Package aQute.bnd.service.repository
Interface ResourceRepository
-
- All Known Implementing Classes:
ResourceRepositoryImpl
public interface ResourceRepository
A Resource Repository represents a repository local to the workspace. A Workspace will always create one Workspace Repository. References to the contents are stored in a text file in./cnf/dependencies.json
. Associated with the repository is a cache (which might be shared with other subsystems).This repository can be used to get plugin dependencies.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ResourceRepository.Listener
static class
ResourceRepository.ResourceRepositoryEvent
static class
ResourceRepository.TYPE
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FILENAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
add(java.lang.String repoId, SearchableRepository.ResourceDescriptor rd)
void
addListener(ResourceRepository.Listener rrl)
boolean
delete(java.lang.String repoId, byte[] rd)
boolean
deleteCache(byte[] id)
java.util.List<? extends SearchableRepository.ResourceDescriptor>
filter(java.lang.String repository, java.lang.String filter)
Get the list of Resource Descriptors.java.util.SortedSet<SearchableRepository.ResourceDescriptor>
find(java.lang.String repository, java.lang.String bsn, VersionRange range)
java.io.File
getCacheDir(java.lang.String name)
java.io.File
getResource(byte[] id, RepositoryPlugin.DownloadListener... listeners)
SearchableRepository.ResourceDescriptor
getResourceDescriptor(byte[] sha)
-
-
-
Field Detail
-
FILENAME
static final java.lang.String FILENAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
filter
java.util.List<? extends SearchableRepository.ResourceDescriptor> filter(java.lang.String repository, java.lang.String filter) throws java.lang.Exception
Get the list of Resource Descriptors. This contains all the descriptors that are n the file, regardless of cache.- Parameters:
filter
- An OSGi filter matched against theSearchableRepository.ResourceDescriptor
- Returns:
- an immutable list of resource descriptors
- Throws:
java.lang.Exception
-
getResource
java.io.File getResource(byte[] id, RepositoryPlugin.DownloadListener... listeners) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getResourceDescriptor
SearchableRepository.ResourceDescriptor getResourceDescriptor(byte[] sha) throws java.lang.Exception
- Throws:
java.lang.Exception
-
delete
boolean delete(java.lang.String repoId, byte[] rd) throws java.lang.Exception
- Throws:
java.lang.Exception
-
add
boolean add(java.lang.String repoId, SearchableRepository.ResourceDescriptor rd) throws java.lang.Exception
- Throws:
java.lang.Exception
-
addListener
void addListener(ResourceRepository.Listener rrl)
-
deleteCache
boolean deleteCache(byte[] id) throws java.lang.Exception
- Throws:
java.lang.Exception
-
find
java.util.SortedSet<SearchableRepository.ResourceDescriptor> find(java.lang.String repository, java.lang.String bsn, VersionRange range) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getCacheDir
java.io.File getCacheDir(java.lang.String name)
-
-