|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RepositoryPlugin
A Repository Plugin abstract a bnd repository. This interface allows bnd to find programs from their bsn and revisions from their bsn-version combination. It is also possible to put revisions in a repository if the repository is not read only.
| Nested Class Summary | |
|---|---|
static interface |
RepositoryPlugin.DownloadListener
The caller can specify any number of DownloadListener objects that are called back when a download is finished (potentially before the get method has returned). |
static class |
RepositoryPlugin.PutOptions
Options used to steer the put operation |
static class |
RepositoryPlugin.PutResult
Results returned by the put operation |
| Field Summary | |
|---|---|
static RepositoryPlugin.PutOptions |
DEFAULTOPTIONS
|
| Method Summary | |
|---|---|
boolean |
canWrite()
Answer if this repository can be used to store files. |
File |
get(String bsn,
Version version,
Map<String,String> properties,
RepositoryPlugin.DownloadListener... listeners)
Return a URL to a matching version of the given bundle. |
String |
getLocation()
Return a location identifier of this repository |
String |
getName()
|
List<String> |
list(String pattern)
Return a list of bsns that are present in the repository. |
RepositoryPlugin.PutResult |
put(InputStream stream,
RepositoryPlugin.PutOptions options)
Put an artifact (from the InputStream) into the repository. There is NO guarantee that the artifact on the input stream has not been modified after it's been put in the repository since that is dependent on the implementation of the repository (see RepositoryPlugin.PutOptions#allowArtifactChange). |
SortedSet<Version> |
versions(String bsn)
Return a list of versions. |
| Field Detail |
|---|
static final RepositoryPlugin.PutOptions DEFAULTOPTIONS
| Method Detail |
|---|
RepositoryPlugin.PutResult put(InputStream stream,
RepositoryPlugin.PutOptions options)
throws Exception
RepositoryPlugin.PutOptions#allowArtifactChange).
stream - The input stream with the artifactoptions - The put options. See RepositoryPlugin.PutOptions, can
be null, which will then take the default options like
new PutOptions().
RepositoryPlugin.PutResult
Exception - When the repository root directory doesn't exist, when the
repository is read-only, when the specified checksum doesn't
match the checksum of the fetched artifact (see
RepositoryPlugin.PutOptions.digest), when the
implementation wants to modify the artifact but isn't allowed
(see RepositoryPlugin.PutOptions#allowArtifactChange
), or when another error has occurred.
File get(String bsn,
Version version,
Map<String,String> properties,
RepositoryPlugin.DownloadListener... listeners)
throws Exception
bsn - Bundle-SymbolicName of the searched bundleversion - Version requestedlisteners - Zero or more download listener that will be notified of the
outcome.
Exception - when anything goes wrong, in this case no listeners will be
called back.boolean canWrite()
List<String> list(String pattern)
throws Exception
pattern - A null.
Exception
SortedSet<Version> versions(String bsn)
throws Exception
ExceptionString getName()
String getLocation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||