org.apache.tapestry.asset
Interface AssetExternalizer

All Known Implementing Classes:
AssetExternalizerImpl

public interface AssetExternalizer

Note: This was a class prior to 4.0, at which point it was split into a service interface and a service implementation.

Since:
4.0
Author:
Howard M. Lewis Ship

Method Summary
 java.lang.String getURL(java.lang.String resourcePath)
          Gets the URL to a private resource.
 

Method Detail

getURL

public java.lang.String getURL(java.lang.String resourcePath)
Gets the URL to a private resource. If the resource was previously copied out of the classpath, the previously generated URL is returned.

If the asset directory and URL are not configured, then returns null.

Otherwise, the asset is copied out to the asset directory, the URL is constructed (and recorded for later) and the URL is returned.

This method is not explicitly synchronized but should work multi-threaded. It synchronizes on the internal Map used to map resource paths to URLs.

Parameters:
resourcePath - The full path of the resource within the classpath. This is expected to include a leading slash. For example: /com/skunkworx/Banner.gif.