com.primix.tapestry
Interface IAsset

All Known Implementing Classes:
PrivateAsset, ContextAsset, ExternalAsset

public interface IAsset

Representation of a asset (GIF, JPEG, etc.) that may be owned by a IComponent.

Assets may be completely external (i.e., on some other web site), contained by the ServletContext, or stored somewhere in the classpath.

In the latter two cases, the resource may be localized.

Version:
$Id: IAsset.java,v 1.5 2001/05/02 14:15:15 hship Exp $
Author:
Howard Ship

Method Summary
 java.lang.String buildURL(IRequestCycle cycle)
          Returns a URL for the asset, ready to be inserted into the output HTML.
 java.io.InputStream getResourceAsStream(IRequestCycle cycle)
          Accesses the localized version of the resource (if possible) and returns it as an input stream.
 

Method Detail

buildURL

public java.lang.String buildURL(IRequestCycle cycle)
Returns a URL for the asset, ready to be inserted into the output HTML. If the asset can be localized, the localized version (matching the Locale of the current page) is returned.

getResourceAsStream

public java.io.InputStream getResourceAsStream(IRequestCycle cycle)
                                        throws ResourceUnavailableException
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.