public class WebJarAssetLocator extends Object
| Constructor and Description |
|---|
WebJarAssetLocator(IWebjarsSettings settings)
Convenience constructor that will form a locator for all resources on the current class path.
|
WebJarAssetLocator(IWebjarsSettings settings,
SortedMap<String,String> fullPathIndex)
Establish a locator given an index that it should use.
|
| Modifier and Type | Method and Description |
|---|---|
SortedMap<String,String> |
createFullPathIndex(Pattern filterExpr,
ClassLoader... classLoaders)
Return a map that can be used to perform index lookups of partial file paths.
|
String |
getFullPath(String partialPath)
Given a distinct path within the WebJar index passed in return the full path of the resource.
|
SortedMap<String,String> |
getFullPathIndex() |
Set<String> |
listAssets(String folderPath)
List assets within a folder.
|
static String |
prependWebjarsPathIfMissing(String path)
prepends the webjars path if missing
|
String |
recentVersionOf(String partialPath) |
public WebJarAssetLocator(IWebjarsSettings settings)
public WebJarAssetLocator(IWebjarsSettings settings, SortedMap<String,String> fullPathIndex)
fullPathIndex - the index to use.public static String prependWebjarsPathIfMissing(String path)
path - the file name to checkpublic String getFullPath(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 Set<String> listAssets(String folderPath)
folderPath - the root path to the folder. Must begin with '/'.public SortedMap<String,String> createFullPathIndex(Pattern filterExpr, ClassLoader... classLoaders)
filterExpr - the regular expression to be used to filter resources that will be included in the index.classLoaders - the class loaders to be considered for loading the resources from.Copyright © 2014 agilecoders.de. All Rights Reserved.