@PublicApi public interface

JiraProperties

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

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

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.
String getPluginsRosterFile()
Properties getProperties()
Retrieves all system properties as a properties object.
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.
String getProperty(String key)
Retrieves a system property of the given name
Map<StringString> getSanitisedProperties()
Return a copy of the current properties with sensitive properties sanitised.
boolean isBundledPluginsDisabled()
boolean isContextBatchingDisabled()
boolean isCustomPathPluginsEnabled()
boolean isDarkFeaturesDisabled()
boolean isDecodeMailParameters()
boolean isDevMode()
boolean isI18nReloadBundles()
boolean isPluginsRosterFileEnabled()
boolean isResourceBundleCacheCleaningDisabled()
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.

public String getPluginsRosterFile ()

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, 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 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 Map<StringString> getSanitisedProperties ()

Return a copy of the current properties with sensitive properties sanitised. This should only be used when displaying properties to the user as some of the properties will not have their real values.

Returns
  • a view of the system properties.

public boolean isBundledPluginsDisabled ()

public boolean isContextBatchingDisabled ()

public boolean isCustomPathPluginsEnabled ()

public boolean isDarkFeaturesDisabled ()

public boolean isDecodeMailParameters ()

public boolean isDevMode ()

public boolean isI18nReloadBundles ()

public boolean isPluginsRosterFileEnabled ()

public boolean isResourceBundleCacheCleaningDisabled ()

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.