Class ImageThumbnailProvider
- java.lang.Object
-
- org.apache.sling.thumbnails.internal.providers.ImageThumbnailProvider
-
- All Implemented Interfaces:
ThumbnailProvider
public class ImageThumbnailProvider extends Object implements ThumbnailProvider
A thumbnail provider for image files.
-
-
Constructor Summary
Constructors Constructor Description ImageThumbnailProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplies(org.apache.sling.api.resource.Resource resource, String metaType)Returns true if the ThumbnailProvider applies for the specified resource.InputStreamgetThumbnail(org.apache.sling.api.resource.Resource resource)Get the thumbnail from the specified resource.
-
-
-
Method Detail
-
applies
public boolean applies(org.apache.sling.api.resource.Resource resource, String metaType)Description copied from interface:ThumbnailProviderReturns true if the ThumbnailProvider applies for the specified resource.- Specified by:
appliesin interfaceThumbnailProvider- Parameters:
resource- the resource to check. This resource should be a supported resource typemetaType- the meta type string found for the file based on it's resource type- Returns:
- true if this ThumbnailProvider will create a thumbnail for this resource, false otherwise
-
getThumbnail
public InputStream getThumbnail(org.apache.sling.api.resource.Resource resource)
Description copied from interface:ThumbnailProviderGet the thumbnail from the specified resource.- Specified by:
getThumbnailin interfaceThumbnailProvider- Parameters:
resource- the resource from which to retrieve the thumbnail- Returns:
- the thumbnail
-
-