JcrPreviewProvider
.@Deprecated public class DefaultImageProvider extends AbstractImageProvider
ImageProvider
provides portrait or thumbnail images for JCR-based content.
It expects a given Node to have a binary sub-node named according to ImageProviderDefinition.getOriginalImageNodeName()
,
and will only resolve images when the binary is of mime-type image/*.
It also relies on imaging module to generate and store the preview images.
ImageProviderDefinition
Modifier and Type | Field and Description |
---|---|
String |
ICON_CLASS_DEFAULT
Deprecated.
since 5.4.3, not used anymore; default icon for unknown type is provided by
AbstractImageProvider.resolveIconClassName(String) . |
PORTRAIT_GENERATOR, THUMBNAIL_GENERATOR
Constructor and Description |
---|
DefaultImageProvider(ImageProviderDefinition definition,
ContentConnector contentConnector)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getGeneratorImagePath(String workspace,
javax.jcr.Node node,
String generator)
Deprecated.
Since 5.4.3, implement
resolveImagePath(Item, String) instead. Also consider extending AbstractImageProvider . |
protected javax.jcr.Node |
getImageNode(javax.jcr.Node node)
Deprecated.
|
protected String |
resolveImagePath(com.vaadin.v7.data.Item item,
String generator)
Deprecated.
Resolves the link to a preview image for the given content and
ImageGenerator . |
protected Object |
resolveImageResource(com.vaadin.v7.data.Item item,
String generator)
Deprecated.
Resolves the image
Resource or icon class name, as expected by AbstractImageProvider.getThumbnailResource(Object, String) . |
getPortraitPath, getThumbnailPath, getThumbnailResource, isImage, resolveIconClassName
@Deprecated public final String ICON_CLASS_DEFAULT
AbstractImageProvider.resolveIconClassName(String)
.@Inject public DefaultImageProvider(ImageProviderDefinition definition, ContentConnector contentConnector)
protected String resolveImagePath(com.vaadin.v7.data.Item item, String generator)
AbstractImageProvider
ImageGenerator
.resolveImagePath
in class AbstractImageProvider
ImageProvider.getPortraitPath(Object)
,
ImageProvider.getThumbnailPath(Object)
@Deprecated protected String getGeneratorImagePath(String workspace, javax.jcr.Node node, String generator)
resolveImagePath(Item, String)
instead. Also consider extending AbstractImageProvider
.protected Object resolveImageResource(com.vaadin.v7.data.Item item, String generator)
AbstractImageProvider
Resource
or icon class name, as expected by AbstractImageProvider.getThumbnailResource(Object, String)
.resolveImageResource
in class AbstractImageProvider
ImageProvider.getThumbnailResource(Object, String)
protected javax.jcr.Node getImageNode(javax.jcr.Node node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Copyright © 2020 Magnolia International Ltd.. All rights reserved.