org.apache.tapestry
Interface Asset


public interface Asset

An Asset is any kind of resource that can be exposed to the client web browser. Although quite often an Asset is a resource in a web application's context folder, within Tapestry, Assets may also be resources on the classpath (i.e., packaged inside JARs).

An Asset's toString() will return the URL for the resource (the same value as toClientURL()).


Method Summary
 Resource getResource()
          Returns the underlying Resource for the Asset.
 String toClientURL()
          Returns a URL that can be passed, unchanged, to the client in order for it to access the resource.
 

Method Detail

toClientURL

String toClientURL()
Returns a URL that can be passed, unchanged, to the client in order for it to access the resource. The same value is returned from toString().

Note that the returned value may be request dependent. You may cache instances of Asset, but do not cache the client URL path as it may change.


getResource

Resource getResource()
Returns the underlying Resource for the Asset.



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.