|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidad.resource.ResourceLoader
org.apache.myfaces.trinidad.resource.RegexResourceLoader
public class RegexResourceLoader
A resource loader implementation which loads resources by pattern matching the requested resource path to a registered resource loader. Change history 2006-08-01: -= Simon Lessard =- Changed to use a list of entry rather than a dual typed one to add more type safety with minimal memory overhaul and get a really small performance gain.
Constructor Summary | |
---|---|
RegexResourceLoader()
Creates a new RegexResourceLoader. |
Method Summary | |
---|---|
protected void |
deregister(String regex)
Deregisters a resource loader by regular expression. |
protected URL |
findResource(String path)
Finds the resource with the given name. |
protected void |
register(String regex,
ResourceLoader loader)
Registers a resource loader by regular expression. |
Methods inherited from class org.apache.myfaces.trinidad.resource.ResourceLoader |
---|
getContentType, getContentType, getNullResourceLoader, getParent, getResource, isCachable, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RegexResourceLoader()
Method Detail |
---|
protected URL findResource(String path) throws IOException
ResourceLoader
findResource
in class ResourceLoader
path
- The resource name
IOException
protected void register(String regex, ResourceLoader loader)
regex
- the regular expression to matchloader
- the resource loader to use for matching pathsprotected void deregister(String regex)
regex
- the regular expression to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |