Skip navigation links
org.apache.myfaces.trinidad.resource
Class DynamicResourceLoader
java.lang.Object
org.apache.myfaces.trinidad.resource.ResourceLoader
org.apache.myfaces.trinidad.resource.DynamicResourceLoader
- Direct Known Subclasses:
- AggregatingResourceLoader, StringContentResourceLoader
-
public abstract class DynamicResourceLoader
- extends ResourceLoader
A Dynamic Resource Loader that is capable of agregation and dynamic content via custom URLConnection objects.
| Method Summary |
protected java.net.URL |
findResource(java.lang.String path)
Finds a resource. |
protected abstract java.net.URL |
getURL(java.lang.String path)
Returns a URL to this resource. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DynamicResourceLoader
public DynamicResourceLoader(java.lang.String path)
- Creates a DynamicResourceLoader for a specified path. The dynamic resource loader will only respond to the specified path when findResource is executed with the same path. If it is not the same, findResource will TRY to redirect the request to the parent if one is provided. The parent ResourceLoader for this constructor is
null
- Parameters:
path - the path that this ResourceLoader will respond to
DynamicResourceLoader
public DynamicResourceLoader(java.lang.String path,
ResourceLoader parent)
- Creates a CompositeResouceLoader for a specified path. The dynamic resource loader will only respond to the specified path when findResource is executed with the same path. If it is not the same, findResource will TRY to redirect the request to the parent if one is provided.
- Parameters:
path - the path that this ResourceLoader will respond to
parent - the parent resource loader
findResource
protected java.net.URL findResource(java.lang.String path)
throws java.io.IOException
- Finds a resource. If the path does not match the path that this object was constructed with then it will direct the request to the base ResourceLoader. If the path is the same, it calls the getURL method.
-
- Overrides:
findResource in class ResourceLoader
-
- Parameters:
path - the path which the ResourceLoader is looking for.
- Returns:
- a URL for this resource
- Throws:
java.io.IOException - when something bad happens
getURL
protected abstract java.net.URL getURL(java.lang.String path)
throws java.io.IOException
- Returns a URL to this resource. This URL should have a valid connection.'
-
- Parameters:
path - the path of the findResourceCall
- Returns:
- a url for this Resource
- Throws:
java.io.IOException - when something bad happens
Skip navigation links
Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.