public class

PropertiesUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.config.properties.PropertiesUtil

Summary

Public Methods
static boolean getBooleanProperty(ApplicationProperties applicationProperties, String propertyKey, boolean defaultValue)
Utility method for getting parameters.
static int getIntProperty(ApplicationProperties applicationProperties, String propertyKey, int defaultValue)
Utility method for getting parameters.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static boolean getBooleanProperty (ApplicationProperties applicationProperties, String propertyKey, boolean defaultValue)

Utility method for getting parameters.

Parses the defined application property to a boolean if possible. If the defined value is missing or invalid, then it returns the given defaultValue instead.

Parameters
applicationProperties application properties
propertyKey property key
defaultValue The default value to use if we can't find a boolean for the given key.
Returns
  • the boolean value for the given property key, or the default value if a valid value was not found.

public static int getIntProperty (ApplicationProperties applicationProperties, String propertyKey, int defaultValue)

Utility method for getting parameters.

Parses the defined application property to an int if possible. If the defined value is missing or invalid, then it returns the given defaultValue instead.

Parameters
applicationProperties application properties
propertyKey property key
defaultValue The default value to use if we can't find an int for the given key.
Returns
  • the int value for the given property key, or the default value if a valid value was not found.