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, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
initialize, registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
public static final String AUTO_DOWNLOAD_SETTING
public static final String DISABLE_CHECKSUMS_SETTING
public static final String SYSTEM_PROPERTIES_SETTING
public boolean isGrabEnabled()
GrabService
isGrabEnabled
in interface GrabService
public void setGrabEnabled(boolean enableGrab)
GrabService
setGrabEnabled
in interface GrabService
public boolean getEnableAutoDownload()
GrabService
This 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 GrabService
public void setEnableAutoDownload(boolean enableAutoDownload)
GrabService
This 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 GrabService
public boolean getDisableChecksums()
GrabService
getDisableChecksums
in interface GrabService
public void setDisableChecksums(boolean disableChecksums)
GrabService
setDisableChecksums
in interface GrabService
public void grab(String endorsed)
grab
in interface GrabService
public void grab(Map<String,Object> dependency)
grab
in interface GrabService
public void grab(Map<String,Object> args, Map... dependencies)
grab
in interface GrabService
public Map<String,Map<String,List<String>>> dependencies()
GrabService
dependencies
in interface GrabService
groupId
. Each key resolves to a map keyed on
artifactId
s of that groupId
. Each
artifactId
key resolves to a list of resolved
version
s.public URI[] resolve(Map<String,Object> args, Map... dependencies)
resolve
in interface GrabService
public URI[] resolve(Map<String,Object> args, List depsInfo, Map... dependencies)
resolve
in interface GrabService
public Map[] listDependencies(ClassLoader cl)
listDependencies
in interface GrabService
public void addResolver(Map<String,Object> args)
addResolver
in interface GrabService
Copyright © 2015–2022 SciJava. All rights reserved.