|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.issue.attachment.DefaultAttachmentStore
public class DefaultAttachmentStore
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.jira.issue.attachment.AttachmentStore |
|---|
AttachmentStore.AttachmentAdapter |
| Field Summary | |
|---|---|
protected ProjectManager |
projectManager
|
| Constructor Summary | |
|---|---|
DefaultAttachmentStore(ProjectManager projectManager,
AttachmentPathManager attachmentPathManager)
|
|
| Method Summary | |
|---|---|
void |
checkValidAttachmentDirectory(Issue issue)
Checks that the Attachment directory of the given issue is right to go - writable, accessible etc. |
void |
checkValidTemporaryAttachmentDirectory()
|
static String |
computeIssueKeyForOriginalProjectKey(String originalProjectKey,
String issueKey)
|
File |
getAttachmentDirectory(Issue issue)
Returns the physical directory of the attachments for the given issue. |
File |
getAttachmentDirectory(Issue issue,
boolean createDirectory)
Returns the physical directory of the attachments for the given issue. |
File |
getAttachmentDirectory(String attachmentDirectory,
String projectKey,
String issueKey)
Get the attachment directory for the given attachment base directory, project key, and issue key. |
File |
getAttachmentFile(Attachment attachment)
Returns the physical File for the given Attachment. |
File |
getAttachmentFile(AttachmentStore.AttachmentAdapter attachment,
File attachmentDir)
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. |
File |
getAttachmentFile(Issue issue,
Attachment attachment)
Returns the physical File for the given Attachment. |
File |
getLegacyThumbnailFile(Attachment attachment)
Returns the old legacy file name for thumbnails http://jira.atlassian.com/browse/JRA-23311 |
File |
getTemporaryAttachmentDirectory()
|
File |
getThumbnailDirectory(Issue issue)
Returns the physical directory of the thumbnails for the given issue, creating if necessary. |
File |
getThumbnailFile(Attachment attachment)
Just like the attachments themselves, thumbnails can succumb to file system encoding problems. |
File |
getThumbnailFile(Issue issue,
Attachment attachment)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ProjectManager projectManager
| Constructor Detail |
|---|
public DefaultAttachmentStore(ProjectManager projectManager,
AttachmentPathManager attachmentPathManager)
| Method Detail |
|---|
public File getThumbnailDirectory(Issue issue)
getThumbnailDirectory in interface AttachmentStoreissue - the issue whose thumbnail directory you want.
public File getAttachmentDirectory(Issue issue)
issue - the issue whose attachment directory you want.
public File getAttachmentDirectory(Issue issue,
boolean createDirectory)
getAttachmentDirectory in interface AttachmentStoreissue - the issue whose attachment directory you want.createDirectory - If true, and the directory does not currently exist, then the directory is created.
public File getTemporaryAttachmentDirectory()
getTemporaryAttachmentDirectory in interface AttachmentStore
public File getAttachmentDirectory(String attachmentDirectory,
String projectKey,
String issueKey)
getAttachmentDirectory in interface AttachmentStoreattachmentDirectory - base of attachmentsprojectKey - the project key the issue belongs toissueKey - the issue key for the issue
public static String computeIssueKeyForOriginalProjectKey(String originalProjectKey,
String issueKey)
public File getAttachmentFile(Issue issue,
Attachment attachment)
throws DataAccessException
getAttachmentFile in interface AttachmentStoreissue - the issue the attachment belongs to.attachment - the attachment.
DataAccessException - on failure getting required attachment info.
public File getAttachmentFile(Attachment attachment)
throws DataAccessException
getAttachmentFile in interface AttachmentStoreattachment - the attachment.
DataAccessException - on failure getting required attachment info.
public File getAttachmentFile(AttachmentStore.AttachmentAdapter attachment,
File attachmentDir)
getAttachmentFile in interface AttachmentStoreattachment - 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 File getThumbnailFile(Attachment attachment)
getThumbnailFile in interface AttachmentStoreattachment - the attacment in play
public File getThumbnailFile(Issue issue,
Attachment attachment)
getThumbnailFile in interface AttachmentStorepublic File getLegacyThumbnailFile(Attachment attachment)
getLegacyThumbnailFile in interface AttachmentStoreattachment - the attacment in play
public void checkValidAttachmentDirectory(Issue issue)
throws AttachmentException
checkValidAttachmentDirectory in interface AttachmentStoreissue - the issue whose attachment directory to check.
AttachmentException - if the directory is not writable or missing and cannot be created.
public void checkValidTemporaryAttachmentDirectory()
throws AttachmentException
checkValidTemporaryAttachmentDirectory in interface AttachmentStoreAttachmentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||