Class SanitizableData

java.lang.Object
org.springframework.boot.actuate.endpoint.SanitizableData

public final class SanitizableData extends Object
Value object that represents the data that can be used by a SanitizingFunction.
Since:
2.6.0
Author:
Madhura Bhave, Rohan Goyal
  • Field Details

  • Constructor Details

    • SanitizableData

      public SanitizableData(PropertySource<?> propertySource, String key, Object value)
      Create a new SanitizableData instance.
      Parameters:
      propertySource - the property source that provided the data or null.
      key - the data key
      value - the data value
  • Method Details

    • getPropertySource

      public PropertySource<?> getPropertySource()
      Return the property source that provided the data or null If the data was not from a PropertySource.
      Returns:
      the property source that provided the data
    • getKey

      public String getKey()
      Return the key of the data.
      Returns:
      the data key
    • getValue

      public Object getValue()
      Return the value of the data.
      Returns:
      the data value
    • withSanitizedValue

      public SanitizableData withSanitizedValue()
      Return a new SanitizableData instance with sanitized value.
      Returns:
      a new sanitizable data instance.
      Since:
      3.1.0
    • withValue

      public SanitizableData withValue(Object value)
      Return a new SanitizableData instance with a different value.
      Parameters:
      value - the new value (often SANITIZED_VALUE
      Returns:
      a new sanitizable data instance