Class ThumbnailManager
java.lang.Object
com.logicaldoc.core.document.thumbnail.ThumbnailManager
Manager class used to handle document thumbnails
- Since:
- 4.5
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createMobile
(Document document, String fileVersion, String sid) Creates the mobile image for the specified document and file version.void
createTile
(Document document, String fileVersion, String sid) Creates the tile for the specified document and file version.void
createTumbnail
(Document document, String sid) Creates the thumbnail for the specified documentvoid
createTumbnail
(Document document, String fileVersion, int size, Integer quality, String sid) Creates the thumbnail for the specified document and file version using given size and quality.void
createTumbnail
(Document document, String fileVersion, String sid) Creates the thumbnail for the specified document and file version.getBuilder
(String filename) Loads the proper builder for the passed file namevoid
init()
Initializes the builders mapvoid
-
Field Details
-
SUFFIX_PREVIEW
- See Also:
-
SUFFIX_TILE
- See Also:
-
THUMB
- See Also:
-
SUFFIX_THUMB
- See Also:
-
SUFFIX_MOBILE
- See Also:
-
-
Constructor Details
-
ThumbnailManager
public ThumbnailManager()
-
-
Method Details
-
createTumbnail
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 treatedfileVersion
- The file version(optional)sid
- The session identifier(optional)- Throws:
IOException
- in case an error happens during image creation
-
createTumbnail
Creates the thumbnail for the specified document- Parameters:
document
- The document to be treatedsid
- The session identifier (optional)- Throws:
IOException
- raised in case the thumbnail file cannot be created
-
createTumbnail
public void createTumbnail(Document document, String fileVersion, int size, Integer quality, String sid) throws IOException Creates the thumbnail for the specified document and file version using given size and quality. The thumbnail is an image rendering of the first page only.- Parameters:
document
- The document to be treatedfileVersion
- The file version(optional)size
- The thumbnail sizequality
- Compression quality(0..100, 100 is maximum quality). If not specified the standard thumbnail quality will be used.sid
- The session identifier(optional)- Throws:
IOException
- in case an error happens during image creation
-
createTile
Creates the tile for the specified document and file version. The tile is an image rendering of the first page only.- Parameters:
document
- The document to be treatedfileVersion
- The file version(optional)sid
- The session identifier(optional)- Throws:
IOException
- in case an error happens during image creation
-
createMobile
Creates the mobile image for the specified document and file version. The mobile is an image rendering of the first page only.- Parameters:
document
- The document to be treatedfileVersion
- The file version(optional)sid
- The session identifier(optional)- Throws:
IOException
- in case an error happens during image creation
-
getBuilder
Loads the proper builder for the passed file name- Parameters:
filename
- the filename to be rendered- Returns:
- the right thumbnail builder for the given file name
-
init
@PostConstruct public void init()Initializes the builders map -
getBuilders
-
setStore
-