public interface AssetProviderRegistry
AssetProvider
s.Modifier and Type | Interface and Description |
---|---|
static class |
AssetProviderRegistry.NoSuchAssetProviderException
Thrown when no
AssetProvider can be found for the given ItemKey or String id. |
static class |
AssetProviderRegistry.NoSuchAssetRendererException
Thrown when no
AssetRenderer can be found for the given Asset to be converted to the given MediaType . |
Modifier and Type | Method and Description |
---|---|
Iterator<AssetProvider> |
getAllProviders() |
AssetProvider |
getProviderById(String providerId) |
AssetProvider |
getProviderFor(ItemKey itemKey)
TODO The below is currently not implemented/implementable, we'd need a canHandle(ItemKey) method on providers
Returns the first provider that declares it can handle this key.
|
Iterator<AssetProvider> |
getProvidersFor(com.google.common.net.MediaType... mediaTypes)
Returns a Iterator of
AssetProvider that support the requested mediaTypes; returns an empty Iterator
if none. |
AssetRenderer |
getRendererFor(Asset asset,
com.google.common.net.MediaType to)
Returns an appropriate
AssetRenderer , or null if there is none. |
Iterator<AssetProvider> getAllProviders()
Iterator<AssetProvider> getProvidersFor(com.google.common.net.MediaType... mediaTypes)
AssetProvider
that support the requested mediaTypes; returns an empty Iterator
if none.
TODO - getProviders(Predicate) instead ? (might have a predicate for metadata...)AssetProvider getProviderFor(ItemKey itemKey) throws AssetProviderRegistry.NoSuchAssetProviderException
AssetProvider getProviderById(String providerId) throws AssetProviderRegistry.NoSuchAssetProviderException
AssetRenderer getRendererFor(Asset asset, com.google.common.net.MediaType to) throws AssetProviderRegistry.NoSuchAssetRendererException
AssetRenderer
, or null if there is none. First checks if the asset's provider
has a specific AssetRenderer, and if not checks in a "global" registry.Copyright © 2015 Magnolia International Ltd.. All rights reserved.