| java.lang.Object | |
| ↳ | com.atlassian.jira.issue.attachment.DefaultAttachmentStore |
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Delete the specified attachment.
| |||||||||||
Delete the container for attachments for a given issue.
| |||||||||||
Health status for this component.
| |||||||||||
Returns true if the attachment exists in the store.
| |||||||||||
Retrieve data for a given attachment.
| |||||||||||
Returns the physical File for the given Attachment.
| |||||||||||
Returns the physical File for the given Attachment.
| |||||||||||
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.
| |||||||||||
Moves an attachment from its current issue under a new one
| |||||||||||
Store attachment data for a given attachment.
| |||||||||||
Store attachment data for a given attachment.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.issue.attachment.AttachmentHealth
| |||||||||||
From interface
com.atlassian.jira.issue.attachment.FileBasedAttachmentStore
| |||||||||||
From interface
com.atlassian.jira.issue.attachment.SimpleAttachmentStore
| |||||||||||
Delete the specified attachment.
| attachment | The attachment to delete. |
|---|
Delete the container for attachments for a given issue. For file systems, this means the attachment directory for that issue.
| issue | The issue to delete attachments for. |
|---|
Health status for this component. Specifically the errors that cause the attachment subsystem to fail.
Returns true if the attachment exists in the store.
| metaData | attachment metadata, used to determine the logical key under which to store the attachment data |
|---|
AttachmentRuntimeException in case of error.
Retrieve data for a given attachment.
| metadata | attachment metadata, used to determine the logical key under which to store the attachment data |
|---|---|
| inputStreamProcessor | Function that processes the attachment data. This function MUST clean up upon failure of reading from the input stream, and must support being re-executed. e.g. If the function writes out to a temp file, the temp file should be created by the function. |
AttachmentRuntimeException in case of error.
Returns the physical File for the given Attachment. This method performs better as it does not need to look up the issue object.
| issue | the issue the attachment belongs to. |
|---|---|
| attachment | the attachment. |
| DataAccessException | on failure getting required attachment info. |
|---|
Returns the physical File for the given Attachment. If you are calling this on multiple attachments for the same issue, consider using the overridden method that passes in the issue. Else, this goes to the database for each call.
| attachment | the attachment. |
|---|
| DataAccessException | on failure getting required attachment info. |
|---|
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.
In practice, this is just used during Project Import| 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" |
Moves an attachment from its current issue under a new one
| metaData | attachment metadata, used to determine the logical key of the attachment to be moved. |
|---|---|
| newIssueKey | the key of the new issue under which the attachment will reside. |
AttachmentRuntimeException in case of error.
Store attachment data for a given attachment.
| metadata | attachment metadata, used to determine the logical key under which to store the attachment data |
|---|---|
| source | source data. It is assumed that the file will exist during the attachment process (i.e. relatively long lived). |
Store attachment data for a given attachment.
| metadata | attachment metadata, used to determine the logical key under which to store the attachment data |
|---|---|
| data | source data. The attachment store will close this stream when it has completed. The stream will be closed once the operation is complete. |
AttachmentRuntimeException in case of error.