Class SanitizableData
java.lang.Object
org.springframework.boot.actuate.endpoint.SanitizableData
Value object that represents the data that can be used by a
SanitizingFunction.- Since:
- 2.6.0
- Author:
- Madhura Bhave, Rohan Goyal
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSanitizableData(@Nullable PropertySource<?> propertySource, String key, @Nullable Object value) Create a newSanitizableDatainstance. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Return the key of the data.Return the key as a lowercase value.@Nullable PropertySource<?> Return the property source that provided the data ornullIf the data was not from aPropertySource.@Nullable ObjectgetValue()Return the value of the data.Return a newSanitizableDatainstance with sanitized value.Return a newSanitizableDatainstance with a different value.
-
Field Details
-
SANITIZED_VALUE
-
-
Constructor Details
-
SanitizableData
public SanitizableData(@Nullable PropertySource<?> propertySource, String key, @Nullable Object value) Create a newSanitizableDatainstance.- Parameters:
propertySource- the property source that provided the data ornull.key- the data keyvalue- the data value
-
-
Method Details
-
getPropertySource
Return the property source that provided the data ornullIf the data was not from aPropertySource.- Returns:
- the property source that provided the data
-
getKey
-
getLowerCaseKey
Return the key as a lowercase value.- Returns:
- the key as a lowercase value
- Since:
- 3.5.0
-
getValue
-
withSanitizedValue
Return a newSanitizableDatainstance with sanitized value.- Returns:
- a new sanitizable data instance.
- Since:
- 3.1.0
-
withValue
Return a newSanitizableDatainstance with a different value.- Parameters:
value- the new value (oftenSANITIZED_VALUE- Returns:
- a new sanitizable data instance
-