Package aQute.bnd.build
Class WorkspaceRepository
java.lang.Object
aQute.bnd.build.WorkspaceRepository
- All Implemented Interfaces:
Actionable,RepositoryPlugin
-
Nested Class Summary
Nested classes/interfaces inherited from interface aQute.bnd.service.RepositoryPlugin
RepositoryPlugin.DownloadListener, RepositoryPlugin.PutOptions, RepositoryPlugin.PutResult -
Field Summary
FieldsFields inherited from interface aQute.bnd.service.RepositoryPlugin
DEFAULTOPTIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn a map with command names (potentially localized) and a Runnable.booleancanWrite()Answer if this repository can be used to store files.get(String bsn, Version version, Map<String, String> properties, RepositoryPlugin.DownloadListener... listeners) Return a URL to a matching version of the given bundle.private File[]private FilegetIcon()Return a name of an iconReturn a location identifier of this repositorygetName()booleanisRemote()Indicate if this repo is remote or localReturn a list of bsns that are present in the repository.private booleanmatchVersion(String range, Version version, boolean exact) 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.Provide a title for an element.Return a tooltip for the given target or the encompassing entity if null is passed.Return a list of versions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface aQute.bnd.service.RepositoryPlugin
getStatus, isOk, sync
-
Field Details
-
workspace
-
EXACT_VERSION_MATCH
-
-
Constructor Details
-
WorkspaceRepository
-
-
Method Details
-
get
- Throws:
Exception
-
get
private File get(String bsn, String range, Strategy strategy, Map<String, String> properties) throws Exception- Throws:
Exception
-
matchVersion
-
canWrite
public boolean canWrite()Description copied from interface:RepositoryPluginAnswer if this repository can be used to store files.- Specified by:
canWritein interfaceRepositoryPlugin- Returns:
- true if writable
-
put
public RepositoryPlugin.PutResult put(InputStream stream, RepositoryPlugin.PutOptions options) throws Exception Description copied from interface:RepositoryPluginPut 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.- Specified by:
putin interfaceRepositoryPlugin- Parameters:
stream- The input stream with the artifactoptions- The put options. SeeRepositoryPlugin.PutOptions, can benull, which will then take the default options like new PutOptions().- Returns:
- The result of the put, never null. See
RepositoryPlugin.PutResult - Throws:
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 (seeRepositoryPlugin.PutOptions.digest), when the implementation wants to modify the artifact but isn't allowed, or when another error has occurred.
-
list
Description copied from interface:RepositoryPluginReturn a list of bsns that are present in the repository.- Specified by:
listin interfaceRepositoryPlugin- Parameters:
pattern- A invalid input: '<'ahref="https://en.wikipedia.org/wiki/Glob_%28programming%29"> glob pattern to be matched against bsns present in the repository, ornull.- Returns:
- A list of bsns that match the pattern parameter or all if pattern is null; repositories that do not support browsing or querying should return an empty list.
- Throws:
Exception
-
versions
Description copied from interface:RepositoryPluginReturn a list of versions.- Specified by:
versionsin interfaceRepositoryPlugin- Throws:
Exception
-
getName
- Specified by:
getNamein interfaceRepositoryPlugin- Returns:
- The name of the repository
-
getLocation
Description copied from interface:RepositoryPluginReturn a location identifier of this repository- Specified by:
getLocationin interfaceRepositoryPlugin
-
get
public File get(String bsn, Version version, Map<String, String> properties, RepositoryPlugin.DownloadListener... listeners) throws ExceptionDescription copied from interface:RepositoryPluginReturn a URL to a matching version of the given bundle. If download listeners are specified then the returned file is not guaranteed to exist before a download listener is notified of success or failure. The callback can happen before the method has returned. If the returned file is null then download listeners are not called back. The intention of the Download Listeners is to allow a caller to obtain references to files that do not yet exist but are to be downloaded. If the downloads were done synchronously in the call, then no overlap of downloads could take place.- Specified by:
getin interfaceRepositoryPlugin- Parameters:
bsn- Bundle-SymbolicName of the searched bundleversion- Version requestedlisteners- Zero or more download listener that will be notified of the outcome.- Returns:
- A file to the revision or null if not found
- Throws:
Exception- when anything goes wrong, in this case no listeners will be called back.
-
actions
Description copied from interface:ActionableReturn a map with command names (potentially localized) and a Runnable. The caller can execute the caller at will.- Specified by:
actionsin interfaceActionable- Parameters:
target- the target object, null if commands for the encompassing entity is sought (e.g. the repo itself).- Returns:
- A Map with the actions or null if no actions are available.
- Throws:
Exception
-
tooltip
Description copied from interface:ActionableReturn a tooltip for the given target or the encompassing entity if null is passed.- Specified by:
tooltipin interfaceActionable- Parameters:
target- the target, any number of parameters to identify- Returns:
- the tooltip or null
- Throws:
Exception
-
title
Description copied from interface:ActionableProvide a title for an element.- Specified by:
titlein interfaceActionable- Parameters:
target- the target, any number of parameters to identify- Returns:
- the text for this element
- Throws:
Exception
-
getIcon
Description copied from interface:RepositoryPluginReturn a name of an icon- Specified by:
getIconin interfaceRepositoryPlugin
-
isRemote
public boolean isRemote()Description copied from interface:RepositoryPluginIndicate if this repo is remote or local- Specified by:
isRemotein interfaceRepositoryPlugin- Returns:
- true if this is a remote repo
-