Class ThumbnailManager
- java.lang.Object
-
- com.logicaldoc.core.document.thumbnail.ThumbnailManager
-
public class ThumbnailManager extends Object
Manager class used to handle document thumbnails- Since:
- 4.5
- Author:
- Marco Meschieri - LogicalDOC
-
-
Field Summary
Fields Modifier and Type Field Description static String
SUFFIX_PREVIEW
static String
SUFFIX_THUMB
static String
SUFFIX_TILE
-
Constructor Summary
Constructors Constructor Description ThumbnailManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, String sid)
Creates the thumbnail for the specified document and file version.ThumbnailBuilder
getBuilder(String filename)
Loads the proper builder for the passed file nameMap<String,ThumbnailBuilder>
getBuilders()
void
setStorer(Storer storer)
-
-
-
Field Detail
-
SUFFIX_PREVIEW
public static final String SUFFIX_PREVIEW
- See Also:
- Constant Field Values
-
SUFFIX_TILE
public static final String SUFFIX_TILE
- See Also:
- Constant Field Values
-
SUFFIX_THUMB
public static final String SUFFIX_THUMB
- See Also:
- Constant Field Values
-
-
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 treatedfileVersion
- 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 treatedfileVersion
- 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 treatedsid
- 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:
filename
- the filename to be rendered- Returns:
- the right thumbnail builder for the given file name
-
getBuilders
public Map<String,ThumbnailBuilder> getBuilders()
-
setStorer
public void setStorer(Storer storer)
-
-