@ParametersAreNonnullByDefault public class DefaultThumbnailAccessor extends Object implements ThumbnailAccessor
Modifier and Type | Field and Description |
---|---|
static String |
THUMBNAIL_DESIGNATION
Infix for generated thumbnail images.
|
Constructor and Description |
---|
DefaultThumbnailAccessor(StreamAttachmentStore streamAttachmentStore) |
Modifier and Type | Method and Description |
---|---|
io.atlassian.util.concurrent.Promise<Void> |
deleteThumbnailDirectory(Issue issue)
Deletes the thumbnail directory for a given issue, deleting its contents if necessary.
|
File |
getLegacyThumbnailFile(Attachment attachment)
Returns the old legacy file name for thumbnails
|
com.atlassian.dc.filestore.api.FileStore.Path |
getThumbnailFilePath(Attachment attachment)
Just like the attachments themselves, thumbnails can succumb to file system encoding problems.
|
com.atlassian.dc.filestore.api.FileStore.Path |
getThumbnailFilePath(Issue issue,
Attachment attachment)
Returns the file path for the given attachment's thumbnail.
|
public static final String THUMBNAIL_DESIGNATION
public DefaultThumbnailAccessor(StreamAttachmentStore streamAttachmentStore)
@Nonnull public com.atlassian.dc.filestore.api.FileStore.Path getThumbnailFilePath(Attachment attachment)
ThumbnailAccessor
http://jira.atlassian.com/browse/JRA-23311
getThumbnailFilePath
in interface ThumbnailAccessor
attachment
- the attachment for which to get the thumbnail file pathThumbnailAccessor.getThumbnailFilePath(com.atlassian.jira.issue.Issue, Attachment)
@Nonnull public com.atlassian.dc.filestore.api.FileStore.Path getThumbnailFilePath(Issue issue, Attachment attachment)
ThumbnailAccessor
ThumbnailAccessor.getThumbnailFilePath(Attachment)
if you already have the issue.getThumbnailFilePath
in interface ThumbnailAccessor
issue
- the issue to which the attachment belongsattachment
- the attachment for which to get the thumbnail file pathThumbnailAccessor.getThumbnailFilePath(Attachment)
public File getLegacyThumbnailFile(@Nonnull Attachment attachment)
http://jira.atlassian.com/browse/JRA-23311
getLegacyThumbnailFile
in interface ThumbnailAccessor
attachment
- the attachment in playpublic io.atlassian.util.concurrent.Promise<Void> deleteThumbnailDirectory(@Nonnull Issue issue)
ThumbnailAccessor
deleteThumbnailDirectory
in interface ThumbnailAccessor
issue
- The issue whose thumbnail path you want to delete.Copyright © 2002-2024 Atlassian. All Rights Reserved.