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
static interface ResourceRepository.Listener
           
static class ResourceRepository.ResourceRepositoryEvent
           
static class ResourceRepository.TYPE
           
 
Field Summary
static String FILENAME
           
 
Method Summary
 boolean add(String repoId, SearchableRepository.ResourceDescriptor rd)
           
 void addListener(ResourceRepository.Listener rrl)
           
 boolean delete(String repoId, byte[] rd)
           
 boolean deleteCache(byte[] id)
           
 List<? extends SearchableRepository.ResourceDescriptor> filter(String repository, String filter)
          Get the list of Resource Descriptors.
 SortedSet<SearchableRepository.ResourceDescriptor> find(String repository, String bsn, VersionRange range)
           
 File getCacheDir(String name)
           
 File getResource(byte[] id, RepositoryPlugin.DownloadListener... listeners)
           
 SearchableRepository.ResourceDescriptor getResourceDescriptor(byte[] sha)
           
 

Field Detail

FILENAME

static final String FILENAME
See Also:
Constant Field Values
Method Detail

filter

List<? extends SearchableRepository.ResourceDescriptor> filter(String repository,
                                                               String filter)
                                                               throws 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 the SearchableRepository.ResourceDescriptor
Returns:
an immutable list of resource descriptors
Throws:
Exception

getResource

File getResource(byte[] id,
                 RepositoryPlugin.DownloadListener... listeners)
                 throws Exception
Throws:
Exception

getResourceDescriptor

SearchableRepository.ResourceDescriptor getResourceDescriptor(byte[] sha)
                                                              throws Exception
Throws:
Exception

delete

boolean delete(String repoId,
               byte[] rd)
               throws Exception
Throws:
Exception

add

boolean add(String repoId,
            SearchableRepository.ResourceDescriptor rd)
            throws Exception
Throws:
Exception

addListener

void addListener(ResourceRepository.Listener rrl)

deleteCache

boolean deleteCache(byte[] id)
                    throws Exception
Throws:
Exception

find

SortedSet<SearchableRepository.ResourceDescriptor> find(String repository,
                                                        String bsn,
                                                        VersionRange range)
                                                        throws Exception
Throws:
Exception

getCacheDir

File getCacheDir(String name)


Copyright © 2014 aQute SARL. All rights reserved.