org.apache.tapestry.asset
Class ContextAssetFactory
java.lang.Object
org.apache.tapestry.asset.ContextAssetFactory
- All Implemented Interfaces:
- AssetFactory
- public class ContextAssetFactory
- extends java.lang.Object
- implements AssetFactory
For the moment, all "context:" prefixed asset paths are interpreted relative to the web context
(the web application's root folder).
- Since:
- 4.0
- Author:
- Howard M. Lewis Ship
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextAssetFactory
public ContextAssetFactory()
initializeService
public void initializeService()
createAsset
public IAsset createAsset(org.apache.hivemind.Resource baseResource,
java.lang.String path,
java.util.Locale locale,
org.apache.hivemind.Location location)
- Description copied from interface:
AssetFactory
- Creates the new asset.
- Specified by:
createAsset
in interface AssetFactory
- Parameters:
baseResource
- the base resource from which an asset path may be calculated. Each type of asset
is linked to a particular implemenation of Resource
, and generates a
corresponding implementation of IAsset
.path
- the path relative to the resource (if no leading slash), or an absolute path
within the domain of the asset type (i.e, within the classpath, or within the web
application).locale
- the desired locale of the asset; the closest match will be used.location
- the location to be associated with the returned asset.
setContext
public void setContext(WebContext context)
setContextPath
public void setContextPath(java.lang.String contextPath)