Interface ThumbnailProvider
-
- All Known Implementing Classes:
ImageThumbnailProvider,PdfThumbnailProvider,SlideShowThumbnailProvider,TikaFallbackProvider
@ConsumerType public interface ThumbnailProviderService for retrieving a thumbnail for the specified Resource.
-
-
Method Summary
All Methods Instance Methods Abstract 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
boolean applies(org.apache.sling.api.resource.Resource resource, String metaType)Returns true if the ThumbnailProvider applies for the specified resource.- 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
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
-
-