Interface ThumbnailProvider

    • 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