org.zkoss.web.util.resource
Class ResourceCaches
java.lang.Object
org.zkoss.web.util.resource.ResourceCaches
public class ResourceCaches
- extends Object
Utilities to load (and parse) the Servlet resource.
Notice that ResourceCache and ResourceLoader
must be used rather than
ResourceCache
and Loader.
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, javax.servlet.ServletContext, java.lang.String, java.lang.Object) to load the resource.
- Author:
- tomyeh
|
Method Summary |
static
|
get(ResourceCache<V> cache,
javax.servlet.ServletContext ctx,
String path,
Object extra)
Loads, parses and returns the resource of the specified URI,
or null if not found. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceCaches
public ResourceCaches()
get
public static final <V> V get(ResourceCache<V> cache,
javax.servlet.ServletContext ctx,
String path,
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
in
ResourceCache.
- Parameters:
cache - the resource cache.
Note: its loader must extend from ResourceLoader.path - the URI pathextra - the extra parameter that will be passed to
ResourceLoader.parse(String,File,Object) and
ResourceLoader.parse(String,URL,Object)
Copyright © 2015. All rights reserved.