|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.pages.thumbnail.DefaultThumbnailManager
public class DefaultThumbnailManager
| Field Summary |
|---|
| Fields inherited from interface com.atlassian.confluence.pages.thumbnail.ThumbnailManager |
|---|
THUMBNAIL_PATH_SUFFIX |
| Constructor Summary | |
|---|---|
DefaultThumbnailManager()
|
|
| Method Summary | |
|---|---|
boolean |
checkToolkit()
Deprecated. since 3.5 - not used |
int |
getMaxHeight()
|
int |
getMaxWidth()
|
com.atlassian.core.util.thumbnail.Thumber |
getThumber()
Deprecated. since 3.5 |
com.atlassian.core.util.thumbnail.Thumbnail |
getThumbnail(Attachment attachment)
Returns a thumbnail for this attachment having ensured the thumbnail exists in the filesystem, generating it only if it doesn't already exist. |
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 |
ThumbnailInfo |
getThumbnailInfo(Attachment attachment)
Return the details of a thumbnail for a given attachment without actually creating the thumbnail file on disk. |
ThumbnailInfo |
getThumbnailInfo(Attachment attachment,
String remoteAttachmentPath)
Return the details of a thumbnail for a given attachment without actually creating the thumbnail file on disk. |
DelegatingThumbnailRenderer |
getThumbnailRenderer()
|
Collection<com.atlassian.core.util.thumbnail.Thumbnail> |
getThumbnails(Collection<Attachment> attachments)
not currently used |
protected File |
getThumbnailsFolder(Attachment attachment)
|
boolean |
isThumbnailable(Attachment attachment)
checks the content type/mime type of the attachment to determine whether a thumbnail can be created from it |
boolean |
isThumbnailable(InputStream imageData)
Deprecated. since 3.5 - not used |
static boolean |
isThumbnailable(String mimeType)
|
boolean |
isThumbnailable(ThumbnailInfo info)
|
boolean |
removeThumbnail(Attachment attachment)
Removes the thumbnail for the specified attachment. |
void |
setBootstrapManager(BootstrapManager bootstrapManager)
|
void |
setImageDetailsManager(ImageDetailsManager imageDetailsManager)
|
void |
setSettingsManager(SettingsManager settingsManager)
|
void |
setThumbnailRenderer(DelegatingThumbnailRenderer thumbnailRenderer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultThumbnailManager()
| Method Detail |
|---|
public boolean isThumbnailable(Attachment attachment)
ThumbnailManager
isThumbnailable in interface ThumbnailManagerpublic static boolean isThumbnailable(String mimeType)
public boolean isThumbnailable(ThumbnailInfo info)
isThumbnailable in interface ThumbnailManager@Deprecated public boolean isThumbnailable(InputStream imageData)
isThumbnailable in interface ThumbnailManager@Deprecated public boolean checkToolkit()
ThumbnailManager
checkToolkit in interface ThumbnailManager
public InputStream getThumbnailData(Attachment attachment)
throws FileNotFoundException
getThumbnailData in interface ThumbnailManagerFileNotFoundException
public com.atlassian.core.util.thumbnail.Thumbnail getThumbnail(Attachment attachment)
throws IllegalArgumentException
getThumbnail in interface ThumbnailManagerIllegalArgumentException - if the attachment is an inappropriate type for thumbnailing, i.e.
ThumbnailManager.isThumbnailable(Attachment) returns false
public ThumbnailInfo getThumbnailInfo(Attachment attachment)
throws CannotGenerateThumbnailException
ThumbnailManager
getThumbnailInfo in interface ThumbnailManagerCannotGenerateThumbnailException - if no thumbnail information can be generated for this thumbnail.
public ThumbnailInfo getThumbnailInfo(Attachment attachment,
String remoteAttachmentPath)
throws CannotGenerateThumbnailException
ThumbnailManager
getThumbnailInfo in interface ThumbnailManagerremoteAttachmentPath - path to the thumbnail, excepting the thumbnail itself. Eg the value
returned by ConfluenceRenderUtils.getAttachmentRemotePath(com.atlassian.confluence.pages.Attachment).
CannotGenerateThumbnailException - if no thumbnail information can be generated for this thumbnail.public void setBootstrapManager(BootstrapManager bootstrapManager)
public Collection<com.atlassian.core.util.thumbnail.Thumbnail> getThumbnails(Collection<Attachment> attachments)
throws Exception
getThumbnails in interface ThumbnailManagerExceptionprotected File getThumbnailsFolder(Attachment attachment)
public File getThumbnailFile(Attachment attachment)
ThumbnailManager
getThumbnailFile in interface ThumbnailManagerpublic boolean removeThumbnail(Attachment attachment)
ThumbnailManager
removeThumbnail in interface ThumbnailManagerpublic int getMaxHeight()
getMaxHeight in interface ThumbnailManagerThumbnailManager.getThumbnail(Attachment) and
ThumbnailManager.getThumbnailInfo(Attachment) without providing dimensionspublic int getMaxWidth()
getMaxWidth in interface ThumbnailManagerThumbnailManager.getThumbnail(Attachment) and
ThumbnailManager.getThumbnailInfo(Attachment) without providing dimensions@Deprecated public com.atlassian.core.util.thumbnail.Thumber getThumber()
public DelegatingThumbnailRenderer getThumbnailRenderer()
public void setThumbnailRenderer(DelegatingThumbnailRenderer thumbnailRenderer)
public void setSettingsManager(SettingsManager settingsManager)
public void setImageDetailsManager(ImageDetailsManager imageDetailsManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||