| org.apache.tapestry.services.AssetSource
All known Subclasses: org.apache.tapestry.internal.services.AssetSourceImpl,
AssetSource | public interface AssetSource (Code) | | Used to find or create an
Asset with a given path.
|
findAsset | Asset findAsset(Resource baseResource, String path, Locale locale)(Code) | | Finds the asset. The path may either be a simple file name or a relative path (relative to
the base resource) or it may have a prefix, such as "context:" or "classpath:", in
which case it is treated as a complete path within the indicated domain. The resulting
Resource is then localized (to the provided Locale) and returned as an Asset.
The AssetSource caches its results, so a single Asset instance may be shared among many
different components.
Parameters: baseResource - base resource for computing relative paths, or null to search the classpath Parameters: path - relative to the base resource Parameters: locale - locale to localize the final resource to, or null for the thread's current locale the asset |
getClasspathAsset | Asset getClasspathAsset(String path, Locale locale)(Code) | | Convienience for finding assets on the classpath.
Parameters: path - path to the base resource, relative to classpath root Parameters: locale - to localize the resource to the asset |
getClasspathAsset | Asset getClasspathAsset(String path)(Code) | | Obtains a classpath alias in the current locale (as defined by the
ThreadLocale service).
Parameters: path - the asset |
|
|