public interface AttachmentDirectoryAccessor extends AttachmentHealth
Modifier and Type | Method and Description |
---|---|
void |
checkValidAttachmentDirectory(Issue issue)
Deprecated.
Use
AttachmentHealth.errors() instead. This method is here while AttachmentStore
is still in jira-api. |
void |
checkValidTemporaryAttachmentDirectory()
Deprecated.
Use
AttachmentHealth.errors() instead. This method is here while AttachmentStore
is still in jira-api. |
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 issueKey) |
File |
getAttachmentDirectory(String attachmentDirectory,
String projectKey,
String issueKey)
Get the attachment directory for the given attachment base directory, project key, and issue key.
|
File |
getAttachmentRootPath()
Returns the path used to store all attachments across the system.
|
File |
getTemporaryAttachmentDirectory() |
File |
getThumbnailDirectory(Issue issue)
Returns the physical directory of the thumbnails for the given issue, creating if necessary.
|
File |
getThumbnailDirectory(Issue issue,
boolean createDirectory)
Returns the physical directory of the thumbnails for the given issue, creating if desired.
|
errors
@Nonnull File getThumbnailDirectory(@Nonnull Issue issue)
issue
- the issue whose thumbnail directory you want@Nonnull File getThumbnailDirectory(@Nonnull Issue issue, boolean createDirectory)
issue
- the issue whose thumbnail directory you wantcreateDirectory
- If true, and the directory does not currently exist, then the directory is created.File getAttachmentDirectory(@Nonnull Issue issue, boolean createDirectory)
issue
- the issue whose attachment directory you wantcreateDirectory
- If true, and the directory does not currently exist, then the directory is created.File getTemporaryAttachmentDirectory()
File getAttachmentDirectory(@Nonnull Issue issue)
issue
- the issue whose attachment directory you wantFile getAttachmentDirectory(String attachmentDirectory, String projectKey, String issueKey)
The idea is to encapsulate all of the path-joinery magic to make future refactoring easier if we ever decide to move away from attachment-base/project-key/issue-ket
attachmentDirectory
- base of attachmentsprojectKey
- the project key the issue belongs toissueKey
- the issue key for the issuevoid checkValidAttachmentDirectory(Issue issue) throws AttachmentException
AttachmentHealth.errors()
instead. This method is here while AttachmentStore
is still in jira-api.issue
- the issue whose attachment directory to check.AttachmentException
- if the directory is not writable or missing and cannot be created.void checkValidTemporaryAttachmentDirectory() throws AttachmentException
AttachmentHealth.errors()
instead. This method is here while AttachmentStore
is still in jira-api.AttachmentException
- if the directory is not writable or missing and cannot be created.File getAttachmentRootPath()
Copyright © 2002-2022 Atlassian. All Rights Reserved.