public class WorkspaceRepository extends java.lang.Object implements RepositoryPlugin, Actionable
RepositoryPlugin.DownloadListener, RepositoryPlugin.PutOptions, RepositoryPlugin.PutResultDEFAULTOPTIONS| Constructor and Description |
|---|
WorkspaceRepository(Workspace workspace) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Runnable> |
actions(java.lang.Object... target)
Return a map with command names (potentially localized) and a Runnable.
|
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 (see RepositoryPlugin.PutOptions#allowArtifactChange). |
java.lang.String |
title(java.lang.Object... target)
Provide a title for an element.
|
java.lang.String |
tooltip(java.lang.Object... target)
Return a tooltip for the given target or the encompassing entity if null
is passed.
|
java.util.SortedSet<Version> |
versions(java.lang.String bsn)
Return a list of versions.
|
public WorkspaceRepository(Workspace workspace)
public boolean canWrite()
RepositoryPlugincanWrite in interface RepositoryPluginpublic RepositoryPlugin.PutResult put(java.io.InputStream stream, RepositoryPlugin.PutOptions options) throws java.lang.Exception
RepositoryPluginRepositoryPlugin.PutOptions#allowArtifactChange).put in interface RepositoryPluginstream - 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.PutResultjava.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
(see RepositoryPlugin.PutOptions#allowArtifactChange
), or when another error has occurred.public java.util.List<java.lang.String> list(java.lang.String pattern)
throws java.lang.Exception
RepositoryPluginlist in interface RepositoryPluginpattern - A null.java.lang.Exceptionpublic java.util.SortedSet<Version> versions(java.lang.String bsn) throws java.lang.Exception
RepositoryPluginversions in interface RepositoryPluginjava.lang.Exceptionpublic java.lang.String getName()
getName in interface RepositoryPluginpublic java.lang.String getLocation()
RepositoryPlugingetLocation in interface RepositoryPluginpublic 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
RepositoryPluginget in interface RepositoryPluginbsn - 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.public java.util.Map<java.lang.String,java.lang.Runnable> actions(java.lang.Object... target)
throws java.lang.Exception
Actionableactions in interface Actionabletarget - the target object, null if commands for the encompassing
entity is sought (e.g. the repo itself).java.lang.Exceptionpublic java.lang.String tooltip(java.lang.Object... target)
throws java.lang.Exception
Actionabletooltip in interface Actionabletarget - the target, any number of parameters to identifyjava.lang.Exceptionpublic java.lang.String title(java.lang.Object... target)
throws java.lang.Exception
Actionabletitle in interface Actionabletarget - the target, any number of parameters to identifyjava.lang.Exception