Class ThumbnailManager


  • public class ThumbnailManager
    extends Object
    Manager class used to handle document thumbnails
    Since:
    4.5
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • ThumbnailManager

        public ThumbnailManager()
    • Method Detail

      • createTumbnail

        public void createTumbnail​(Document document,
                                   String fileVersion,
                                   String sid)
                            throws IOException
        Creates the thumbnail for the specified document and file version. The thumbnail is an image rendering of the first page only.
        Parameters:
        document - The document to be treated
        fileVersion - The file version(optional)
        sid - The session identifier(optional)
        Throws:
        IOException - in case an error happens during image creation
      • createTile

        public void createTile​(Document document,
                               String fileVersion,
                               String sid)
                        throws IOException
        Creates the tile for the specified document and file version. The thumbnail is an image rendering of the first page only.
        Parameters:
        document - The document to be treated
        fileVersion - The file version(optional)
        sid - The session identifier(optional)
        Throws:
        IOException - in case an error happens during image creation
      • createTumbnail

        public void createTumbnail​(Document document,
                                   String sid)
                            throws IOException
        Creates the thumbnail for the specified document
        Parameters:
        document - The document to be treated
        sid - The session identifier (optional)
        Throws:
        IOException - raised in case the thumbnail file cannot be created
      • getBuilder

        public ThumbnailBuilder getBuilder​(String filename)
        Loads the proper builder for the passed file name
        Parameters:
        file - name the filename to be rendered
        Returns:
        the right thumbnail builder for the given file name
      • setStorer

        public void setStorer​(Storer storer)