@PublicApi
public interface ApplicationProperties
Modifier and Type | Method and Description |
---|---|
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()
Returns the default
Locale set up on the JIRA instance. |
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)
Sets the boolean application property.
|
void |
setString(String key,
String value)
Sets the string application property.
|
void |
setText(String key,
String value)
Set the text application property.
|
String getDefaultBackedText(String name)
void setText(String key, String value)
StringApplicationPropertySetEvent
.key
- the key of the application property.value
- the value of the application property.Collection<String> getDefaultKeys()
String getDefaultBackedString(String name)
String getDefaultString(String name)
name
- the name of the property.void setString(String key, String value)
StringApplicationPropertySetEvent
.key
- the key of the application property.value
- the value of the application property.boolean getOption(String key)
Collection<String> getKeys()
void setOption(String key, boolean value)
BooleanApplicationPropertySetEvent
.key
- the key of the application property.value
- the value of the application property.String getEncoding()
String getMailEncoding()
String getContentType()
void refresh()
Locale getDefaultLocale()
Locale
set up on the JIRA instance.Collection<String> getStringsWithPrefix(String prefix)
@Internal Map<String,Object> asMap()
Boolean
object will be returned.
If an application property has a null value, then the key will still be in the Map.keySet()
WARNING: This method is somewhat expensive. Do not use it unless you really
are doing something with all of the application properties, such as for the system information page.
If you are just retrieving a single property, then use one of the get
methods instead. For
most properties, getDefaultBackedString(String)
or getOption(String)
will be the best
choice.Copyright © 2002-2016 Atlassian. All Rights Reserved.