Class Overview
Simple ApplicationProperties implementation backed by a Map.
Summary
Public Methods |
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
|
MockApplicationProperties
|
setDefaultLocale(Locale locale)
|
void
|
setEncoding(String encoding)
|
void
|
setOption(String key, boolean value)
|
void
|
setString(String name, String value)
|
void
|
setText(String name, String value)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
com.atlassian.jira.config.properties.ApplicationProperties
@Internal
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)
|
|
Public Constructors
public
MockApplicationProperties
()
Public Methods
This will return all application and typed values.
For example if the property is a boolean then a Boolean
object will be returned.
If an application property has a null value, then the key will still be in the 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.
Returns
- a map of key to actual value object
public
String
getContentType
()
public
String
getDefaultBackedString
(String name)
Get the property from the application properties, but if not found, try to get from the default properties file.
public
String
getDefaultBackedText
(String name)
Get the property from the application properties, but if not found, try to get from the default properties file.
Get all the keys from the default properties
public
Locale
getDefaultLocale
()
public
String
getDefaultString
(String name)
Get the default property (if the property is not set)
Parameters
name
| the name of the property.
|
public
String
getEncoding
()
Convenience method to get the content type for an application
public
String
getMailEncoding
()
Convenience method to get the email encoding
public
boolean
getOption
(String key)
Get the option from the application properties, but if not found, try to get from the default properties file.
public
void
refresh
()
Refresh application properties object by refreshing the PropertiesManager
public
void
setEncoding
(String encoding)
public
void
setOption
(String key, boolean value)