Class EnvironmentFilterSpecification


  • public final class EnvironmentFilterSpecification
    extends java.lang.Object
    This class is passed to an instance of EnvironmentEndpointFilter (if one is defined) each time the EnvironmentEndpoint is invoked.
    Since:
    3.3.0
    • Method Detail

      • maskAll

        @NotNull
        public @NotNull EnvironmentFilterSpecification maskAll()
        Turn on global masking. Items can be unmasked by executing any of the exclude methods.
        Returns:
        this
      • maskNone

        @NotNull
        public @NotNull EnvironmentFilterSpecification maskNone()
        Turn off global masking. Items can be masked by executing any of the exclude methods.
        Returns:
        this
      • exclude

        @NotNull
        public @NotNull EnvironmentFilterSpecification exclude​(@NotNull
                                                               @NotNull java.util.function.Predicate<java.lang.String> keyPredicate)
        Adds a predicate to test property keys. If the maskAll() flag is set then this will be used for exceptions (values in clear-text). If the maskNone() flag is set then this will be those values that are masked.
        Parameters:
        keyPredicate - A predicate to match against property keys for masking
        Returns:
        this
      • exclude

        @NotNull
        public @NotNull EnvironmentFilterSpecification exclude​(@NotNull
                                                               @NotNull java.lang.String... keys)
        Adds literal strings to the list of excluded keys. If the maskAll() flag is set then this list will be used for exceptions (values in clear-text). If the maskNone() flag is set then this list will be those values that are masked.
        Parameters:
        keys - Literal keys that should be excluded
        Returns:
        this
      • exclude

        @NotNull
        public @NotNull EnvironmentFilterSpecification exclude​(@NotNull
                                                               @NotNull java.util.regex.Pattern... keyPatterns)
        Adds regular expression patterns to the list of known masks. If the maskAll() flag is set then this list will be used for exceptions (values in clear-text). If the maskNone() flag is set then this list will be those values that are masked. Patterns must match the entire property key.
        Parameters:
        keyPatterns - The patterns used to compare keys to exclude them
        Returns:
        this
      • legacyMasking

        @NotNull
        public @NotNull EnvironmentFilterSpecification legacyMasking()
        Configures the key masking to behave as it did prior to 3.3.0.
        Returns:
        this