Class ApplicationPropertiesImpl
java.lang.Object
com.atlassian.jira.config.properties.ApplicationPropertiesImpl
- All Implemented Interfaces:
ApplicationProperties
A class to manage the interface with a single property set, used for application properties
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionApplicationPropertiesImpl
(ApplicationPropertiesStore applicationPropertiesStore) -
Method Summary
Modifier and TypeMethodDescriptionasMap()
This will return all application and typed values.boolean
getDefaultBackedString
(String name) Get the property from the application properties, but if not found, try to get from the default properties file.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 propertiesReturns the defaultLocale
set up on the JIRA instance.getDefaultString
(String name) Get the default property (if the property is not set)Returns the encoding to be used by JIRA from the application properties.getKeys()
Convenience method to get the email encodingboolean
Get the option from the application properties, but if not found, try to get from the default properties file.Returns the value of the given key.getStringsWithPrefix
(String prefix) void
onClearCache
(ClearCacheEvent event) void
refresh()
Refresh application properties object by refreshing the PropertiesManagervoid
Sets the boolean application property.void
Sets the string application property.void
Set the text application property.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.jira.config.properties.ApplicationProperties
getJiraBaseUrl
-
Field Details
-
DEFAULT_ENCODING
- See Also:
-
APP_PROPERTIES_SECRET_PREFIX
- See Also:
-
-
Constructor Details
-
ApplicationPropertiesImpl
-
-
Method Details
-
onClearCache
-
exists
- Specified by:
exists
in interfaceApplicationProperties
-
getText
- Specified by:
getText
in interfaceApplicationProperties
-
getString
Description copied from interface:ApplicationProperties
Returns the value of the given key.- Specified by:
getString
in interfaceApplicationProperties
- Parameters:
name
- the key to retrieve- Returns:
- the value of the key; may be null or an empty String
-
getDefaultKeys
Description copied from interface:ApplicationProperties
Get all the keys from the default properties- Specified by:
getDefaultKeys
in interfaceApplicationProperties
-
getDefaultBackedString
Description copied from interface:ApplicationProperties
Get the property from the application properties, but if not found, try to get from the default properties file.- Specified by:
getDefaultBackedString
in interfaceApplicationProperties
-
getDefaultBackedText
Description copied from interface:ApplicationProperties
Get the property from the application properties, but if not found, try to get from the default properties file.- Specified by:
getDefaultBackedText
in interfaceApplicationProperties
-
getDefaultString
Description copied from interface:ApplicationProperties
Get the default property (if the property is not set)- Specified by:
getDefaultString
in interfaceApplicationProperties
- Parameters:
name
- the name of the property.
-
getOption
Description copied from interface:ApplicationProperties
Get the option from the application properties, but if not found, try to get from the default properties file.- Specified by:
getOption
in interfaceApplicationProperties
-
getKeys
- Specified by:
getKeys
in interfaceApplicationProperties
-
asMap
Description copied from interface:ApplicationProperties
This will return all application and typed values. For example if the property is a boolean then aBoolean
object will be returned. If an application property has a null value, then the key will still be in theMap.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,ApplicationProperties.getDefaultBackedString(String)
orApplicationProperties.getOption(String)
will be the best choice.- Specified by:
asMap
in interfaceApplicationProperties
- Returns:
- a map of key to actual value object
-
setString
Description copied from interface:ApplicationProperties
Sets the string application property. Once the property is set, this method publishes an instance ofStringApplicationPropertySetEvent
.- Specified by:
setString
in interfaceApplicationProperties
- Parameters:
key
- the key of the application property.value
- the value of the application property.
-
setText
Description copied from interface:ApplicationProperties
Set the text application property. Once the property is set, this method publishes an instance ofStringApplicationPropertySetEvent
.- Specified by:
setText
in interfaceApplicationProperties
- Parameters:
key
- the key of the application property.value
- the value of the application property.
-
setOption
Description copied from interface:ApplicationProperties
Sets the boolean application property. Once the property is set, this method publishes an instance ofBooleanApplicationPropertySetEvent
.- Specified by:
setOption
in interfaceApplicationProperties
- Parameters:
key
- the key of the application property.value
- the value of the application property.
-
getEncoding
Description copied from interface:ApplicationProperties
Returns the encoding to be used by JIRA from the application properties. If application properties are not available, it returns UTF-8 by default.- Specified by:
getEncoding
in interfaceApplicationProperties
-
getMailEncoding
Description copied from interface:ApplicationProperties
Convenience method to get the email encoding- Specified by:
getMailEncoding
in interfaceApplicationProperties
-
getContentType
- Specified by:
getContentType
in interfaceApplicationProperties
-
refresh
public void refresh()Description copied from interface:ApplicationProperties
Refresh application properties object by refreshing the PropertiesManager- Specified by:
refresh
in interfaceApplicationProperties
-
toString
-
getDefaultLocale
Description copied from interface:ApplicationProperties
Returns the defaultLocale
set up on the JIRA instance.- Specified by:
getDefaultLocale
in interfaceApplicationProperties
- Returns:
- the default locale.
-
getStringsWithPrefix
- Specified by:
getStringsWithPrefix
in interfaceApplicationProperties
-