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
-
Constructor Summary
ConstructorDescriptionSanitizableData
(PropertySource<?> propertySource, String key, Object value) Create a newSanitizableData
instance. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Return the key of the data.Return the property source that provided the data ornull
If the data was not from aPropertySource
.getValue()
Return the value of the data.Return a newSanitizableData
instance with sanitized value.Return a newSanitizableData
instance with a different value.
-
Field Details
-
SANITIZED_VALUE
Represents a sanitized value.- See Also:
-
-
Constructor Details
-
SanitizableData
Create a newSanitizableData
instance.- 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 ornull
If the data was not from aPropertySource
.- Returns:
- the property source that provided the data
-
getKey
Return the key of the data.- Returns:
- the data key
-
getValue
Return the value of the data.- Returns:
- the data value
-
withSanitizedValue
Return a newSanitizableData
instance with sanitized value.- Returns:
- a new sanitizable data instance.
- Since:
- 3.1.0
-
withValue
Return a newSanitizableData
instance with a different value.- Parameters:
value
- the new value (oftenSANITIZED_VALUE
- Returns:
- a new sanitizable data instance
-