Class SettingsFilter

org.elasticsearch.common.settings.SettingsFilter

public final class SettingsFilter extends
A class that allows to filter settings objects by simple regular expression patterns or full settings keys. It's used for response filtering on the rest layer to for instance filter out sensitive information like access keys.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static
    Can be used to specify settings filter that will be used to filter out matching settings in toXContent method
  • Constructor Summary

    Constructors
    Constructor
    Description
    <> patterns)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    filter​(Settings settings)
     
    static Settings
    filterSettings​(org.elasticsearch.common.xcontent.ToXContent.Params params, Settings settings)
     
    <>
    Returns a set of patterns
    static boolean
     pattern)
    Returns true iff the given string is either a valid settings key pattern or a simple regular expression

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Field Details

    • SETTINGS_FILTER_PARAM

      public static  SETTINGS_FILTER_PARAM
      Can be used to specify settings filter that will be used to filter out matching settings in toXContent method
  • Constructor Details

    • SettingsFilter

      public SettingsFilter(<> patterns)
  • Method Details

    • getPatterns

      public <> getPatterns()
      Returns a set of patterns
    • isValidPattern

      public static boolean isValidPattern( pattern)
      Returns true iff the given string is either a valid settings key pattern or a simple regular expression
      See Also:
      Regex, AbstractScopedSettings.isValidKey(String)
    • addFilterSettingParams

      public void addFilterSettingParams(RestRequest request)
    • filterSettings

      public static Settings filterSettings(org.elasticsearch.common.xcontent.ToXContent.Params params, Settings settings)
    • filter

      public Settings filter(Settings settings)