com.primix.tapestry.asset
Class PrivateAsset

java.lang.Object
  |
  +--com.primix.tapestry.asset.PrivateAsset
All Implemented Interfaces:
IAsset

public class PrivateAsset
extends java.lang.Object
implements IAsset

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,v 1.10 2001/08/07 20:12:27 hship Exp $
Author:
Howard Ship

Constructor Summary
PrivateAsset(java.lang.String resourcePath)
           
 
Method Summary
 java.lang.String buildURL(IRequestCycle cycle)
          Gets the localized version of the resource.
 java.io.InputStream getResourceAsStream(IRequestCycle cycle)
          Accesses the localized version of the resource (if possible) and returns it as an input stream.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrivateAsset

public PrivateAsset(java.lang.String resourcePath)
Method Detail

buildURL

public java.lang.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.
Specified by:
buildURL in interface IAsset

getResourceAsStream

public java.io.InputStream getResourceAsStream(IRequestCycle cycle)
                                        throws ResourceUnavailableException
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.
Specified by:
getResourceAsStream in interface IAsset

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object