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 243791 2004-02-19 17:38:13Z hlship $
- 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)
.
- 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.
- 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)
- Specified by:
buildNewResourceLocation
in class AbstractResourceLocation