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.booleangetDefaultBackedString(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 defaultLocaleset 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 encodingbooleanGet 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) voidonClearCache(ClearCacheEvent event) voidrefresh()Refresh application properties object by refreshing the PropertiesManagervoidSets the boolean application property.voidSets the string application property.voidSet the text application property.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
existsin interfaceApplicationProperties
-
getText
- Specified by:
getTextin interfaceApplicationProperties
-
getString
Description copied from interface:ApplicationPropertiesReturns the value of the given key.- Specified by:
getStringin 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:ApplicationPropertiesGet all the keys from the default properties- Specified by:
getDefaultKeysin interfaceApplicationProperties
-
getDefaultBackedString
Description copied from interface:ApplicationPropertiesGet the property from the application properties, but if not found, try to get from the default properties file.- Specified by:
getDefaultBackedStringin interfaceApplicationProperties
-
getDefaultBackedText
Description copied from interface:ApplicationPropertiesGet the property from the application properties, but if not found, try to get from the default properties file.- Specified by:
getDefaultBackedTextin interfaceApplicationProperties
-
getDefaultString
Description copied from interface:ApplicationPropertiesGet the default property (if the property is not set)- Specified by:
getDefaultStringin interfaceApplicationProperties- Parameters:
name- the name of the property.
-
getOption
Description copied from interface:ApplicationPropertiesGet the option from the application properties, but if not found, try to get from the default properties file.- Specified by:
getOptionin interfaceApplicationProperties
-
getKeys
- Specified by:
getKeysin interfaceApplicationProperties
-
asMap
Description copied from interface:ApplicationPropertiesThis will return all application and typed values. For example if the property is a boolean then aBooleanobject 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 the application properties, such as for the system information page. If you are just retrieving a single property, then use one of the
getmethods instead. For most properties,ApplicationProperties.getDefaultBackedString(String)orApplicationProperties.getOption(String)will be the best choice.- Specified by:
asMapin interfaceApplicationProperties- Returns:
- a map of key to actual value object
-
setString
Description copied from interface:ApplicationPropertiesSets the string application property. Once the property is set, this method publishes an instance ofStringApplicationPropertySetEvent.- Specified by:
setStringin interfaceApplicationProperties- Parameters:
key- the key of the application property.value- the value of the application property.
-
setText
Description copied from interface:ApplicationPropertiesSet the text application property. Once the property is set, this method publishes an instance ofStringApplicationPropertySetEvent.- Specified by:
setTextin interfaceApplicationProperties- Parameters:
key- the key of the application property.value- the value of the application property.
-
setOption
Description copied from interface:ApplicationPropertiesSets the boolean application property. Once the property is set, this method publishes an instance ofBooleanApplicationPropertySetEvent.- Specified by:
setOptionin interfaceApplicationProperties- Parameters:
key- the key of the application property.value- the value of the application property.
-
getEncoding
Description copied from interface:ApplicationPropertiesReturns 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:
getEncodingin interfaceApplicationProperties
-
getMailEncoding
Description copied from interface:ApplicationPropertiesConvenience method to get the email encoding- Specified by:
getMailEncodingin interfaceApplicationProperties
-
getContentType
- Specified by:
getContentTypein interfaceApplicationProperties
-
refresh
public void refresh()Description copied from interface:ApplicationPropertiesRefresh application properties object by refreshing the PropertiesManager- Specified by:
refreshin interfaceApplicationProperties
-
toString
-
getDefaultLocale
Description copied from interface:ApplicationPropertiesReturns the defaultLocaleset up on the Jira instance.- Specified by:
getDefaultLocalein interfaceApplicationProperties- Returns:
- the default locale.
-
getStringsWithPrefix
- Specified by:
getStringsWithPrefixin interfaceApplicationProperties
-