|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.mock.MockApplicationProperties
public class MockApplicationProperties
Simple ApplicationProperties implementation backed by a Map.
Constructor Summary | |
---|---|
MockApplicationProperties()
|
|
MockApplicationProperties(Map<String,Object> initialProperties)
|
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 |
setEncoding(String encoding)
|
void |
setOption(String key,
boolean value)
|
void |
setString(String name,
String value)
|
void |
setText(String name,
String value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockApplicationProperties()
public MockApplicationProperties(Map<String,Object> initialProperties)
Method Detail |
---|
public String getText(String name)
getText
in interface ApplicationProperties
public String getDefaultBackedText(String name)
ApplicationProperties
getDefaultBackedText
in interface ApplicationProperties
public void setText(String name, String value)
setText
in interface ApplicationProperties
public String getString(String name)
getString
in interface ApplicationProperties
public Collection<String> getDefaultKeys()
ApplicationProperties
getDefaultKeys
in interface ApplicationProperties
public String getDefaultBackedString(String name)
ApplicationProperties
getDefaultBackedString
in interface ApplicationProperties
public String getDefaultString(String name)
ApplicationProperties
getDefaultString
in interface ApplicationProperties
name
- the name of the property.public void setString(String name, String value)
setString
in interface ApplicationProperties
public boolean getOption(String key)
ApplicationProperties
getOption
in interface ApplicationProperties
public Collection<String> getKeys()
getKeys
in interface ApplicationProperties
public void setOption(String key, boolean value)
setOption
in interface ApplicationProperties
public String getEncoding()
ApplicationProperties
getEncoding
in interface ApplicationProperties
public String getMailEncoding()
ApplicationProperties
getMailEncoding
in interface ApplicationProperties
public void setEncoding(String encoding)
public String getContentType()
getContentType
in interface ApplicationProperties
public void refresh()
ApplicationProperties
refresh
in interface ApplicationProperties
public Locale getDefaultLocale()
getDefaultLocale
in interface ApplicationProperties
public Collection<String> getStringsWithPrefix(String prefix)
getStringsWithPrefix
in interface ApplicationProperties
public Map<String,Object> asMap()
ApplicationProperties
Map.keySet()
asMap
in interface ApplicationProperties
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |