Class MaskedFieldUtils
java.lang.Object
org.qubership.integration.platform.engine.service.debugger.util.MaskedFieldUtils
Utility class for managing masked fields in Camel Exchange properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMaskedFields(org.apache.camel.Exchange exchange, Set<String> newFields) Adds new masked fields to the existing ones in the Exchange property.getMaskedFields(Object maskedFieldsProperty) Retrieves masked fields from a given property object.static voidsetMaskedFields(org.apache.camel.Exchange exchange, Set<String> fields) Stores masked fields into the Exchange property.
-
Constructor Details
-
MaskedFieldUtils
public MaskedFieldUtils()
-
-
Method Details
-
getMaskedFields
Retrieves masked fields from a given property object.Expects the property to be a
Set<String>. Returns an emptySetif null or not a Set.- Parameters:
maskedFieldsProperty- the property object holding masked fields- Returns:
- a new
Set<String>of masked fields (never null)
-
setMaskedFields
Stores masked fields into the Exchange property.Replaces any existing value with a new
Set<String>.- Parameters:
exchange- the Camel Exchangefields- the masked fields to store (ignored if null)
-
addMaskedFields
Adds new masked fields to the existing ones in the Exchange property.If no existing masked fields are present, they will be created.
- Parameters:
exchange- the Camel ExchangenewFields- the fields to add (ignored if null or empty)
-