@PublicApi public interface

AttachmentPathManager

com.atlassian.jira.config.util.AttachmentPathManager
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Responsible for determining the current location of JIRA attachments.

Summary

Nested Classes
enum AttachmentPathManager.Mode  
class AttachmentPathManager.PropertiesAdaptor Implementation of AttachmentPathManager that uses the ApplicationProperties to get the current paths. 
Fields
public static final String ATTACHMENTS_DIR
Public Methods
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()
boolean getUseDefaultDirectory()
Returns true if attachments are stored within JIRA Home
void setCustomAttachmentPath(String indexPath)
Set a custom location to store attachments
void setUseDefaultDirectory()
Use the default location within JIRA Home to store attachments

Fields

public static final String ATTACHMENTS_DIR

Public Methods

public void disableAttachments ()

Turns "Allow Attachments" to off.

public String getAttachmentPath ()

Returns the path used to store attachments

Returns
  • the path used to store attachments

public String getDefaultAttachmentPath ()

Returns the attachment path that will be used by default if JIRA is so configured. This will live as a subdirectory of jira-home.

Returns
  • the attachment path that will be used by default if JIRA is so configured.

public AttachmentPathManager.Mode getMode ()

public boolean getUseDefaultDirectory ()

Returns true if attachments are stored within JIRA Home

Returns
  • true if attachments are stored within JIRA Home

public void setCustomAttachmentPath (String indexPath)

Set a custom location to store attachments

Parameters
indexPath path to store attachments

public void setUseDefaultDirectory ()

Use the default location within JIRA Home to store attachments