com.groupdocs.redaction

Class RedactionPolicy



  • public class RedactionPolicy
    extends Object

    Represents a sanitization policy, containing a set of specific redactions to apply.

    • Constructor Detail

      • RedactionPolicy

        public RedactionPolicy()

        Creates a new instance of Redaction policy.

      • RedactionPolicy

        public RedactionPolicy(Redaction[] redactions)

        Creates a new instance of Redaction policy with a specific list of redactions.

        Parameters:
        redactions - An array of redactions for the policy
    • Method Detail

      • getRedactions

        public final Redaction[] getRedactions()

        Gets an array of fully configured Redaction-derived classes.

        Returns:
        An array of fully configured Redaction-derived classes.
      • load

        public static RedactionPolicy load(String filePath)
                                    throws Exception

        Loads an instance of RedactionPolicy from a file path.

        Parameters:
        filePath - Path to XML file
        Returns:
        Redaction policy
        Throws:
        Exception
      • load

        public static RedactionPolicy load(InputStream input)
                                    throws Exception

        Loads an instance of RedactionPolicy from a stream.

        Parameters:
        input - Stream containing XML configuration
        Returns:
        Redaction policy
        Throws:
        Exception
      • save

        public final void save(String filePath)
                        throws Exception

        Saves the redaction policy to a file.

        Parameters:
        filePath - Path to file.
        Throws:
        Exception
      • save

        public final void save(OutputStream output)
                        throws Exception

        Saves the redaction policy to a stream.

        Parameters:
        output - Target stream to save the policy
        Throws:
        Exception