|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.atlassian.confluence.pages.thumbnail.AbstractThumbnailManager
| Field Summary | |
protected org.apache.log4j.Category |
log
|
protected Thumber |
thumber
|
| Fields inherited from interface com.atlassian.confluence.pages.thumbnail.ThumbnailManager |
THUMBNAIL_PATH_SUFFIX |
| Constructor Summary | |
AbstractThumbnailManager()
|
|
| Method Summary | |
boolean |
checkToolkit()
checks whether the users system has AWT toolkit required to create thumbnails |
int |
getMaxHeight()
|
int |
getMaxWidth()
|
Thumber |
getThumber()
|
Thumbnail |
getThumbnail(Attachment attachment)
Retrieves the thumbnail for attachment |
InputStream |
getThumbnailData(Attachment attachment)
We only store a thumbnail of the latest version of an image attachment in the format thumb_foo.jpg When new versions of the attachment are added, this thumbnail is removed and regenerated the next time its requested. |
File |
getThumbnailFile(Attachment attachment)
returns the path to the thumbnail for this attachment |
Collection |
getThumbnails(Collection attachments)
not currently used |
protected File |
getThumbnailsFolder(Attachment attachment)
|
boolean |
isThumbnailable(Attachment attachment)
checks the mime type of the attachment to determine whether a thumbnail can be created from it |
void |
setAttachmentManager(AttachmentManager attachmentManager)
|
void |
setBootstrapManager(BootstrapManager bootstrapManager)
|
void |
setSettingsManager(SettingsManager settingsManager)
|
void |
setThumber(Thumber thumber)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.apache.log4j.Category log
protected Thumber thumber
| Constructor Detail |
public AbstractThumbnailManager()
| Method Detail |
public boolean isThumbnailable(Attachment attachment)
ThumbnailManager
isThumbnailable in interface ThumbnailManagerattachment -
public boolean checkToolkit()
ThumbnailManager
checkToolkit in interface ThumbnailManager
public InputStream getThumbnailData(Attachment attachment)
throws FileNotFoundException
getThumbnailData in interface ThumbnailManagerattachment -
FileNotFoundException - NOTE: Dodgy, but this function assumes that the thumbnail has been created i.e getThumbnail has been called.
public Thumbnail getThumbnail(Attachment attachment)
throws MalformedURLException,
FileNotFoundException
getThumbnail in interface ThumbnailManagerattachment - the Attachment the thumbnail belongs to
MalformedURLException
FileNotFoundException
IllegalArgumentException - if a thumbnail cannot be created from attachmentpublic void setBootstrapManager(BootstrapManager bootstrapManager)
public Collection getThumbnails(Collection attachments)
throws Exception
getThumbnails in interface ThumbnailManagerattachments -
Exceptionprotected File getThumbnailsFolder(Attachment attachment)
public File getThumbnailFile(Attachment attachment)
ThumbnailManager
getThumbnailFile in interface ThumbnailManagerattachment -
public int getMaxHeight()
getMaxHeight in interface ThumbnailManagerpublic int getMaxWidth()
getMaxWidth in interface ThumbnailManagerpublic Thumber getThumber()
public void setThumber(Thumber thumber)
public void setSettingsManager(SettingsManager settingsManager)
public void setAttachmentManager(AttachmentManager attachmentManager)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||