Class SettingsFilter

  • public final class SettingsFilter
    extends java.lang.Object
    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 Detail


        public static java.lang.String SETTINGS_FILTER_PARAM
        Can be used to specify settings filter that will be used to filter out matching settings in toXContent method
    • Constructor Detail

      • SettingsFilter

        public SettingsFilter​(java.util.Collection<java.lang.String> patterns)
    • Method Detail

      • getPatterns

        public java.util.Set<java.lang.String> getPatterns()
        Returns a set of patterns
      • isValidPattern

        public static boolean isValidPattern​(java.lang.String 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)