public class NoOpAssetRenderer extends Object implements info.magnolia.dam.api.AssetRenderer
AssetRenderer
which does nothing to the Asset (i.e returns an AssetRendition
which just delegates
to the original asset, but can configured to support only certain mimetypes.
It can thus be configured to "bypass" other renderers for certain types.Constructor and Description |
---|
NoOpAssetRenderer() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRender(info.magnolia.dam.api.Asset asset,
com.google.common.net.MediaType to) |
List<com.google.common.net.MediaType> |
getMediaTypes() |
List<com.google.common.net.MediaType> |
getOutputMediaTypes() |
info.magnolia.dam.api.AssetRendition |
render(info.magnolia.dam.api.Asset asset,
com.google.common.net.MediaType to,
String renditionName) |
void |
setMediaTypes(List<com.google.common.net.MediaType> mediaTypes) |
void |
setOutputMediaTypes(List<com.google.common.net.MediaType> outputMediaTypes) |
boolean |
supports(com.google.common.net.MediaType from,
com.google.common.net.MediaType to)
This
AssetRenderer will support any MediaType if no
particular type is configured for getMediaTypes() or getOutputMediaTypes() . |
public boolean supports(com.google.common.net.MediaType from, com.google.common.net.MediaType to)
AssetRenderer
will support any MediaType
if no
particular type is configured for getMediaTypes()
or getOutputMediaTypes()
. If one specifies
either one or the other of the before mentioned and they match given from
or to
,
supports(com.google.common.net.MediaType, com.google.common.net.MediaType)
will return true.supports
in interface info.magnolia.dam.api.AssetRenderer
public boolean canRender(info.magnolia.dam.api.Asset asset, com.google.common.net.MediaType to)
canRender
in interface info.magnolia.dam.api.AssetRenderer
public info.magnolia.dam.api.AssetRendition render(info.magnolia.dam.api.Asset asset, com.google.common.net.MediaType to, String renditionName)
render
in interface info.magnolia.dam.api.AssetRenderer
public List<com.google.common.net.MediaType> getMediaTypes()
public void setMediaTypes(List<com.google.common.net.MediaType> mediaTypes)
public List<com.google.common.net.MediaType> getOutputMediaTypes()
public void setOutputMediaTypes(List<com.google.common.net.MediaType> outputMediaTypes)
Copyright © 2015 Magnolia International Ltd.. All rights reserved.