Package org.apache.sling.cms.transformer
Interface ThumbnailProvider
-
- All Known Implementing Classes:
ImageThumbnailProvider
,PdfThumbnailProvider
,SlideShowThumbnailProvider
,TikaFallbackProvider
public interface ThumbnailProvider
Service for retrieving a thumbnail for the specified Resource.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
applies(org.apache.sling.api.resource.Resource resource)
Returns true if the ThumbnailProvider applies for the specified resource.InputStream
getThumbnail(org.apache.sling.api.resource.Resource resource)
Get the thumbnail from the specified resource.
-
-
-
Method Detail
-
applies
boolean applies(org.apache.sling.api.resource.Resource resource)
Returns true if the ThumbnailProvider applies for the specified resource.- Parameters:
resource
- the resource to check- Returns:
- true if this ThumbnailProvider will create a thumbnail for this resource, false otherwise
-
getThumbnail
InputStream getThumbnail(org.apache.sling.api.resource.Resource resource) throws IOException
Get the thumbnail from the specified resource.- Parameters:
resource
- the resource from which to retrieve the thumbnail- Returns:
- the thumbnail
- Throws:
IOException
- an exception occurs retrieving the thumbnail
-
-