com.atlassian.jira.config.properties
Interface ApplicationProperties

All Known Implementing Classes:
ApplicationPropertiesImpl

public interface ApplicationProperties

This can be used to lookup JIRA application properties. This uses a two stage strategy for finding property values. First the database is checked to see if a value exists. If it doesnt exists, it falls back to the jira-application.properties file for a value. Once a key is placed in the database (via an upgrade task or UI interaction) then it will always be loaded from the database. NOTE : Be very careful with boolean property values. Because of the way OSPropertySets work, its impossible to distinguish between properties that have a false value and properties that have NO value. Therefore it is usually better to have a "String" property set to the value "true" or "false" and then use Boolean.valueOf() in it. This way its possible detects the absence of a property value from it being set to false.


Method Summary
 boolean exists(String key)
          Deprecated. Use getDefaultBackedString() instead and look for null
 String getContentType()
           
 String getDefaultBackedString(String name)
           
 String getDefaultBackedText(String name)
           
 Locale getDefaultLocale()
           
 String getDefaultString(String name)
           
 String getEncoding()
           
 Collection<String> getKeys()
           
 String getMailEncoding()
           
 boolean getOption(String key)
           
 String getString(String name)
           
 Collection<String> getStringsWithPrefix(String prefix)
           
 String getText(String name)
           
 void refresh()
           
 void setOption(String key, boolean value)
           
 void setString(String name, String value)
           
 void setText(String name, String value)
           
 

Method Detail

getText

String getText(String name)

getDefaultBackedText

String getDefaultBackedText(String name)

setText

void setText(String name,
             String value)

getString

String getString(String name)

getDefaultBackedString

String getDefaultBackedString(String name)

getDefaultString

String getDefaultString(String name)

setString

void setString(String name,
               String value)

exists

boolean exists(String key)
Deprecated. Use getDefaultBackedString() instead and look for null

DOESN'T WORK, a getDefaultBackedString() call may return something, and this will return false, do not use!!!


getOption

boolean getOption(String key)

getKeys

Collection<String> getKeys()

setOption

void setOption(String key,
               boolean value)

getEncoding

String getEncoding()

getMailEncoding

String getMailEncoding()

getContentType

String getContentType()

refresh

void refresh()

getDefaultLocale

Locale getDefaultLocale()

getStringsWithPrefix

Collection<String> getStringsWithPrefix(String prefix)


Copyright © 2002-2010 Atlassian. All Rights Reserved.