public class ImagingBasedAssetRenderer extends Object implements info.magnolia.dam.api.AssetRenderer
ImagingSupport
to generate renditions.ImagingSupport
Modifier and Type | Class and Description |
---|---|
protected static class |
ImagingBasedAssetRenderer.AssetRenditionException
DamException thrown when an error occurs while rendering an
AssetRendition . |
Constructor and Description |
---|
ImagingBasedAssetRenderer(javax.inject.Provider<info.magnolia.module.site.Site> siteProvider,
info.magnolia.module.site.functions.SiteFunctions siteFunctions,
info.magnolia.imaging.ImagingSupport imagingSupport) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRender(info.magnolia.dam.api.Asset asset,
com.google.common.net.MediaType to)
Checks if the provided
Asset and the MediaType can
be rendered by this AssetRenderer . |
info.magnolia.dam.api.AssetRendition |
render(info.magnolia.dam.api.Asset asset,
com.google.common.net.MediaType to,
String renditionName)
Renders an
AssetRendition fo the provided Asset . |
boolean |
supports(com.google.common.net.MediaType from,
com.google.common.net.MediaType to)
Checks if the provided
MediaType s are supported by this
AssetRenderer . |
@Inject public ImagingBasedAssetRenderer(javax.inject.Provider<info.magnolia.module.site.Site> siteProvider, info.magnolia.module.site.functions.SiteFunctions siteFunctions, info.magnolia.imaging.ImagingSupport imagingSupport)
public boolean supports(com.google.common.net.MediaType from, com.google.common.net.MediaType to)
MediaType
s are supported by this
AssetRenderer
.supports
in interface info.magnolia.dam.api.AssetRenderer
public boolean canRender(info.magnolia.dam.api.Asset asset, com.google.common.net.MediaType to)
Asset
and the MediaType
can
be rendered by this AssetRenderer
.canRender
in interface info.magnolia.dam.api.AssetRenderer
supports(com.google.common.net.MediaType, com.google.common.net.MediaType)
public info.magnolia.dam.api.AssetRendition render(info.magnolia.dam.api.Asset asset, com.google.common.net.MediaType to, String renditionName)
AssetRendition
fo the provided Asset
.render
in interface info.magnolia.dam.api.AssetRenderer
Copyright © 2017 Magnolia International Ltd.. All rights reserved.