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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateMobile(Document document, String sid) Creates the mobile image for the specified document.voidcreateMobile(Document document, String fileVersion, String sid) Creates the mobile image for the specified document and file version.voidcreateTile(Document document, String sid) Creates the tile for the specified documentvoidcreateTile(Document document, String fileVersion, String sid) Creates the tile for the specified document and file version.voidcreateTumbnail(Document document, String sid) Creates the thumbnail for the specified documentvoidcreateTumbnail(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.voidcreateTumbnail(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 namevoidinit()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
-
createTile
Creates the tile for the specified document- Parameters:
document- The document to be treatedsid- The session identifier (optional)- Throws:
IOException- raised in case the tile file cannot be created
-
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
-
createMobile
Creates the mobile image for the specified document. The mobile is an image rendering of the first page only.- Parameters:
document- The document to be treatedsid- 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
-