public class AssetSourceImpl extends java.lang.Object implements AssetSource
AssetSourceservice interface.| Constructor and Description |
|---|
AssetSourceImpl() |
| Modifier and Type | Method and Description |
|---|---|
IAsset |
findAsset(org.apache.hivemind.Resource base,
java.lang.String path,
java.util.Locale locale,
org.apache.hivemind.Location location)
Finds an asset relative to some existing resource (typically, a page, component or library
specification).
|
void |
initializeService() |
void |
setContributions(java.util.List contributions)
List of
AssetFactoryContribution. |
void |
setDefaultAssetFactory(AssetFactory defaultAssetFactory)
Factory used when an unrecognized prefix (typically, an arbitrary URL's scheme) is provided.
|
void |
setLookupAssetFactory(AssetFactory lookupAssetFactory)
Factory used when the path has no prefix, and the type of asset must be inferred from the
type of resource.
|
public AssetSourceImpl()
public void initializeService()
public IAsset findAsset(org.apache.hivemind.Resource base, java.lang.String path, java.util.Locale locale, org.apache.hivemind.Location location)
AssetSourcefindAsset in interface AssetSourcebase - the base resource used for resolving the assetpath - the path relative to the base resource; alternately, the path may include a prefix
that defines a domain (such as "classpath:" or "context:") in which case the base
resource is ignored and the resource resolved within that domainlocale - used to find a localized version of the asset, may be null to indicate no
localizationlocation - used to report errors (such as missing resources)public void setLookupAssetFactory(AssetFactory lookupAssetFactory)
public void setContributions(java.util.List contributions)
AssetFactoryContribution.public void setDefaultAssetFactory(AssetFactory defaultAssetFactory)