com.atlassian.confluence.pages.thumbnail
Class DelegatorThumbnailManager

java.lang.Object
  extended bycom.atlassian.confluence.pages.thumbnail.DelegatorThumbnailManager
All Implemented Interfaces:
ThumbnailManager

public class DelegatorThumbnailManager
extends Object
implements ThumbnailManager


Field Summary
 
Fields inherited from interface com.atlassian.confluence.pages.thumbnail.ThumbnailManager
THUMBNAIL_PATH_SUFFIX
 
Constructor Summary
DelegatorThumbnailManager()
           
 
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
 void setBootstrapManager(BootstrapManager bootstrapManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatorThumbnailManager

public DelegatorThumbnailManager()
Method Detail

getThumbnails

public Collection getThumbnails(Collection attachments)
                         throws Exception
Specified by:
getThumbnails in interface ThumbnailManager
Throws:
Exception

isThumbnailable

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

Specified by:
isThumbnailable in interface ThumbnailManager
Parameters:
attachment -
Returns:

checkToolkit

public boolean checkToolkit()
Description copied from interface: ThumbnailManager
checks whether the users system has AWT toolkit required to create thumbnails

Specified by:
checkToolkit in interface ThumbnailManager
Returns:

getThumbnailData

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

Specified by:
getThumbnailData in interface ThumbnailManager
Parameters:
attachment -
Returns:
Throws:
FileNotFoundException

getThumbnailFile

public File getThumbnailFile(Attachment attachment)
Description copied from interface: ThumbnailManager
returns the path to the thumbnail for this attachment

Specified by:
getThumbnailFile in interface ThumbnailManager
Parameters:
attachment -
Returns:

getThumbnail

public Thumbnail getThumbnail(Attachment attachment)
                       throws MalformedURLException,
                              FileNotFoundException
Description copied from interface: ThumbnailManager
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

Specified by:
getThumbnail in interface ThumbnailManager
Parameters:
attachment -
Returns:
Throws:
MalformedURLException
FileNotFoundException

getMaxHeight

public int getMaxHeight()
Specified by:
getMaxHeight in interface ThumbnailManager
Returns:
the maximum height of the generated thumbnail

getMaxWidth

public int getMaxWidth()
Specified by:
getMaxWidth in interface ThumbnailManager
Returns:
the maximum width of the generated thumbnail

setBootstrapManager

public void setBootstrapManager(BootstrapManager bootstrapManager)


Confluence is developed by Atlassian.