org.apache.tapestry.asset
Class PrivateAsset

java.lang.Object
  extended by org.apache.tapestry.asset.AbstractAsset
      extended by org.apache.tapestry.asset.PrivateAsset
All Implemented Interfaces:
IAsset, ILocatable

public class PrivateAsset
extends AbstractAsset

An implementation of IAsset for localizable assets within the JVM's classpath.

The localization code here is largely cut-and-paste from ContextAsset.

Version:
$Id: PrivateAsset.java 244167 2005-03-17 08:14:54Z pferraro $
Author:
Howard Ship

Constructor Summary
PrivateAsset(ClasspathResourceLocation resourceLocation, ILocation location)
           
 
Method Summary
 String buildURL(IRequestCycle cycle)
          Gets the localized version of the resource.
 InputStream getResourceAsStream(IRequestCycle cycle)
          Accesses the localized version of the resource (if possible) and returns it as an input stream.
 
Methods inherited from class org.apache.tapestry.asset.AbstractAsset
getLocation, getResourceLocation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrivateAsset

public PrivateAsset(ClasspathResourceLocation resourceLocation,
                    ILocation location)
Method Detail

buildURL

public String buildURL(IRequestCycle cycle)
Gets the localized version of the resource. Build the URL for the resource. If possible, the application's AssetExternalizer is located, to copy the resource to a directory visible to the web server.


getResourceAsStream

public InputStream getResourceAsStream(IRequestCycle cycle)
Description copied from interface: IAsset
Accesses the localized version of the resource (if possible) and returns it as an input stream. A version of the resource localized to the current page is returned.