|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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)
AssetSourceThreadLocale service).
getClasspathAsset in interface AssetSourcepath - relative to the classpath root
public Asset getClasspathAsset(String path,
Locale locale)
AssetSource
getClasspathAsset in interface AssetSourcepath - 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 AssetSourcepath - 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 AssetSourcebaseResource - 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 AssetSourcepath - to the resource to provide as an Asset
public Asset getExpandedAsset(String path)
AssetSourceAssetSource.getUnlocalizedAsset(String), but symbols
in the path are expanded.
getExpandedAsset in interface AssetSourcepublic 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 | |||||||||