Class KeyMaskingConfig.Builder
java.lang.Object
dev.blaauwendraad.masker.json.config.KeyMaskingConfig.Builder
- Enclosing class:
- KeyMaskingConfig
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theKeyMaskingConfig
instance.maskBooleansWith
(boolean value) Mask all boolean values with the provided value.maskBooleansWith
(ValueMasker.BooleanMasker valueMasker) Mask all boolean values with the providedValueMasker
.maskBooleansWith
(String value) Mask all boolean values with the provided value.maskNumberDigitsWith
(int digit) Mask all digits of numeric values with the provided digit, preserving the length.maskNumbersWith
(int value) Mask all numeric values with the provided value.maskNumbersWith
(ValueMasker.NumberMasker valueMasker) Mask all numeric values with the providedValueMasker
.maskNumbersWith
(String value) Mask all numeric values with the provided value.maskStringCharactersWith
(String value) Mask all characters of string values with the provided character, preserving the length.maskStringsWith
(ValueMasker.StringMasker valueMasker) Mask all string values with the providedValueMasker
.maskStringsWith
(String value) Mask all string values with the provided value.
-
Method Details
-
maskStringsWith
Mask all string values with the provided value.For example, "maskMe": "secret" -> "maskMe": "***".
Masking strings with "***" is the default behaviour if no string masking option is set.
- Returns:
- the builder instance
- See Also:
-
maskStringCharactersWith
Mask all characters of string values with the provided character, preserving the length.For example, "maskMe": "secret" -> "maskMe": "******".
- Returns:
- the builder instance
- See Also:
-
maskStringsWith
Mask all string values with the providedValueMasker
.- Returns:
- the builder instance
- See Also:
-
maskNumbersWith
Mask all numeric values with the provided value.For example, "maskMe": 12345 -> "maskMe": "###".
Masking numbers with "###" is the default behaviour if no number masking option is set.
- Returns:
- the builder instance
- See Also:
-
maskNumbersWith
Mask all numeric values with the provided value.For example, "maskMe": 12345 -> "maskMe": 0.
- Returns:
- the builder instance
- See Also:
-
maskNumberDigitsWith
Mask all digits of numeric values with the provided digit, preserving the length.For example, "maskMe": 12345 -> "maskMe": 88888.
- Returns:
- the builder instance
- See Also:
-
maskNumbersWith
Mask all numeric values with the providedValueMasker
.- Returns:
- the builder instance
- See Also:
-
maskBooleansWith
Mask all boolean values with the provided value.For example, "maskMe": true -> "maskMe": "&&&".
Masking booleans with "&&&" is the default behaviour if no boolean masking option is set.
- Returns:
- the builder instance
- See Also:
-
maskBooleansWith
Mask all boolean values with the provided value.For example, "maskMe": true -> "maskMe": false.
- Returns:
- the builder instance
- See Also:
-
maskBooleansWith
Mask all boolean values with the providedValueMasker
.- Returns:
- the builder instance
- See Also:
-
build
Builds theKeyMaskingConfig
instance.- Returns:
- the
KeyMaskingConfig
instance
-