Interface ConfigurationService
- All Known Implementing Classes:
ConfigurationServiceImpl
public interface ConfigurationService
Service holding runtime configuration properties.
- Since:
- 7.4
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBoolean
(String key) Returns the given property value if any.getDuration
(String key) Returns the given property value if any.getDuration
(String key, Duration defaultValue) Returns the given property value if any, otherwise returns the given default value.getInteger
(String key) Returns the given property value if any.int
getInteger
(String key, int defaultValue) Returns the given property value if any, otherwise returns the given default value.Returns the given property value if any.long
Returns the given property value if any, otherwise returns the given default value.Returns all the properties.getProperties
(String namespace) Returns the properties with key starting with the given namespace.getPropertiesAsJson
(String namespace) Returns the json string representing the properties with key starting with the given namespace.getProperty
(String key) Deprecated.getProperty
(String key, String defaultValue) Deprecated.since 11.1, usegetString(String, String)
insteadReturns the given property value if any.Returns the given property value if any, otherwise returns the given default value.boolean
isBooleanFalse
(String key) Returns true if given property exists and is false when compared to a boolean value.boolean
Deprecated.since 11.1, useisBooleanFalse(String)
insteadboolean
Deprecated.since 11.1, useisBooleanTrue(String)
insteadboolean
isBooleanTrue
(String key) Returns true if given property exists and is true when compared to a boolean value.
-
Field Details
-
LIST_SEPARATOR
- See Also:
-
-
Method Details
-
getString
Returns the given property value if any.- Parameters:
key
- the property key- Since:
- 11.1
-
getString
Returns the given property value if any, otherwise returns the given default value.- Parameters:
key
- the property keydefaultValue
- the default value for this key- Since:
- 11.1
-
getInteger
Returns the given property value if any.- Parameters:
key
- the property key- Since:
- 11.1
-
getInteger
Returns the given property value if any, otherwise returns the given default value.- Parameters:
key
- the property keydefaultValue
- the default value for this key- Since:
- 11.1
-
getLong
Returns the given property value if any.- Parameters:
key
- the property key- Since:
- 11.1
-
getLong
Returns the given property value if any, otherwise returns the given default value.- Parameters:
key
- the property keydefaultValue
- the default value for this key- Since:
- 11.1
-
getBoolean
Returns the given property value if any.- Parameters:
key
- the property key- Since:
- 11.1
-
isBooleanTrue
Returns true if given property exists and is true when compared to a boolean value.prop=true | isBooleanTrue("prop") = true prop=trUe | isBooleanTrue("prop") = true prop=false | isBooleanTrue("prop") = false prop=any | isBooleanTrue("prop") = false prop= | isBooleanTrue("prop") = false
- Since:
- 11.1
-
isBooleanFalse
Returns true if given property exists and is false when compared to a boolean value.prop=false | isBooleanFalse("prop") = true prop=fAlse | isBooleanFalse("prop") = true prop=true | isBooleanFalse("prop") = false prop=any | isBooleanFalse("prop") = false prop= | isBooleanFalse("prop") = false
- Since:
- 11.1
-
getDuration
Returns the given property value if any.- Parameters:
key
- the property key- Since:
- 11.1
-
getDuration
Returns the given property value if any, otherwise returns the given default value.- Parameters:
key
- the property keydefaultValue
- the default value for this key- Since:
- 11.1
-
getProperty
Deprecated.since 11.1, usegetString(String)
insteadReturns the given property value if any, otherwise null.- Parameters:
key
- the property key
-
getProperty
Deprecated.since 11.1, usegetString(String, String)
insteadReturns the given property value if any, otherwise returns the given default value.- Parameters:
key
- the property keydefaultValue
- the default value for this key
-
getProperties
Returns the properties with key starting with the given namespace.- Parameters:
namespace
- the namespace- Returns:
- a map of properties with trimmed keys (namespace removed)
- Since:
- 10.3
-
getProperties
Map<String,Serializable> getProperties()Returns all the properties.- Returns:
- a map of properties
- Since:
- 2023.6
-
isBooleanPropertyTrue
Deprecated.since 11.1, useisBooleanTrue(String)
insteadReturns true if given property is true when compared to a boolean value. -
isBooleanPropertyFalse
Deprecated.since 11.1, useisBooleanFalse(String)
insteadReturns true if given property is false when compared to a boolean value.Returns also true if property is not blank and is not equals to true.
-
getPropertiesAsJson
Returns the json string representing the properties with key starting with the given namespace.- Parameters:
namespace
- the namespace of the properties- Throws:
IOException
- Since:
- 10.3
-
getString(String)
instead