|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.services.AssetSourceImpl
public class AssetSourceImpl
Constructor Summary | |
---|---|
AssetSourceImpl(ThreadLocale threadLocale,
Map<String,AssetFactory> configuration,
SymbolSource symbolSource)
|
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 AssetSource.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssetSourceImpl(ThreadLocale threadLocale, Map<String,AssetFactory> configuration, SymbolSource symbolSource)
Method Detail |
---|
public Asset getClasspathAsset(String path)
AssetSource
ThreadLocale
service).
getClasspathAsset
in interface AssetSource
path
- relative to the classpath root
public Asset getClasspathAsset(String path, Locale locale)
AssetSource
getClasspathAsset
in interface AssetSource
path
- path to the base resource, relative to classpath rootlocale
- to localize the resource to
public Asset getContextAsset(String path, Locale locale)
AssetSource
getContextAsset
in interface AssetSource
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
public Asset getAsset(Resource baseResource, String path, Locale locale)
AssetSource
getAsset
in interface AssetSource
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
public Resource resourceForPath(String path)
AssetSource
resourceForPath
in interface AssetSource
path
- to the resource to provide as an Asset
public Asset getExpandedAsset(String path)
AssetSource
AssetSource.getUnlocalizedAsset(String)
, but symbols
in the path are expanded.
getExpandedAsset
in interface AssetSource
public Asset getUnlocalizedAsset(String path)
AssetSource
getUnlocalizedAsset
in interface AssetSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |