public class WebJarAssetLocator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,org.webjars.WebJarAssetLocator.WebJarInfo> |
allWebJars |
static java.lang.String |
WEBJARS_PACKAGE
The webjar package name.
|
static java.lang.String |
WEBJARS_PATH_PREFIX
The path to where webjar resources live.
|
| Constructor and Description |
|---|
WebJarAssetLocator() |
WebJarAssetLocator(java.lang.ClassLoader classLoader) |
WebJarAssetLocator(java.lang.ClassLoader classLoader,
java.lang.String... whitelistPaths) |
WebJarAssetLocator(java.util.Map<java.lang.String,org.webjars.WebJarAssetLocator.WebJarInfo> allWebJars) |
WebJarAssetLocator(java.lang.String... whitelistPaths) |
| Modifier and Type | Method and Description |
|---|---|
protected static java.util.Map<java.lang.String,org.webjars.WebJarAssetLocator.WebJarInfo> |
findWebJars(io.github.classgraph.ScanResult scanResult) |
java.lang.String |
getFullPath(java.lang.String partialPath)
Given a distinct path within the WebJar index passed in return the full
path of the resource.
|
java.lang.String |
getFullPath(java.lang.String webjar,
java.lang.String partialPath)
Returns the full path of an asset within a specific WebJar
|
java.lang.String |
getFullPathExact(java.lang.String webJarName,
java.lang.String exactPath)
Returns the full path of an asset within a specific WebJar
|
static java.util.Map.Entry<java.lang.String,java.lang.String> |
getWebJar(java.lang.String path) |
java.util.Map<java.lang.String,java.lang.String> |
getWebJars() |
java.lang.String |
groupId(java.lang.String fullPath)
Gets the Group ID given a fullPath
|
java.util.Set<java.lang.String> |
listAssets() |
java.util.Set<java.lang.String> |
listAssets(java.lang.String folderPath)
List assets within a folder.
|
protected static io.github.classgraph.ResourceList |
webJarResources(java.lang.String webJarName,
io.github.classgraph.ResourceList resources) |
protected static java.lang.String |
webJarVersion(java.lang.String webJarName,
io.github.classgraph.ResourceList resources) |
public static final java.lang.String WEBJARS_PACKAGE
public static final java.lang.String WEBJARS_PATH_PREFIX
protected final java.util.Map<java.lang.String,org.webjars.WebJarAssetLocator.WebJarInfo> allWebJars
public WebJarAssetLocator()
public WebJarAssetLocator(java.lang.ClassLoader classLoader)
public WebJarAssetLocator(java.lang.String... whitelistPaths)
public WebJarAssetLocator(java.lang.ClassLoader classLoader,
java.lang.String... whitelistPaths)
public WebJarAssetLocator(java.util.Map<java.lang.String,org.webjars.WebJarAssetLocator.WebJarInfo> allWebJars)
protected static io.github.classgraph.ResourceList webJarResources(java.lang.String webJarName,
io.github.classgraph.ResourceList resources)
protected static java.lang.String webJarVersion(java.lang.String webJarName,
io.github.classgraph.ResourceList resources)
protected static java.util.Map<java.lang.String,org.webjars.WebJarAssetLocator.WebJarInfo> findWebJars(io.github.classgraph.ScanResult scanResult)
public static java.util.Map.Entry<java.lang.String,java.lang.String> getWebJar(java.lang.String path)
path - The full WebJar pathpublic java.lang.String getFullPath(java.lang.String partialPath)
partialPath - the path to return e.g. "jquery.js" or "abc/someother.js".
This must be a distinct path within the index passed in.public java.lang.String getFullPath(java.lang.String webjar,
java.lang.String partialPath)
webjar - The id of the WebJar to searchpartialPath - The partial path to look forpublic java.lang.String getFullPathExact(java.lang.String webJarName,
java.lang.String exactPath)
webJarName - The id of the WebJar to searchexactPath - The exact path of the file within the WebJarpublic java.util.Set<java.lang.String> listAssets()
public java.util.Set<java.lang.String> listAssets(java.lang.String folderPath)
folderPath - the root path to the folder.public java.util.Map<java.lang.String,java.lang.String> getWebJars()
public java.lang.String groupId(java.lang.String fullPath)
fullPath - the fullPath to the asset in a WebJar, i.e. META-INF/resources/webjars/jquery/2.1.0/jquery.jsCopyright © 2020. All Rights Reserved.