Class SimpleDataMasking

  • All Implemented Interfaces:
    DataMasking

    public class SimpleDataMasking
    extends Object
    implements DataMasking
    Masked the attributes password, passwd and pwd as ****. To add new attributes for masking rules see addAttrName(String)
    Since:
    0.6.0
    Author:
    Alisson Gomes
    • Constructor Detail

      • SimpleDataMasking

        public SimpleDataMasking()
    • Method Detail

      • addAttrName

        public static void addAttrName​(String nameAttribute)
        Set new attribute name to masking your value by log API.
        Parameters:
        nameAttribute - attribute name to mask
      • mask

        public Object mask​(String attributeName,
                           Object data)
        Description copied from interface: DataMasking
        Evaluate if value of attributeName must be masked.
        Specified by:
        mask in interface DataMasking
        Parameters:
        attributeName - name of attribute
        data - value of attribute
        Returns:
        return the same object if data doesn't be masked, and a another otherwise.