public class GenericJsonConfigurationHelper<J> extends AbstractBasicConfigurationHelper<J>
| Modifier and Type | Method and Description |
|---|---|
Optional<J> |
getBean()
Returns the target configuration object used by this data retriever, typically for
manual handling and/or troubleshooting purposes.
|
boolean |
getBoolean(String jsonPath)
Returns the
boolean value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element that
can be mapped to boolean. |
double |
getDouble(String jsonPath)
Returns the
double value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element that
can be mapped to double. |
int |
getInt(String jsonPath)
Returns the
int value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element that
can be mapped to int. |
long |
getLong(String jsonPath)
Returns the
long value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element that
can be mapped to long. |
String |
getString(String jsonPath)
Returns the
String value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element. |
setNullValueProviderpublic Optional<J> getBean()
ConfigurationDataRetrieverpublic boolean getBoolean(String jsonPath)
boolean value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element that
can be mapped to boolean.jsonPath - the path to readboolean value associated with the specified jsonPathcom.jayway.jsonpath.InvalidPathException - if the jsonPath expression is not validConfigurationException - if the jsonPath expression returns more than a
single elementClassCastException - if the jsonPath result cannot be assigned to
booleanpublic int getInt(String jsonPath)
int value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element that
can be mapped to int.jsonPath - the path to readint value associated with the specified jsonPathcom.jayway.jsonpath.InvalidPathException - if the jsonPath expression is not validConfigurationException - if the jsonPath expression returns more than a
single elementClassCastException - if the jsonPath result cannot be assigned to
intpublic long getLong(String jsonPath)
long value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element that
can be mapped to long.jsonPath - the path to readlong value associated with the specified jsonPathcom.jayway.jsonpath.InvalidPathException - if the jsonPath expression is not validConfigurationException - if the jsonPath expression returns more than a
single elementClassCastException - if the jsonPath result cannot be assigned to
longpublic double getDouble(String jsonPath)
double value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element that
can be mapped to double.jsonPath - the path to readdouble value associated with the specified jsonPathcom.jayway.jsonpath.InvalidPathException - if the jsonPath expression is not validConfigurationException - if the jsonPath expression returns more than a
single elementClassCastException - if the jsonPath result cannot be assigned to
doublepublic String getString(String jsonPath)
String value associated with the specified jsonPath in the
JsonNode in context, provided that the expression returns a single element.jsonPath - the path to readString value associated with the specified jsonPathcom.jayway.jsonpath.InvalidPathException - if the jsonPath expression is not validConfigurationException - if the jsonPath expression returns more than a
single elementCopyright © 2021. All rights reserved.