public interface RepositoryPlugin
Modifier and Type | Interface and Description |
---|---|
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
|
Modifier and Type | Field and Description |
---|---|
static RepositoryPlugin.PutOptions |
DEFAULTOPTIONS |
Modifier and Type | Method and Description |
---|---|
boolean |
canWrite()
Answer if this repository can be used to store files.
|
java.io.File |
get(java.lang.String bsn,
Version version,
java.util.Map<java.lang.String,java.lang.String> properties,
RepositoryPlugin.DownloadListener... listeners)
Return a URL to a matching version of the given bundle.
|
java.lang.String |
getLocation()
Return a location identifier of this repository
|
java.lang.String |
getName() |
java.util.List<java.lang.String> |
list(java.lang.String pattern)
Return a list of bsns that are present in the repository.
|
RepositoryPlugin.PutResult |
put(java.io.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. |
java.util.SortedSet<Version> |
versions(java.lang.String bsn)
Return a list of versions.
|
static final RepositoryPlugin.PutOptions DEFAULTOPTIONS
RepositoryPlugin.PutResult put(java.io.InputStream stream, RepositoryPlugin.PutOptions options) throws java.lang.Exception
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
java.lang.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, or when another error has occurred.java.io.File get(java.lang.String bsn, Version version, java.util.Map<java.lang.String,java.lang.String> properties, RepositoryPlugin.DownloadListener... listeners) throws java.lang.Exception
bsn
- Bundle-SymbolicName of the searched bundleversion
- Version requestedlisteners
- Zero or more download listener that will be notified of
the outcome.java.lang.Exception
- when anything goes wrong, in this case no listeners
will be called back.boolean canWrite()
java.util.List<java.lang.String> list(java.lang.String pattern) throws java.lang.Exception
pattern
- A
null
.java.lang.Exception
java.util.SortedSet<Version> versions(java.lang.String bsn) throws java.lang.Exception
java.lang.Exception
java.lang.String getName()
java.lang.String getLocation()