public interface

JiraProperties

com.atlassian.jira.config.properties.JiraProperties
Known Indirect Subclasses

Class Overview

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 getProperty(String) or getBoolean(String).

You may obtain implementations in the following ways:

Summary

Public Methods
Boolean getBoolean(String key)
Retrieves a system property of the given name as a boolean.
String getCustomDirectoryPlugins()
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.
Integer getInteger(String key)
Retrieves a system property of the given name as an integer.
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.
Long getLong(String key)
Retrieves a system property of the given name as a long.
@ExperimentalApi 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.

Public Methods

public 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.

public String getCustomDirectoryPlugins ()

public 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.

public 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.

public 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.

public 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.

@ExperimentalApi public String getProductName ()

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Name of the product as it was when originally installed. Intended for use during setup.

public 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.

public 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.

public 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.

public boolean isBundledPluginsDisabled ()

public boolean isCustomPathPluginsEnabled ()

public boolean isDangerMode ()

public boolean isDarkFeaturesDisabled ()

public boolean isDecodeMailParameters ()

public boolean isDevMode ()

public boolean isI18nReloadBundles ()

public boolean isSuperBatchingDisabled ()

public boolean isWebSudoDisabled ()

public boolean isXsrfDetectionCheckRequired ()

public boolean isXsrfDiagnostics ()

public 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).

public 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
  • {@link System#setProperties(Properties)}

public void setProperty (String key, T value)

Sets the key-value pair into the system properties. The value will be set as string using the toString() method

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

public boolean showPerformanceMonitor ()

public void unsetProperty (String key)

Removes an entry in system properties under the given key.

Parameters
key the name of the property to be removed.