Package org.forgerock.config.resolvers
Interface PropertyResolver
- All Known Implementing Classes:
ChainedPropertyResolver
,EnvironmentVariableResolver
,FlatFileResolver
,JsonValueResolver
,ProductPathResolver
,PropertiesResolver
,SystemPropertyResolver
public interface PropertyResolver
A property resolver attempt to get the value of a given config property.
-
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(String key) Deprecated.getProperty
(String key, boolean sensitive) Returns the value of the specified property.getProperty
(String key, String defaultValue) Deprecated.In favour ofgetProperty(String, String, boolean)
getProperty
(String key, String defaultValue, boolean sensitive) Returns the value of the specified property.
-
Method Details
-
getProperty
Deprecated.In favour ofgetProperty(String, boolean)
Returns the value of the specified property. The method returns an emptyOptional
if the property is not found. The resolved property is considered as sensitive and will not appear in logs.- Parameters:
key
- The name of the requested property. The key can't be null.- Returns:
- An
Optional
string that contains the value of the requested property, or emptyOptional
if property is undefined. - Throws:
NullPointerException
- if key is null.
-
getProperty
Returns the value of the specified property. The method returns an emptyOptional
if the property is not found. The resolved property has to be considered sensitive ifsensitive
istrue
and implementations are required to handle it with special attention (no logs, ...).- Parameters:
key
- The name of the requested property. The key can't be null.sensitive
-true
is the property value has to be considered a sensitive value (such as a password).- Returns:
- An
Optional
string that contains the value of the requested property, or emptyOptional
if property is undefined. - Throws:
NullPointerException
- if key is null.
-
getProperty
Deprecated.In favour ofgetProperty(String, String, boolean)
Returns the value of the specified property. The method returns an emptyOptional
if the property is not found and there is no default value provided. The resolved property is considered as sensitive and will not appear in logs.- Parameters:
key
- The name of the requested property. The key can't be null.defaultValue
- The default value if the property is not defined.- Returns:
- An
Optional
string that contains the value of the requested property, or emptyOptional
if property is undefined and a default is not supplied. - Throws:
NullPointerException
- if key is null.
-
getProperty
Returns the value of the specified property. The method returns an emptyOptional
if the property is not found and there is no default value provided. The resolved property has to be considered sensitive ifsensitive
istrue
and implementations are required to handle it with special attention (no logs, ...).- Parameters:
key
- The name of the requested property. The key can't be null.defaultValue
- The default value if the property is not defined.sensitive
-true
is the property value has to be considered a sensitive value (such as a password).- Returns:
- An
Optional
string that contains the value of the requested property, or emptyOptional
if property is undefined and a default is not supplied. - Throws:
NullPointerException
- if key is null.
-
getProperty(String, boolean)