
com.marklogic.client.expression.RdtExpr Maven / Gradle / Ivy
Show all versions of marklogic-client-api Show documentation
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.client.expression;
import com.marklogic.client.type.PlanColumn;
import com.marklogic.client.type.PlanExprCol;
import com.marklogic.client.type.ServerExpression;
import java.util.Map;
/**
* The RdtExpr instance provides functions that build expressions
* for redacting the values of a column.
* In addition to using the provided functions,
* you can redact any column by using {@link PlanBuilder#as(PlanColumn, ServerExpression)}
* to rebind the column to an expression that replaces the existing value
* with an altered or randomly generated value.
* You can also hide a column by binding the column to the null value
* or by projecting other columns.
*
*/
public interface RdtExpr {
/**
* Redacts a column with string values by replacing each value with deterministic masking text.
* That is, a specific value generates the same masked value every time the value is redacted.
* Provides a client interface to the
* ordt:mask-deterministic
* server function.
* @param column the column to be redacted
* @return a PlanExprCol object
*/
PlanExprCol maskDeterministic(PlanColumn column);
/**
* Redacts a column with string values by replacing each value with deterministic masking text.
* That is, a specific value generates the same masked value every time the value is redacted.
* Provides a client interface to the
* ordt:mask-deterministic
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object
*/
PlanExprCol maskDeterministic(PlanColumn column, Map options);
/**
* Redacts a column with string values by replacing each value with random masking text.
* The same value may produce a different masked value every time the value is redacted.
* Provides a client interface to the
* ordt:mask-random
* server function.
* @param column the column to be redacted
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol maskRandom(PlanColumn column);
/**
* Redacts a column with string values by replacing each value with random masking text.
* The same value may produce a different masked value every time the value is redacted.
* Provides a client interface to the
* ordt:mask-random
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol maskRandom(PlanColumn column, Map options);
/**
* Redacts a column with date or datetime values either by masking part
* of the existing value or by generating a random value.
* Provides a client interface to the
* ordt:redact-datetime
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactDatetime(PlanColumn column, Map options);
/**
* Redacts a column with email address string
* that conforms to the pattern name@domain
.
* Provides a client interface to the
* ordt:redact-email
* server function.
* @param column the column to be redacted
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactEmail(PlanColumn column);
/**
* Redacts a column with email address string
* that conforms to the pattern name@domain
.
* Provides a client interface to the
* ordt:redact-email
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactEmail(PlanColumn column, Map options);
/**
* Redacts a column with IPv4 address string that conforms to a pattern with
* four blocks of 1-3 decimal digits separated by period (.) where the value of each block
* of digits is less than or equal to 255 as in 123.201.098.112
and
* 123.45.678.0
.
* Provides a client interface to the
* ordt:redact-ipv4
* server function.
* @param column the column to be redacted
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactIpv4(PlanColumn column);
/**
* Redacts a column with IPv4 address string that conforms to a pattern with
* four blocks of 1-3 decimal digits separated by period (.) where the value of each block
* of digits is less than or equal to 255 as in 123.201.098.112
and
* 123.45.678.0
.
* Provides a client interface to the
* ordt:redact-ipv4
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactIpv4(PlanColumn column, Map options);
/**
* Redacts a column by generating a random number within a configurable range
* either as a numeric data type or as a formatted string.
* Provides a client interface to the
* ordt:redact-number
* server function.
* @param column the column to be redacted
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactNumber(PlanColumn column);
/**
* Redacts a column by generating a random number within a configurable range
* either as a numeric data type or as a formatted string.
* Provides a client interface to the
* ordt:redact-number
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactNumber(PlanColumn column, Map options);
/**
* Redacts a string column by applying a regular expression.
* Provides a client interface to the
* ordt:redact-regex
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactRegex(PlanColumn column, Map options);
/**
* Redacts a column with a 10-digit US phone number string
* by generating random numbers or replacing numbers with a masking character.
* Provides a client interface to the
* ordt:redact-us-phone
* server function.
* @param column the column to be redacted
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactUsPhone(PlanColumn column);
/**
* Redacts a column with a 10-digit US phone number string
* by generating random numbers or replacing numbers with a masking character.
* Provides a client interface to the
* ordt:redact-us-phone
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactUsPhone(PlanColumn column, Map options);
/**
* Redacts a column with a 9-digit US SSN (Social Security Number) string
* by generating random numbers or replacing numbers with a masking character.
* Provides a client interface to the
* ordt:redact-us-ssn
* server function.
* @param column the column to be redacted
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactUsSsn(PlanColumn column);
/**
* Redacts a column with a 9-digit US SSN (Social Security Number) string
* by generating random numbers or replacing numbers with a masking character.
* Provides a client interface to the
* ordt:redact-us-ssn
* server function.
* @param column the column to be redacted
* @param options the options for redacting the column
* @return a PlanExprCol object for the redacted column
*/
PlanExprCol redactUsSsn(PlanColumn column, Map options);
}