public class DefaultGrabService extends AbstractService implements GrabService
GrabService.
Heavily adapted from Grape.java.
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTO_DOWNLOAD_SETTING |
static String |
DISABLE_CHECKSUMS_SETTING |
static String |
SYSTEM_PROPERTIES_SETTING |
| Constructor and Description |
|---|
DefaultGrabService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResolver(Map<String,Object> args) |
Map<String,Map<String,List<String>>> |
dependencies()
Gets a table of dependencies which have previously been grabbed.
|
boolean |
getDisableChecksums()
Global flag to ignore checksums.
|
boolean |
getEnableAutoDownload()
This is a static access auto download enabler.
|
void |
grab(Map<String,Object> dependency) |
void |
grab(Map<String,Object> args,
Map... dependencies) |
void |
grab(String endorsed) |
boolean |
isGrabEnabled()
This is a static access kill-switch.
|
Map[] |
listDependencies(ClassLoader cl) |
URI[] |
resolve(Map<String,Object> args,
List depsInfo,
Map... dependencies) |
URI[] |
resolve(Map<String,Object> args,
Map... dependencies) |
void |
setDisableChecksums(boolean disableChecksums)
Sets global flag to ignore checksums.
|
void |
setEnableAutoDownload(boolean enableAutoDownload)
This toggles the auto download feature.
|
void |
setGrabEnabled(boolean enableGrab)
This is a static access kill-switch.
|
getContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinitialize, registerEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposepublic static final String AUTO_DOWNLOAD_SETTING
public static final String DISABLE_CHECKSUMS_SETTING
public static final String SYSTEM_PROPERTIES_SETTING
public boolean isGrabEnabled()
GrabServiceisGrabEnabled in interface GrabServicepublic void setGrabEnabled(boolean enableGrab)
GrabServicesetGrabEnabled in interface GrabServicepublic boolean getEnableAutoDownload()
GrabServiceThis applies to the grab and resolve calls.
If it is set to false, only previously downloaded grapes will be used. This may cause failure in the grape call if the library has not yet been downloaded
If it is set to true, then any jars not already downloaded will automatically be downloaded. Also, any versions expressed as a range will be checked for new versions and downloaded (with dependencies) if found.
By default it is set to true.
getEnableAutoDownload in interface GrabServicepublic void setEnableAutoDownload(boolean enableAutoDownload)
GrabServiceThis applies to the grab and resolve calls.
If it is set to false, only previously downloaded grapes will be used. This may cause failure in the grape call if the library has not yet been downloaded.
If it is set to true, then any jars not already downloaded will automatically be downloaded. Also, any versions expressed as a range will be checked for new versions and downloaded (with dependencies) if found. By default it is set to true.
setEnableAutoDownload in interface GrabServicepublic boolean getDisableChecksums()
GrabServicegetDisableChecksums in interface GrabServicepublic void setDisableChecksums(boolean disableChecksums)
GrabServicesetDisableChecksums in interface GrabServicepublic void grab(String endorsed)
grab in interface GrabServicepublic void grab(Map<String,Object> dependency)
grab in interface GrabServicepublic void grab(Map<String,Object> args, Map... dependencies)
grab in interface GrabServicepublic Map<String,Map<String,List<String>>> dependencies()
GrabServicedependencies in interface GrabServicegroupId. Each key resolves to a map keyed on
artifactIds of that groupId. Each
artifactId key resolves to a list of resolved
versions.public URI[] resolve(Map<String,Object> args, Map... dependencies)
resolve in interface GrabServicepublic URI[] resolve(Map<String,Object> args, List depsInfo, Map... dependencies)
resolve in interface GrabServicepublic Map[] listDependencies(ClassLoader cl)
listDependencies in interface GrabServicepublic void addResolver(Map<String,Object> args)
addResolver in interface GrabServiceCopyright © 2015–2022 SciJava. All rights reserved.