com.groupdocs.redaction

Class ExactPhraseRedaction



  • public class ExactPhraseRedaction
    extends TextRedaction

    Replaces exact phrase in document's text

    • Constructor Detail

      • ExactPhraseRedaction

        public ExactPhraseRedaction(String searchPhrase,
                            ReplacementOptions options)

        Creates new instance in case insensitive mode

        Parameters:
        searchPhrase - String to search and replace
        options - Replacement options (textual, color)
      • ExactPhraseRedaction

        public ExactPhraseRedaction(String searchPhrase,
                            boolean isCaseSensitive,
                            ReplacementOptions options)

        Creates new instance

        Parameters:
        searchPhrase - String to search and replace
        isCaseSensitive - True if case sensitive search is required
        options - Replacement options (textual, color)
    • Method Detail

      • getSearchPhrase

        public final String getSearchPhrase()

        String to search and replace

      • isCaseSensitive

        public final boolean isCaseSensitive()

        True if case sensitive search is used

      • 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