Package ru.vyarus.guicey.gsp.app.util
Class ResourceLookup
java.lang.Object
ru.vyarus.guicey.gsp.app.util.ResourceLookup
Utility used to lookup static resources in multiple locations. This is used for applications extensions
mechanism when additional resources could be mapped into application from different classpath location.
- Since:
- 04.12.2018
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidexistsOrFail(String path, AssetLookup assets) Shortcut forAssetLookup.load(String)with fail in case of not found template.static StringlookupOrFail(String path, AssetLookup assets) Shortcut forAssetLookup.lookupPath(String)with fail in case of not found template.
-
Method Details
-
lookupOrFail
Shortcut forAssetLookup.lookupPath(String)with fail in case of not found template. Here path may be direct url (which must be properly mapped to classpath) or just relative path to search within of registered locations.- Parameters:
path- static resource pathassets- assets resolution object- Returns:
- resource location path (first occurrence)
- Throws:
TemplateNotFoundException- if template not found
-
existsOrFail
Shortcut forAssetLookup.load(String)with fail in case of not found template.- Parameters:
path- path to check (absolute (/) or relative)assets- assets resolution object- Throws:
TemplateNotFoundException- if template not found
-