com.groupdocs.redaction

Class AnnotationRedaction



  • public class AnnotationRedaction
    extends Redaction

    Replaces annotation texts (comments etc), matching given regular expression

    • Constructor Detail

      • AnnotationRedaction

        public AnnotationRedaction(String pattern,
                           String replacement)

        Creates new instance

        Parameters:
        pattern - Regular expression to match
        replacement - Textual replacement for matched text
      • AnnotationRedaction

        public AnnotationRedaction(Pattern regex,
                           String replacement)

        Creates new instance

        Parameters:
        regex - Regular expression to match
        replacement - Textual replacement for matched text
    • Method Detail

      • getExpression

        public final Pattern getExpression()

        Regular expression to match

      • getReplacement

        public final String getReplacement()

        Textual replacement for matched text

      • applyTo

        public RedactionLogEntry applyTo(DocumentFormatInstance formatInstance)

        Applies redaction to given format instance

        Specified by:
        applyTo in class Redaction
        Parameters:
        formatInstance - An instance of a document to apply redaction
        Returns:
        Status of redaction: success/failure and error message if any