public class FileRepo extends Object implements Plugin, RepositoryPlugin, Refreshable, RegistryPlugin
RepositoryPlugin.Strategy| Modifier and Type | Field and Description |
|---|---|
static String |
LOCATION |
static String |
NAME |
static String |
READONLY |
protected File |
root |
| Constructor and Description |
|---|
FileRepo() |
FileRepo(String name,
File location,
boolean canWrite) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite()
Answer if this repository can be used to store files.
|
protected void |
fireBundleAdded(Jar jar,
File file) |
File[] |
get(String bsn,
String versionRange)
Get a list of URLs to bundles that are constrained by the bsn and
versionRange.
|
File |
get(String bsn,
String version,
RepositoryPlugin.Strategy strategy,
Map<String,String> properties)
Return a URL to a matching version of the given bundle.
|
String |
getName() |
File |
getRoot() |
protected void |
init() |
List<String> |
list(String regex)
Return a list of bsns that are present in the repository.
|
File |
put(Jar jar)
Put a JAR file in the repository.
|
boolean |
refresh() |
void |
setLocation(String string) |
void |
setProperties(Map<String,String> map)
Give the plugin the remaining properties.
|
void |
setRegistry(Registry registry) |
void |
setReporter(Reporter reporter)
Set the current reporter.
|
String |
toString() |
List<Version> |
versions(String bsn)
Return a list of versions.
|
public static String LOCATION
public static String READONLY
public static String NAME
protected File root
public void setProperties(Map<String,String> map)
PluginsetProperties in interface Pluginmap - attributes and directives for this plugin's clausepublic File[] get(String bsn, String versionRange) throws Exception
get in interface RepositoryPluginbsn - Bundle-SymbolicName of the searched bundleversionRange - Version range for this bundle,"latest" if you only want the
latest, or null when you want all.Exception - when anything goes wrongpublic boolean canWrite()
RepositoryPlugincanWrite in interface RepositoryPluginpublic File put(Jar jar) throws Exception
RepositoryPluginput in interface RepositoryPluginExceptionpublic void setLocation(String string)
public void setReporter(Reporter reporter)
PluginsetReporter in interface Pluginpublic List<String> list(String regex) throws Exception
RepositoryPluginlist in interface RepositoryPluginregex - if not null, match against the bsn and if matches, return
otherwise skipExceptionpublic List<Version> versions(String bsn) throws Exception
RepositoryPluginversions in interface RepositoryPluginExceptionpublic File getRoot()
getRoot in interface Refreshablepublic boolean refresh()
refresh in interface Refreshablepublic String getName()
getName in interface RepositoryPluginpublic File get(String bsn, String version, RepositoryPlugin.Strategy strategy, Map<String,String> properties) throws Exception
RepositoryPluginget in interface RepositoryPluginbsn - Bundle-SymbolicName of the searched bundleversion - Version range for this bundle,"latest" if you only want the
latest, or null when you want all.strategy - Get the highest or the lowestException - when anything goes wrongpublic void setRegistry(Registry registry)
setRegistry in interface RegistryPluginCopyright © 2015 aQute SARL. All Rights Reserved.