public final class ResourceLookup
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
exists(java.lang.String path)
Checks if absolute resource path exists in the classpath.
|
static void |
existsOrFail(java.lang.String path)
Shortcut for
exists(String) with fail in case of not found template. |
static java.lang.String |
lookup(java.lang.Class base,
java.lang.String path)
Lookup path relative to class.
|
static java.lang.String |
lookup(java.lang.String path,
java.util.List<java.lang.String> rootPaths)
Searches provided resource in multiple classpath locations.
|
static java.lang.String |
lookupOrFail(java.lang.String path,
java.util.List<java.lang.String> rootPaths)
Shortcut for
lookup(String, List) with fail in case of not found template. |
public static java.lang.String lookup(java.lang.Class base,
java.lang.String path)
base - class to search path relative topath - relative pathpublic static java.lang.String lookup(java.lang.String path,
java.util.List<java.lang.String> rootPaths)
path - static resource pathrootPaths - classpath folders to search resource inpublic static java.lang.String lookupOrFail(java.lang.String path,
java.util.List<java.lang.String> rootPaths)
throws TemplateNotFoundException
lookup(String, List) with fail in case of not found template.path - static resource pathrootPaths - classpath folders to search resource inTemplateNotFoundException - if template not foundpublic static boolean exists(java.lang.String path)
path - absolute path to check (assumed as absolute event if not starts with /)public static void existsOrFail(java.lang.String path)
throws TemplateNotFoundException
exists(String) with fail in case of not found template.path - absolute path to check (assumed as absolute event if not starts with /)TemplateNotFoundException - if template not found