com.atlassian.jira.config.util
Class AttachmentPathManager.PropertiesAdaptor

java.lang.Object
  extended by com.atlassian.jira.config.util.AttachmentPathManager.PropertiesAdaptor
All Implemented Interfaces:
AttachmentPathManager
Enclosing interface:
AttachmentPathManager

public static class AttachmentPathManager.PropertiesAdaptor
extends Object
implements AttachmentPathManager

Implementation of AttachmentPathManager that uses the ApplicationProperties to get the current paths. Nothing outside of this class should ever refer to the JIRA_PATH_ATTACHMENTS ApplicationProperty. That property needs to be interpreted properly when using JIRA Home.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.config.util.AttachmentPathManager
AttachmentPathManager.Mode, AttachmentPathManager.PropertiesAdaptor
 
Field Summary
 
Fields inherited from interface com.atlassian.jira.config.util.AttachmentPathManager
ATTACHMENTS_DIR
 
Constructor Summary
AttachmentPathManager.PropertiesAdaptor(ApplicationProperties applicationProperties, JiraHome jiraHome)
           
 
Method Summary
 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 path)
          Set a custom location to store attachments
 void setUseDefaultDirectory()
          Use the default location within JIRA Home to store attachments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentPathManager.PropertiesAdaptor

public AttachmentPathManager.PropertiesAdaptor(ApplicationProperties applicationProperties,
                                               JiraHome jiraHome)
Method Detail

getDefaultAttachmentPath

public String getDefaultAttachmentPath()
Description copied from interface: AttachmentPathManager
Returns the attachment path that will be used by default if JIRA is so configured. This will live as a subdirectory of jira-home.

Specified by:
getDefaultAttachmentPath in interface AttachmentPathManager
Returns:
the attachment path that will be used by default if JIRA is so configured.

getAttachmentPath

public String getAttachmentPath()
Description copied from interface: AttachmentPathManager
Returns the path used to store attachments

Specified by:
getAttachmentPath in interface AttachmentPathManager
Returns:
the path used to store attachments

setCustomAttachmentPath

public void setCustomAttachmentPath(String path)
Description copied from interface: AttachmentPathManager
Set a custom location to store attachments

Specified by:
setCustomAttachmentPath in interface AttachmentPathManager
Parameters:
path - path to store attachments

setUseDefaultDirectory

public void setUseDefaultDirectory()
Description copied from interface: AttachmentPathManager
Use the default location within JIRA Home to store attachments

Specified by:
setUseDefaultDirectory in interface AttachmentPathManager

getUseDefaultDirectory

public boolean getUseDefaultDirectory()
Description copied from interface: AttachmentPathManager
Returns true if attachments are stored within JIRA Home

Specified by:
getUseDefaultDirectory in interface AttachmentPathManager
Returns:
true if attachments are stored within JIRA Home

disableAttachments

public void disableAttachments()
Description copied from interface: AttachmentPathManager
Turns "Allow Attachments" to off.

Specified by:
disableAttachments in interface AttachmentPathManager

getMode

public AttachmentPathManager.Mode getMode()
Specified by:
getMode in interface AttachmentPathManager


Copyright © 2002-2012 Atlassian. All Rights Reserved.