org.apache.tapestry.resource
Class ContextResourceLocation
java.lang.Object
|
+--org.apache.tapestry.resource.AbstractResourceLocation
|
+--org.apache.tapestry.resource.ContextResourceLocation
- All Implemented Interfaces:
- IResourceLocation
- public class ContextResourceLocation
- extends AbstractResourceLocation
Implementation of IResourceLocation
for resources found within the web application context.
- Since:
- 3.0
- Version:
- $Id: ContextResourceLocation.java,v 1.5 2003/06/29 18:05:41 mindbridge Exp $
- Author:
- Howard Lewis Ship
ContextResourceLocation
public ContextResourceLocation(ServletContext context,
String path)
ContextResourceLocation
public ContextResourceLocation(ServletContext context,
String path,
Locale locale)
getLocalization
public IResourceLocation getLocalization(Locale locale)
- Locates the resource using
LocalizedContextResourceFinder
and ServletContext.getResource(java.lang.String)
.- Following copied from interface:
org.apache.tapestry.IResourceLocation
- Parameters:
locale
- to localize for, or null for no localization.- Returns:
- a localized version of this resource, of null if the resource
itself does not exist.
getResourceURL
public URL getResourceURL()
- Description copied from interface:
IResourceLocation
- Returns a URL for the resource.
- Following copied from interface:
org.apache.tapestry.IResourceLocation
- Returns:
- the URL for the resource if it exists, or null if it does not
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
buildNewResourceLocation
protected IResourceLocation buildNewResourceLocation(String path)
- Overrides:
buildNewResourceLocation
in class AbstractResourceLocation