public class RedactionPolicy extends Object
Represents a sanitization policy, containing a set of specific redactions to apply.
Learn more
| Constructor and Description |
|---|
RedactionPolicy()
Creates a new instance of Redaction policy.
|
RedactionPolicy(Redaction[] redactions)
Creates a new instance of Redaction policy with a specific list of redactions.
|
| Modifier and Type | Method and Description |
|---|---|
Redaction[] |
getRedactions()
Gets an array of fully configured
Redaction-derived classes. |
static RedactionPolicy |
load(InputStream input)
Loads an instance of
RedactionPolicy from a stream. |
static RedactionPolicy |
load(String filePath)
Loads an instance of
RedactionPolicy from a file path. |
void |
save(OutputStream output)
Saves the redaction policy to a stream.
|
void |
save(String filePath)
Saves the redaction policy to a file.
|
public RedactionPolicy()
Creates a new instance of Redaction policy.
public RedactionPolicy(Redaction[] redactions)
Creates a new instance of Redaction policy with a specific list of redactions.
redactions - An array of redactions for the policypublic final Redaction[] getRedactions()
Gets an array of fully configured Redaction-derived classes.
Redaction-derived classes.public static RedactionPolicy load(InputStream input) throws Exception
Loads an instance of RedactionPolicy from a stream.
input - Stream containing XML configurationExceptionpublic static RedactionPolicy load(String filePath) throws Exception
Loads an instance of RedactionPolicy from a file path.
filePath - Path to XML fileExceptionpublic final void save(OutputStream output) throws Exception
Saves the redaction policy to a stream.
output - Target stream to save the policyExceptionCopyright © 2025. All rights reserved.