public interface FileBasedAttachmentStore extends StreamAttachmentStore
TODO - We should be able to remove this once we provide sufficient methods in SimpleAttachmentStore to eliminate access to attachments via files.
StreamAttachmentStore.Factory
Modifier and Type | Method and Description |
---|---|
com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Unit> |
deleteAttachmentContainerForIssue(Issue issue)
Delete the container for attachments for a given issue.
|
File |
getAttachmentFile(AttachmentKey attachmentKey)
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.
|
copyAttachment, deleteAttachment, deleteTemporaryAttachment, exists, getAttachment, getAttachmentData, moveAttachment, moveTemporaryToAttachment, putAttachment, putTemporaryAttachment
errors
File getAttachmentFile(AttachmentKey attachmentKey) throws DataAccessException
attachmentKey
- the the key of the attachmentDataAccessException
- on failure getting required attachment info.File getAttachmentFile(AttachmentStore.AttachmentAdapter attachment, File attachmentDir)
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"com.atlassian.util.concurrent.Promise<com.atlassian.fugue.Unit> deleteAttachmentContainerForIssue(@Nonnull Issue issue)
issue
- The issue to delete attachments for.Copyright © 2002-2017 Atlassian. All Rights Reserved.