Class RedactionUtils.RedactionContext

  • Enclosing class:
    RedactionUtils

    public static final class RedactionUtils.RedactionContext
    extends Object
    A helper class to build unique mappings from original to redacted names.
    • Constructor Detail

      • RedactionContext

        public RedactionContext()
    • Method Detail

      • addName

        public void addName​(String name,
                            String redactionPrefix)
        Add a name to be redacted.
        Parameters:
        name - original name
        redactionPrefix - prefix for the redacted name
      • addEquivalentName

        public void addEquivalentName​(String original,
                                      String equivalent,
                                      String redactionPrefix)
        Add a name that needs to be mapped to the same redacted format as another one.
        Parameters:
        original - original name already mapped (will be added automatically if missing)
        equivalent - another name that needs to be mapped to the same redacted name
        redactionPrefix - prefix for the redacted name
      • getRedactions

        public Map<String,​String> getRedactions()
        Get a map of original to redacted names.