java.lang.Object | |
↳ | com.atlassian.jira.issue.attachment.FileAttachments |
Contains utility methods for dealing with attachments on the file system. Currently the attachment structure is now ../ProjectKey/IssueBucket/IssueKey/attachmentID. The project key used will be the original project key used to store the attachment. The issue bucket is determined by what the issue number is, with the bucket sizes being 10,000.
Previous Versions of Attachment Storage: ../ProjectKey/IssueKey/attachmentID - This is the same as above with the project key the key that was used to store the attachment. This was changed due to the limitations in directory sizes when it came to the number of attachments in issues.
../ProjectKey/IssueKey/attachmentID_attachmentFileName - Again the project key is the key that was used to store the attachment.
../ProjectKey/IssueKey/attachmentID_?_attachmentFileName - There was a stage where thumbnails were stored within the folder and where the '?' is would say 'thumb'. This meant that searching for these files meant discounting thumbnail hits.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the bucket number for an issue based of its key
| |||||||||||
Helper method to mung an issue key to the given project key.
| |||||||||||
Returns the directory containing attachments for an issue.
| |||||||||||
This method is deprecated.
we should be using
getAttachmentFileHolder(AttachmentKey, java.io.File) once AttachmentStore is
removed.
| |||||||||||
Returns a file that refers to an attachment specified by the given attachment key and the attachment root directory.
| |||||||||||
Returns a file that refers to the default location of an attachment specified by the given attachment key
and the attachment root directory.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns the bucket number for an issue based of its key
issueKey | The latest issue key |
---|
IllegalArgumentException | if the issueKey is not a valid JIRA issue key |
---|
Helper method to mung an issue key to the given project key.
originalProjectKey | The project key that the issue should be under. |
---|---|
issueKey | The issue key to mung. |
Returns the directory containing attachments for an issue.
rootDir | The root directory of all attachments. |
---|---|
originalProjectKey | The project key that was used to store the attachments (i.e. the original project key) |
issueKey | The issue key |
This method is deprecated.
we should be using getAttachmentFileHolder(AttachmentKey, java.io.File)
once AttachmentStore is
removed.
Returns a file that refers to an attachment specified by the given attachment key and the attachment root directory.
attachment | The attachment adapter |
---|---|
attachmentDir | The directory of issue's attachments. NOT THE ROOT DIRECTORY FOR ALL ATTACHMENTS. |
Returns a file that refers to an attachment specified by the given attachment key and the attachment root directory.
attachment | The attachment key. |
---|---|
rootDir | The root directory of all attachments. NOT THE DIRECTORY FOR AN ISSUE'S ATTACHMENT. |
Returns a file that refers to the default location of an attachment specified by the given attachment key and the attachment root directory.
attachment | The attachment key. |
---|---|
rootDir | The root directory of all attachments. NOT THE DIRECTORY FOR AN ISSUE'S ATTACHMENT. |