|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@UsesMappedConfiguration(value=AssetFactory.class) public interface AssetSource
Used to find or create an Asset
with a given path.
AssetFactory.createAsset(org.apache.tapestry5.ioc.Resource)
return an instance
of Asset2
.
Method Summary | |
---|---|
Asset |
getAsset(Resource baseResource,
String path,
Locale locale)
Finds the asset. |
Asset |
getClasspathAsset(String path)
Obtains a classpath alias in the current locale (as defined by the ThreadLocale service). |
Asset |
getClasspathAsset(String path,
Locale locale)
Convienience for finding assets on the classpath. |
Asset |
getContextAsset(String path,
Locale locale)
Convienience for finding assets in the context. |
Asset |
getExpandedAsset(String path)
As with getUnlocalizedAsset(String) , but symbols
in the path are expanded. |
Asset |
getUnlocalizedAsset(String path)
Find an asset but does not attempt to localize it. |
Resource |
resourceForPath(String path)
Finds the asset, either on the classpath or (if prefixed), within the indicated domain. |
Method Detail |
---|
Asset getAsset(Resource baseResource, String path, Locale locale)
baseResource
- base resource for computing relative paths, or null to search the classpathpath
- relative to the base resourcelocale
- locale to localize the final resource to, or null for the thread's current locale
RuntimeException
- if the asset can not be foundResource resourceForPath(String path)
path
- to the resource to provide as an Asset
Asset getClasspathAsset(String path, Locale locale)
path
- path to the base resource, relative to classpath rootlocale
- to localize the resource to
RuntimeException
- if the asset can not be foundAsset getContextAsset(String path, Locale locale)
path
- path relative to the base resource (the context root)locale
- to localize the resource to, or null for the locale for the current request
RuntimeException
- if the asset can not be foundAsset getClasspathAsset(String path)
ThreadLocale
service).
path
- relative to the classpath root
RuntimeException
- if the asset can not be foundAsset getUnlocalizedAsset(String path)
RuntimeException
- if the asset can not be foundAsset getExpandedAsset(String path)
getUnlocalizedAsset(String)
, but symbols
in the path are expanded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |