public class AttachmentPathManagerImpl extends Object implements AttachmentPathManager
AttachmentPathManager
that uses the ApplicationProperties
to
get the current paths. Nothing outside this class should ever refer to the JIRA_PATH_ATTACHMENTS
application
property. That property needs to be interpreted properly when using Jira home.AttachmentPathManager.Mode
ATTACHMENTS_DIR
Constructor and Description |
---|
AttachmentPathManagerImpl(ApplicationProperties applicationProperties,
JiraHome jiraHome) |
Modifier and Type | Method and Description |
---|---|
void |
disableAttachments()
Turns "Allow Attachments" to off.
|
String |
getAttachmentPath()
Returns the path used to store attachments.
|
String |
getDefaultAttachmentPath()
Returns the attachment path that will be used by default if JIRA is so configured.
|
AttachmentPathManager.Mode |
getMode()
Returns the mode in which the attachments path is determined.
|
boolean |
getUseDefaultDirectory()
Returns true if attachments are stored within JIRA Home
|
void |
setCustomAttachmentPath(String path)
Set a custom location to store attachments
|
void |
setUseDefaultDirectory()
Use the default location within JIRA Home to store attachments
|
public AttachmentPathManagerImpl(ApplicationProperties applicationProperties, JiraHome jiraHome)
public String getDefaultAttachmentPath()
AttachmentPathManager
getDefaultAttachmentPath
in interface AttachmentPathManager
public String getAttachmentPath()
AttachmentPathManager
getAttachmentPath
in interface AttachmentPathManager
public void setCustomAttachmentPath(String path)
AttachmentPathManager
setCustomAttachmentPath
in interface AttachmentPathManager
path
- path to store attachmentspublic void setUseDefaultDirectory()
AttachmentPathManager
setUseDefaultDirectory
in interface AttachmentPathManager
public boolean getUseDefaultDirectory()
AttachmentPathManager
getUseDefaultDirectory
in interface AttachmentPathManager
public void disableAttachments()
AttachmentPathManager
disableAttachments
in interface AttachmentPathManager
public AttachmentPathManager.Mode getMode()
AttachmentPathManager
getMode
in interface AttachmentPathManager
Copyright © 2002-2022 Atlassian. All Rights Reserved.