com.atlassian.confluence.pages.thumbnail
Interface ThumbnailManager

All Known Implementing Classes:
AbstractThumbnailManager, DelegatorThumbnailManager

public interface ThumbnailManager


Field Summary
static String THUMBNAIL_PATH_SUFFIX
           
 
Method Summary
 boolean checkToolkit()
          checks whether the users system has AWT toolkit required to create thumbnails
 int getMaxHeight()
           
 int getMaxWidth()
           
 Thumbnail getThumbnail(Attachment attachment)
          retrieves the thumbnail for this attachment in the form of a Thumbnail Object

this method also creates the actual thumbnail file on the filesystem if it does not exist

 InputStream getThumbnailData(Attachment attachment)
          retrieves the thumbnail data (as a stream) from where it was stored in the file system
 File getThumbnailFile(Attachment attachment)
          returns the path to the thumbnail for this attachment
 Collection getThumbnails(Collection attachments)
           
 boolean isThumbnailable(Attachment attachment)
          checks the mime type of the attachment to determine whether a thumbnail can be created from it
 

Field Detail

THUMBNAIL_PATH_SUFFIX

public static final String THUMBNAIL_PATH_SUFFIX
Method Detail

getThumbnails

public Collection getThumbnails(Collection attachments)
                         throws Exception
Throws:
Exception

isThumbnailable

public boolean isThumbnailable(Attachment attachment)
checks the mime type of the attachment to determine whether a thumbnail can be created from it

Parameters:
attachment -
Returns:

checkToolkit

public boolean checkToolkit()
checks whether the users system has AWT toolkit required to create thumbnails

Returns:

getThumbnailData

public InputStream getThumbnailData(Attachment attachment)
                             throws FileNotFoundException
retrieves the thumbnail data (as a stream) from where it was stored in the file system

Parameters:
attachment -
Returns:
Throws:
FileNotFoundException

getThumbnailFile

public File getThumbnailFile(Attachment attachment)
returns the path to the thumbnail for this attachment

Parameters:
attachment -
Returns:

getThumbnail

public Thumbnail getThumbnail(Attachment attachment)
                       throws MalformedURLException,
                              FileNotFoundException
retrieves the thumbnail for this attachment in the form of a Thumbnail Object

this method also creates the actual thumbnail file on the filesystem if it does not exist

Parameters:
attachment -
Returns:
Throws:
MalformedURLException
FileNotFoundException

getMaxHeight

public int getMaxHeight()
Returns:
the maximum height of the generated thumbnail

getMaxWidth

public int getMaxWidth()
Returns:
the maximum width of the generated thumbnail


Confluence is developed by Atlassian.