com.atlassian.jira.issue.attachment
Class FileSystemThumbnailAccessor

java.lang.Object
  extended by com.atlassian.jira.issue.attachment.WithDirectoryAccessorThumbnailAccessor
      extended by com.atlassian.jira.issue.attachment.FileSystemThumbnailAccessor
All Implemented Interfaces:
ThumbnailAccessor

public class FileSystemThumbnailAccessor
extends WithDirectoryAccessorThumbnailAccessor


Constructor Summary
FileSystemThumbnailAccessor(AttachmentDirectoryAccessor ada)
           
 
Method Summary
 File getLegacyThumbnailFile(Attachment attachment)
          Returns the old legacy file name for thumbnails http://jira.atlassian.com/browse/JRA-23311
 File getThumbnailFile(Attachment attachment)
          Just like the attachments themselves, thumbnails can succumb to file system encoding problems.
 File getThumbnailFile(Issue issue, Attachment attachment)
          Returns the file handle for the given attachment's thumbnail.
 
Methods inherited from class com.atlassian.jira.issue.attachment.WithDirectoryAccessorThumbnailAccessor
deleteThumbnailDirectory, getAttachmentDirectoryAccessor, getThumbnailDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemThumbnailAccessor

public FileSystemThumbnailAccessor(AttachmentDirectoryAccessor ada)
Method Detail

getThumbnailFile

@Nonnull
public File getThumbnailFile(@Nonnull
                                     Attachment attachment)
Description copied from interface: ThumbnailAccessor
Just like the attachments themselves, thumbnails can succumb to file system encoding problems. However we are going to regenerate thumbnails by only using the new naming scheme and not the legacy one. We cant do this for attachments but we can for thumbnails since they are epheral objects anyway. http://jira.atlassian.com/browse/JRA-23311

Parameters:
attachment - the attachment for which to get the thumbnail file
Returns:
a non-null file handle (the file itself might not exist)
See Also:
ThumbnailAccessor.getThumbnailFile(com.atlassian.jira.issue.Issue, Attachment)

getThumbnailFile

@Nonnull
public File getThumbnailFile(@Nonnull
                                     Issue issue,
                                     @Nonnull
                                     Attachment attachment)
Description copied from interface: ThumbnailAccessor
Returns the file handle for the given attachment's thumbnail. This method performs better than ThumbnailAccessor.getThumbnailFile(Attachment) if you already have the issue.

Parameters:
issue - the issue to which the attachment belongs
attachment - the attachment for which to get the thumbnail file
Returns:
a non-null file handle (the file itself might not exist)
See Also:
ThumbnailAccessor.getThumbnailFile(Attachment)

getLegacyThumbnailFile

public File getLegacyThumbnailFile(@Nonnull
                                   Attachment attachment)
Returns the old legacy file name for thumbnails http://jira.atlassian.com/browse/JRA-23311

Parameters:
attachment - the attacment in play
Returns:
the full legacy thumbnail file name


Copyright © 2002-2014 Atlassian. All Rights Reserved.