|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi 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 exist, it falls back to the 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 it's possible to distinguish the absence of a property value from it being set to false.
Method Summary | |
---|---|
Map<String,Object> |
asMap()
This will return all application and typed values. |
String |
getContentType()
|
String |
getDefaultBackedString(String name)
Get the property from the application properties, but if not found, try to get from the default properties file. |
String |
getDefaultBackedText(String name)
Get the property from the application properties, but if not found, try to get from the default properties file. |
Collection<String> |
getDefaultKeys()
Get all the keys from the default properties |
Locale |
getDefaultLocale()
|
String |
getDefaultString(String name)
Get the default property (if the property is not set) |
String |
getEncoding()
Convenience method to get the content type for an application |
Collection<String> |
getKeys()
|
String |
getMailEncoding()
Convenience method to get the email encoding |
boolean |
getOption(String key)
Get the option from the application properties, but if not found, try to get from the default properties file. |
String |
getString(String name)
|
Collection<String> |
getStringsWithPrefix(String prefix)
|
String |
getText(String name)
|
void |
refresh()
Refresh application properties object by refreshing the PropertiesManager |
void |
setOption(String key,
boolean value)
|
void |
setString(String name,
String value)
|
void |
setText(String name,
String value)
|
Method Detail |
---|
String getText(String name)
String getDefaultBackedText(String name)
void setText(String name, String value)
String getString(String name)
Collection<String> getDefaultKeys()
String getDefaultBackedString(String name)
String getDefaultString(String name)
name
- the name of the property.void setString(String name, String value)
boolean getOption(String key)
Collection<String> getKeys()
void setOption(String key, boolean value)
String getEncoding()
String getMailEncoding()
String getContentType()
void refresh()
Locale getDefaultLocale()
Collection<String> getStringsWithPrefix(String prefix)
Map<String,Object> asMap()
Map.keySet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |