com.atlassian.jira.config.properties
Interface JiraProperties

All Known Implementing Classes:
JiraPropertiesImpl

public interface JiraProperties

Provides controlled access to system properties. Available from the container.

Default implementation provides caching of keys to minimize access to synchronized static getters such as System.getProperty(String) or Boolean.getBoolean(String).

You may obtain implementations in the following ways:

Since:
v6.1

Method Summary
 Boolean getBoolean(String key)
          Retrieves a system property of the given name as a boolean.
 String getCustomDirectoryPlugins()
           
 Integer getInteger(String key)
          Retrieves a system property of the given name as an integer.
 Integer getInteger(String key, Integer defaultInteger)
          Retrieves a system property of the given name as an integer, with a default value to be returned if property is not set.
 Long getLong(String key)
          Retrieves a system property of the given name as a long.
 Long getLong(String key, Long defaultLong)
          Retrieves a system property of the given name as a long, with a default value to be returned if property is not set.
 String getProductName()
          Name of the product as it was when originally installed.
 Properties getProperties()
          Retrieves all system properties as a properties object.
 String getProperty(String key)
          Retrieves a system property of the given name
 String getProperty(String key, String defaultString)
          Retrieves a system property of the given name, with a default value to be returned if property is not set.
 boolean isBundledPluginsDisabled()
           
 boolean isCustomPathPluginsEnabled()
           
 boolean isDangerMode()
           
 boolean isDarkFeaturesDisabled()
           
 boolean isDecodeMailParameters()
           
 boolean isDevMode()
           
 boolean isI18nReloadBundles()
           
 boolean isSuperBatchingDisabled()
           
 boolean isWebSudoDisabled()
           
 boolean isXsrfDetectionCheckRequired()
           
 boolean isXsrfDiagnostics()
           
 void refresh()
          Causes any previously cached values to be invalidated.
 void setProperties(Properties props)
          Sets the given properties as system properties.
<T> void
setProperty(String key, T value)
          Sets the key-value pair into the system properties.
 boolean showPerformanceMonitor()
           
 void unsetProperty(String key)
          Removes an entry in system properties under the given key.
 

Method Detail

getProperty

String getProperty(String key)
Retrieves a system property of the given name

Parameters:
key - the name of the property.
Returns:
the value of the system property, or null if not defined.

getProperty

String getProperty(String key,
                   String defaultString)
Retrieves a system property of the given name, with a default value to be returned if property is not set.

Parameters:
key - the name of the property.
defaultString - the default value.
Returns:
the value of the system property, or defaultString, if property not defined.

setProperty

<T> void setProperty(String key,
                     T value)
Sets the key-value pair into the system properties. The value will be set as string using the Object.toString() method

Parameters:
key - the name of the property
value - the value of the property, stored as a String.

unsetProperty

void unsetProperty(String key)
Removes an entry in system properties under the given key.

Parameters:
key - the name of the property to be removed.

getBoolean

Boolean getBoolean(String key)
Retrieves a system property of the given name as a boolean.

Parameters:
key - the name of the property.
Returns:
the value of the system property, or false if not defined.

getInteger

Integer getInteger(String key)
Retrieves a system property of the given name as an integer.

Parameters:
key - the name of the property.
Returns:
the value of the system property, or null if not defined.

getInteger

Integer getInteger(String key,
                   Integer defaultInteger)
Retrieves a system property of the given name as an integer, with a default value to be returned if property is not set.

Parameters:
key - the name of the property.
defaultInteger - the default value.
Returns:
the value of the system property, or defaultString, if property not defined.

getLong

Long getLong(String key)
Retrieves a system property of the given name as a long.

Parameters:
key - the name of the property.
Returns:
the value of the system property, or null if not defined.

getLong

Long getLong(String key,
             Long defaultLong)
Retrieves a system property of the given name as a long, with a default value to be returned if property is not set.

Parameters:
key - the name of the property.
defaultLong - the default value.
Returns:
the value of the system property, or defaultString, if property not defined.

getProperties

Properties getProperties()
Retrieves all system properties as a properties object. Note, this is not a view of the system properties, rather a snapshot at the time of the call.

Returns:
system properties.

setProperties

void setProperties(Properties props)
Sets the given properties as system properties. Not that this will unset any properties not mentioned in the input properties object.

Parameters:
props - the target system properties.
See Also:
System#setProperties(Properties)}

refresh

void refresh()
Causes any previously cached values to be invalidated. As long as this object is used to set or retrieve system properties it is not necessary to call this method. Call it only if you caused a system property change in another way than setProperty(String, Object), setProperties(java.util.Properties) or unsetProperty(String).


isDevMode

boolean isDevMode()

isXsrfDetectionCheckRequired

boolean isXsrfDetectionCheckRequired()

isSuperBatchingDisabled

boolean isSuperBatchingDisabled()

isDecodeMailParameters

boolean isDecodeMailParameters()

isCustomPathPluginsEnabled

boolean isCustomPathPluginsEnabled()

getCustomDirectoryPlugins

String getCustomDirectoryPlugins()

isWebSudoDisabled

boolean isWebSudoDisabled()

isI18nReloadBundles

boolean isI18nReloadBundles()

showPerformanceMonitor

boolean showPerformanceMonitor()

isBundledPluginsDisabled

boolean isBundledPluginsDisabled()

isDarkFeaturesDisabled

boolean isDarkFeaturesDisabled()

isDangerMode

boolean isDangerMode()

isXsrfDiagnostics

boolean isXsrfDiagnostics()

getProductName

@ExperimentalApi
String getProductName()
Name of the product as it was when originally installed. Intended for use during setup.



Copyright © 2002-2014 Atlassian. All Rights Reserved.