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(String filePath) throws Exception
Loads an instance of RedactionPolicy
from a file path.
filePath
- Path to XML fileException
public static RedactionPolicy load(InputStream input) throws Exception
Loads an instance of RedactionPolicy
from a stream.
input
- Stream containing XML configurationException
public final void save(String filePath) throws Exception
Saves the redaction policy to a file.
filePath
- Path to file.Exception
public final void save(OutputStream output) throws Exception
Saves the redaction policy to a stream.
output
- Target stream to save the policyException