public interface ThumbnailManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
THUMBNAIL_PATH_SUFFIX |
Modifier and Type | Method and Description |
---|---|
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.
|
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
|
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,
java.lang.String rootAttachmentPath)
Return the details of a thumbnail for a given attachment without actually creating the thumbnail file on disk.
|
java.util.Collection<com.atlassian.core.util.thumbnail.Thumbnail> |
getThumbnails(java.util.Collection<Attachment> attachments)
Deprecated.
since 5.4. No replacement.
|
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(java.io.InputStream imageData)
Deprecated.
since 5.4.
|
boolean |
isThumbnailable(ThumbnailInfo info) |
boolean |
removeThumbnail(Attachment attachment)
Removes the thumbnail for the specified attachment.
|
@Deprecated java.util.Collection<com.atlassian.core.util.thumbnail.Thumbnail> getThumbnails(java.util.Collection<Attachment> attachments) throws java.lang.Exception
java.lang.Exception
boolean isThumbnailable(Attachment attachment)
java.io.InputStream getThumbnailData(Attachment attachment) throws java.io.FileNotFoundException
java.io.FileNotFoundException
java.io.File getThumbnailFile(Attachment attachment)
boolean removeThumbnail(Attachment attachment)
com.atlassian.core.util.thumbnail.Thumbnail getThumbnail(Attachment attachment) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the attachment is an inappropriate type for thumbnailing, i.e.
isThumbnailable(Attachment)
returns falseThumbnailInfo getThumbnailInfo(Attachment attachment) throws CannotGenerateThumbnailException
CannotGenerateThumbnailException
- if no thumbnail information can be generated for this thumbnail.ThumbnailInfo getThumbnailInfo(Attachment attachment, java.lang.String rootAttachmentPath) throws CannotGenerateThumbnailException
rootAttachmentPath
- 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.boolean isThumbnailable(ThumbnailInfo info)
@Deprecated boolean isThumbnailable(java.io.InputStream imageData)
Copyright © 2003-2014 Atlassian. All Rights Reserved.