|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.AttachmentUtils
AttachmentManager
only. Since v6.1
@Deprecated public class AttachmentUtils
Static utilities for working with the attachment files and their directories.
Nested Class Summary | |
---|---|
static class |
AttachmentUtils.AttachmentAdapter
Deprecated. Use AttachmentStore with AttachmentStore.AttachmentAdapter . Since v6.1 |
Field Summary | |
---|---|
static String |
THUMBS_SUBDIR
Deprecated. Infix for generated thumbnail images. |
Constructor Summary | |
---|---|
AttachmentUtils()
Deprecated. |
Method Summary | |
---|---|
static void |
checkValidAttachmentDirectory(Issue issue)
Deprecated. Checks that the Attachment directory of the given issue is right to go - writable, accessible etc. |
static void |
checkValidTemporaryAttachmentDirectory()
Deprecated. |
static File |
getAttachmentDirectory(Issue issue)
Deprecated. Returns the physical directory of the attachments for the given issue. |
static File |
getAttachmentDirectory(Issue issue,
boolean createDirectory)
Deprecated. Returns the physical directory of the attachments for the given issue. |
static File |
getAttachmentDirectory(String attachmentDirectory,
String projectKey,
String issueKey)
Deprecated. Get the attachment directory for the given attachment base directory, project key, and issue key. |
static File |
getAttachmentFile(Attachment attachment)
Deprecated. Returns the physical File for the given Attachment. |
static File |
getAttachmentFile(AttachmentUtils.AttachmentAdapter attachment,
File attachmentDir)
Deprecated. This is intended for cases where you want more control over where the attachment actually lives and you just want something to handle the look up logic for the various possible filenames an attachment can have. |
static File |
getAttachmentFile(Issue issue,
Attachment attachment)
Deprecated. Returns the physical File for the given Attachment. |
protected static AttachmentStore |
getAttachmentStore()
Deprecated. |
static File |
getLegacyThumbnailFile(Attachment attachment)
Deprecated. Returns the old legacy file name for thumbnails http://jira.atlassian.com/browse/JRA-23311 |
static File |
getTemporaryAttachmentDirectory()
Deprecated. |
static File |
getThumbnailDirectory(Issue issue)
Deprecated. Returns the physical directory of the thumbnails for the given issue, creating if necessary. |
static File |
getThumbnailFile(Attachment attachment)
Deprecated. Just like the attachments themselves, thumbnails can succumb to file system encoding problems. |
static File |
getThumbnailFile(Issue issue,
Attachment attachment)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String THUMBS_SUBDIR
Constructor Detail |
---|
public AttachmentUtils()
Method Detail |
---|
public static File getThumbnailDirectory(Issue issue)
issue
- the issue whose thumbnail directory you want.
public static File getAttachmentDirectory(Issue issue)
issue
- the issue whose attachment directory you want.
public static File getAttachmentDirectory(Issue issue, boolean createDirectory)
issue
- the issue whose attachment directory you want.createDirectory
- If true, and the directory does not currently exist, then the directory is created.
protected static AttachmentStore getAttachmentStore()
public static File getTemporaryAttachmentDirectory()
public static File getAttachmentDirectory(String attachmentDirectory, String projectKey, String issueKey)
attachmentDirectory
- base of attachmentsprojectKey
- the project key the issue belongs toissueKey
- the issue key for the issue
public static File getAttachmentFile(Issue issue, Attachment attachment) throws DataAccessException
issue
- the issue the attachment belongs to.attachment
- the attachment.
DataAccessException
- on failure getting required attachment info.public static File getAttachmentFile(Attachment attachment) throws DataAccessException
attachment
- the attachment.
DataAccessException
- on failure getting required attachment info.public static File getAttachmentFile(AttachmentUtils.AttachmentAdapter attachment, File attachmentDir)
attachment
- it's not an attachment but it acts like one for our purposes.attachmentDir
- the directory the attachments live in. This is different that the system-wide attachment
directory. i.e. this would "attachments/MKY/MKY-1" and not just "attachments"
public static File getThumbnailFile(Attachment attachment)
attachment
- the attacment in play
public static File getThumbnailFile(Issue issue, Attachment attachment)
public static File getLegacyThumbnailFile(Attachment attachment)
attachment
- the attacment in play
public static void checkValidAttachmentDirectory(Issue issue) throws AttachmentException
issue
- the issue whose attachment directory to check.
AttachmentException
- if the directory is not writable or missing and cannot be created.public static void checkValidTemporaryAttachmentDirectory() throws AttachmentException
AttachmentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |