Class RedactClient

java.lang.Object
cloud.pangeacyber.pangea.Client
cloud.pangeacyber.pangea.redact.RedactClient

public class RedactClient extends Client
  • Field Details

    • serviceName

      public static String serviceName
  • Constructor Details

    • RedactClient

      public RedactClient(Config config)
  • Method Details

    • redactText

      public RedactTextResponse redactText(String text) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactText(RedactTextRequest request) instead.
      Redact
      Parameters:
      text - The text data to redact.
      Returns:
      RedactTextResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from provided text.
      Example:
      RedactTextResponse response = client.redactText("Jenny Jenny... 415-867-5309");
    • redactText

      public RedactTextResponse redactText(String text, boolean debug) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactText(RedactTextRequest request) instead.
      Redact - text, debug
      Parameters:
      text - The text data to redact.
      debug - Setting this value to true will provide a detailed analysis of the redacted data and the rules that caused redaction.
      Returns:
      RedactTextResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from provided text.
      Example:
      RedactTextResponse response = client.redactText("Jenny Jenny... 415-867-5309", true);
    • redactText

      public RedactTextResponse redactText(String text, Boolean debug, String[] rules) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactText(RedactTextRequest request) instead.
      Redact - text, debug, rules
      Parameters:
      text - The text data to redact.
      debug - Setting this value to true will provide a detailed analysis of the redacted data and the rules that caused redaction.
      rules - An array of redact rule short names.
      Returns:
      RedactTextResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from provided text.
      Example:
      RedactTextResponse response = client.redactText("Jenny Jenny... 415-867-5309", true, new String[] {"PHONE_NUMBER"});
    • redactText

      Redact
      Parameters:
      request - redact request with text and optional parameters
      Returns:
      RedactTextResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from provided text.
      Example:
      RedactTextResponse response = client.redactText( new RedactTextRequest.RedactTextRequestBuilder("Jenny Jenny... 415-867-5309").build() );
    • redactStructured

      public RedactStructuredResponse redactStructured(Object data) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactStructured(RedactStructuredRequest request) instead.
      Redact structured
      Parameters:
      data - Structured data to redact
      Returns:
      RedactStructuredResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from structured data (e.g., JSON).
      Example:
      Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("Name", "Jenny Jenny"); data.put("Phone", "This is its number: 415-867-5309"); RedactStructuredResponse response = client.redactStructured(data);
    • redactStructured

      public RedactStructuredResponse redactStructured(Object data, String[] rules) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactStructured(RedactStructuredRequest request) instead.
      Redact structured - rules
      Parameters:
      data - Structured data to redact
      rules - An array of redact rule short names
      Returns:
      RedactStructuredResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from structured data (e.g., JSON).
      Example:
      Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("Name", "Jenny Jenny"); data.put("Phone", "This is its number: 415-867-5309"); RedactStructuredResponse response = client.redactStructured(data, new String[] {"PHONE_NUMBER"});
    • redactStructured

      public RedactStructuredResponse redactStructured(Object data, String format) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactStructured(RedactStructuredRequest request) instead.
      Redact structured - data, format
      Parameters:
      data - Structured data to redact
      format - format of data. Support "json"
      Returns:
      RedactStructuredResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from structured data (e.g., JSON).
      Example:
      Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("Name", "Jenny Jenny"); data.put("Phone", "This is its number: 415-867-5309"); RedactStructuredResponse response = client.redactStructured(data, "json");
    • redactStructured

      public RedactStructuredResponse redactStructured(Object data, boolean debug) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactStructured(RedactStructuredRequest request) instead.
      Redact structured - data, debug
      Parameters:
      data - Structured data to redact
      debug - Setting this value to true will provide a detailed analysis of the redacted data and the rules that caused redaction.
      Returns:
      RedactStructuredResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from structured data (e.g., JSON).
      Example:
      Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("Name", "Jenny Jenny"); data.put("Phone", "This is its number: 415-867-5309"); RedactStructuredResponse response = client.redactStructured(data, true);
    • redactStructured

      public RedactStructuredResponse redactStructured(Object data, String format, boolean debug) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactStructured(RedactStructuredRequest request) instead.
      Redact structured - data, format, debug
      Parameters:
      data - Structured data to redact
      format - format of data. Support "json"
      debug - Setting this value to true will provide a detailed analysis of the redacted data and the rules that caused redaction.
      Returns:
      RedactStructuredResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from structured data (e.g., JSON).
      Example:
      Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("Name", "Jenny Jenny"); data.put("Phone", "This is its number: 415-867-5309"); RedactStructuredResponse response = client.redactStructured(data, "json", true);
    • redactStructured

      public RedactStructuredResponse redactStructured(Object data, boolean debug, String[] jsonp) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactStructured(RedactStructuredRequest request) instead.
      Redact structured - data, debug, jsonp
      Parameters:
      data - Structured data to redact
      debug - Setting this value to true will provide a detailed analysis of the redacted data and the rules that caused redaction.
      jsonp - JSON path(s) used to identify the specific JSON fields to redact in the structured data. Note: data parameter must be in JSON format.
      Returns:
      RedactStructuredResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from structured data (e.g., JSON).
      Example:
      Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("Name", "Jenny Jenny"); data.put("Phone", "This is its number: 415-867-5309"); RedactStructuredResponse response = client.redactStructured(data, true, new String[] {"Phone"});
    • redactStructured

      public RedactStructuredResponse redactStructured(Object data, boolean debug, String[] jsonp, String[] rules) throws PangeaException, PangeaAPIException
      Deprecated.
      use redactStructured(RedactStructuredRequest request) instead.
      Redact structured - data, debug, jsonp, rules
      Parameters:
      data - Structured data to redact
      debug - Setting this value to true will provide a detailed analysis of the redacted data and the rules that caused redaction.
      jsonp - JSON path(s) used to identify the specific JSON fields to redact in the structured data. Note: data parameter must be in JSON format.
      rules - An array of redact rule short names
      Returns:
      RedactStructuredResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from structured data (e.g., JSON).
      Example:
      Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("Name", "Jenny Jenny"); data.put("Phone", "This is its number: 415-867-5309"); RedactStructuredResponse response = client.redactStructured(data, true, new String[] {"Phone"}, new String[] {"PHONE_NUMBER"});
    • redactStructured

      Redact structured
      Parameters:
      request - redact structured request with object data and optional parameters
      Returns:
      RedactStructuredResponse
      Throws:
      PangeaException
      PangeaAPIException
      Description:
      Redact sensitive information from structured data (e.g., JSON).
      Example:
      Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put("Name", "Jenny Jenny"); data.put("Phone", "This is its number: 415-867-5309"); RedactStructuredResponse response = client.redactStructured( new RedactStructuredRequest.RedactStructuredRequestBuilder(data) .setDebug(true) .setJsonp(new String[] { "Phone", "Name" }) .setRules(new String[] { "PHONE_NUMBER" }) .build() );