java.lang.Object
org.qubership.integration.platform.engine.service.debugger.util.MaskedFieldUtils

public class MaskedFieldUtils extends Object
Utility class for managing masked fields in Camel Exchange properties.
  • Constructor Details

    • MaskedFieldUtils

      public MaskedFieldUtils()
  • Method Details

    • getMaskedFields

      public static Set<String> getMaskedFields(Object maskedFieldsProperty)
      Retrieves masked fields from a given property object.

      Expects the property to be a Set<String>. Returns an empty Set if null or not a Set.

      Parameters:
      maskedFieldsProperty - the property object holding masked fields
      Returns:
      a new Set<String> of masked fields (never null)
    • setMaskedFields

      public static void setMaskedFields(org.apache.camel.Exchange exchange, Set<String> fields)
      Stores masked fields into the Exchange property.

      Replaces any existing value with a new Set<String>.

      Parameters:
      exchange - the Camel Exchange
      fields - the masked fields to store (ignored if null)
    • addMaskedFields

      public static void addMaskedFields(org.apache.camel.Exchange exchange, Set<String> newFields)
      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 Exchange
      newFields - the fields to add (ignored if null or empty)