|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThumbnailManager
Field Summary | |
---|---|
static String |
THUMBNAIL_IMAGE_DARK_FEATURE
|
static String |
THUMBNAIL_PATH_SUFFIX
|
Method Summary | |
---|---|
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. |
com.atlassian.core.util.thumbnail.Thumbnail |
getThumbnail(Attachment attachment,
ImageDimensions imageDimensions)
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)
Retrieves the thumbnail data (as a stream) of the latest version from where it was stored in the file system. |
InputStream |
getThumbnailData(Attachment attachment,
ImageDimensions imageDimensions)
Retrieves the thumbnail data (as a stream) of the latest version from where it was stored in the file system. |
File |
getThumbnailFile(Attachment attachment)
Returns the path to the thumbnail for this attachment |
File |
getThumbnailFile(Attachment attachment,
ImageDimensions imageDimensions)
Returns the path to the thumbnail for this attachment |
File |
getThumbnailFile(long attachmentId,
int version,
long contentId)
|
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,
ImageDimensions imageDimensions)
Return the details of a thumbnail for a given attachment without actually creating the thumbnail file on disk. |
ThumbnailInfo |
getThumbnailInfo(Attachment attachment,
String rootAttachmentPath)
Return the details of a thumbnail for a given attachment without actually creating the thumbnail file on disk. |
ThumbnailInfo |
getThumbnailInfo(Attachment attachment,
String rootAttachmentPath,
ImageDimensions imageDimensions)
Return the details of a thumbnail for a given attachment without actually creating the thumbnail file on disk. |
Collection<com.atlassian.core.util.thumbnail.Thumbnail> |
getThumbnails(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(InputStream imageData)
Deprecated. since 5.4. |
boolean |
isThumbnailable(ThumbnailInfo info)
Check the thumbnail information to determine whether a thumbnail can be created from it |
boolean |
removeThumbnail(Attachment attachment)
Removes the thumbnail for the specified attachment |
Field Detail |
---|
static final String THUMBNAIL_PATH_SUFFIX
static final String THUMBNAIL_IMAGE_DARK_FEATURE
Method Detail |
---|
@Deprecated Collection<com.atlassian.core.util.thumbnail.Thumbnail> getThumbnails(Collection<Attachment> attachments) throws Exception
Exception
boolean isThumbnailable(@Nullable Attachment attachment)
attachment
- the attachment
InputStream getThumbnailData(@Nonnull Attachment attachment) throws FileNotFoundException
attachment
- the attachment
FileNotFoundException
- if the thumbnail file is not foundInputStream getThumbnailData(@Nonnull Attachment attachment, @Nullable ImageDimensions imageDimensions) throws FileNotFoundException
attachment
- the attachmentimageDimensions
- image dimensions of the thumbnail
FileNotFoundException
- if the thumbnail file is not foundFile getThumbnailFile(long attachmentId, int version, long contentId)
File getThumbnailFile(@Nonnull Attachment attachment)
attachment
- the attachment
File getThumbnailFile(@Nonnull Attachment attachment, @Nullable ImageDimensions imageDimensions)
attachment
- the attachmentimageDimensions
- image dimensions of the thumbnail
boolean removeThumbnail(@Nonnull Attachment attachment)
attachment
- the attachment
com.atlassian.core.util.thumbnail.Thumbnail getThumbnail(@Nonnull Attachment attachment) throws IllegalArgumentException
attachment
- the attachment
IllegalArgumentException
- if the attachment is an inappropriate type for thumbnailing, i.e. isThumbnailable(Attachment)
returns falsecom.atlassian.core.util.thumbnail.Thumbnail getThumbnail(@Nonnull Attachment attachment, @Nullable ImageDimensions imageDimensions) throws IllegalArgumentException
attachment
- the attachmentimageDimensions
- image dimensions of the thumbnail
IllegalArgumentException
- if the attachment is an inappropriate type for thumbnailing, i.e. isThumbnailable(Attachment)
returns falseThumbnailInfo getThumbnailInfo(@Nonnull Attachment attachment) throws CannotGenerateThumbnailException
attachment
- the attachment
CannotGenerateThumbnailException
- if no thumbnail information can be generated for this thumbnailThumbnailInfo getThumbnailInfo(@Nonnull Attachment attachment, @Nullable ImageDimensions imageDimensions) throws CannotGenerateThumbnailException
attachment
- the attachmentimageDimensions
- image dimensions of the thumbnail
CannotGenerateThumbnailException
- if no thumbnail information can be generated for this thumbnailThumbnailInfo getThumbnailInfo(@Nonnull Attachment attachment, @Nullable String rootAttachmentPath) throws CannotGenerateThumbnailException
attachment
- the attachmentrootAttachmentPath
- 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 thumbnailThumbnailInfo getThumbnailInfo(@Nonnull Attachment attachment, @Nullable String rootAttachmentPath, @Nullable ImageDimensions imageDimensions) throws CannotGenerateThumbnailException
attachment
- the attachmentrootAttachmentPath
- path to the thumbnail, excepting the thumbnail itself. Eg the value returned by ConfluenceRenderUtils.getAttachmentRemotePath(com.atlassian.confluence.pages.Attachment)
.imageDimensions
- image dimensions of the thumbnail
CannotGenerateThumbnailException
- if no thumbnail information can be generated for this thumbnailboolean isThumbnailable(@Nullable ThumbnailInfo info)
info
- the thumbnail information
@Deprecated boolean isThumbnailable(InputStream imageData)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |