@Deprecated public abstract class AbstractImageProvider extends Object implements ImageProvider
ImageProvider
covers resolution of icon class names from the Magnolia icon-font,
as well as "translating" arbitrary itemIds to proper Vaadin Items
, through the ContentConnector
.DefaultImageProvider
PORTRAIT_GENERATOR, THUMBNAIL_GENERATOR
Modifier | Constructor and Description |
---|---|
protected |
AbstractImageProvider(ContentConnector contentConnector)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
getPortraitPath(Object itemId)
Deprecated.
|
String |
getThumbnailPath(Object itemId)
Deprecated.
|
Object |
getThumbnailResource(Object itemId,
String generator)
Deprecated.
Gets an image preview for the content represented by the given itemId.
|
protected boolean |
isImage(String mimeType)
Deprecated.
|
String |
resolveIconClassName(String mimeType)
Deprecated.
Gets an icon class name for the given media type.
|
protected abstract 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 abstract Object |
resolveImageResource(com.vaadin.v7.data.Item item,
String generator)
Deprecated.
Resolves the image
Resource or icon class name, as expected by getThumbnailResource(Object, String) . |
protected AbstractImageProvider(ContentConnector contentConnector)
protected abstract Object resolveImageResource(com.vaadin.v7.data.Item item, String generator)
Resource
or icon class name, as expected by getThumbnailResource(Object, String)
.protected abstract String resolveImagePath(com.vaadin.v7.data.Item item, String generator)
ImageGenerator
.public String getPortraitPath(Object itemId)
getPortraitPath
in interface ImageProvider
public String getThumbnailPath(Object itemId)
getThumbnailPath
in interface ImageProvider
public Object getThumbnailResource(Object itemId, String generator)
ImageProvider
getThumbnailResource
in interface ImageProvider
itemId
- the id of an Item
generator
- the name of a registered ImageGenerator
of the imaging moduleResource
or a String corresponding to an icon class namepublic String resolveIconClassName(String mimeType)
ImageProvider
resolveIconClassName
in interface ImageProvider
mimeType
- a MIME typeprotected boolean isImage(String mimeType)
Copyright © 2020 Magnolia International Ltd.. All rights reserved.