Package org.zkoss.web.util.resource
Class ResourceCaches
- java.lang.Object
-
- org.zkoss.web.util.resource.ResourceCaches
-
public class ResourceCaches extends java.lang.ObjectUtilities to load (and parse) the Servlet resource. Notice thatResourceCacheandResourceLoadermust be used rather thanResourceCacheandLoader.Usage:
- Implements a loader by extending from
ResourceLoader. - Creates a resource cache (
ResourceCache) by use of the loader in the previous step. - Invoke
get(org.zkoss.web.util.resource.ResourceCache<V>, jakarta.servlet.ServletContext, java.lang.String, java.lang.Object)to load the resource.
- Author:
- tomyeh
- Implements a loader by extending from
-
-
Constructor Summary
Constructors Constructor Description ResourceCaches()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> Vget(ResourceCache<V> cache, jakarta.servlet.ServletContext ctx, java.lang.String path, java.lang.Object extra)Loads, parses and returns the resource of the specified URI, or null if not found.
-
-
-
Method Detail
-
get
public static final <V> V get(ResourceCache<V> cache, jakarta.servlet.ServletContext ctx, java.lang.String path, java.lang.Object extra)
Loads, parses and returns the resource of the specified URI, or null if not found. The parser is defined by the loader defined inResourceCache.- Parameters:
cache- the resource cache. Note: its loader must extend fromResourceLoader.path- the URI pathextra- the extra parameter that will be passed toResourceLoader.parse(String,File,Object)andResourceLoader.parse(String,URL,Object)
-
-