com.atlassian.confluence.pages.thumbnail
Interface ThumbnailManager

All Known Implementing Classes:
DefaultThumbnailManager

public interface ThumbnailManager


Field Summary
static java.lang.String THUMBNAIL_PATH_SUFFIX
           
 
Method Summary
 boolean checkToolkit()
          checks whether the users system has AWT toolkit required to create thumbnails
 int getMaxHeight()
           
 int getMaxWidth()
           
 com.atlassian.core.util.thumbnail.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

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

Field Detail

THUMBNAIL_PATH_SUFFIX

static final java.lang.String THUMBNAIL_PATH_SUFFIX
Method Detail

getThumbnails

java.util.Collection getThumbnails(java.util.Collection attachments)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

isThumbnailable

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

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

Returns:

getThumbnailData

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

Parameters:
attachment -
Returns:
Throws:
java.io.FileNotFoundException

getThumbnailFile

java.io.File getThumbnailFile(Attachment attachment)
returns the path to the thumbnail for this attachment

Parameters:
attachment -
Returns:

removeThumbnail

boolean removeThumbnail(Attachment attachment)
Removes the thumbnail for the specified attachment.

Returns:
true if the thumbnail was found and was successfully removed. False if no thumbnail was found or the thumbnail could not be removed.

getThumbnail

com.atlassian.core.util.thumbnail.Thumbnail getThumbnail(Attachment attachment)
                                                         throws java.net.MalformedURLException,
                                                                java.io.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:
java.net.MalformedURLException
java.io.FileNotFoundException

getMaxHeight

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

getMaxWidth

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

isThumbnailable

boolean isThumbnailable(ThumbnailInfo info)

isThumbnailable

boolean isThumbnailable(java.io.InputStream imageData)


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.