com.groupdocs.redaction.redactions

Class MetadataRedaction

    • Constructor Detail

      • MetadataRedaction

        protected MetadataRedaction(int filter)

        Initializes a new instance of MetadataRedaction class. This constructor requires MetadataFilters as a parameter.

        Parameters:
        filter - Flags enumeration MetadataFilters
    • Method Detail

      • getFilter

        public final int getFilter()

        Gets the filter, which is used to select all or specific metadata, e.g. Author or Company.

        Returns:
        The filter, which is used to select all or specific metadata, e.g. Author or Company.
      • setFilter

        public final void setFilter(int value)

        Sets the filter, which is used to select all or specific metadata, e.g. Author or Company.

        Parameters:
        value - The filter, which is used to select all or specific metadata, e.g. Author or Company.
      • applyFilter

        protected final List<MetadataItem> applyFilter(MetadataCollection source)

        Applies the current Filter value to a given metadata dictionary.

        Parameters:
        source - Collection of the document's metadata
        Returns:
        List of metadata items, conforming to the filter
      • isApplicableTo

        protected abstract boolean isApplicableTo(MetadataItem item)

        Checks if this redaction could be applied to a given metadata item.

        Parameters:
        item - Metadata item
        Returns:
        True if redaction can be applied
      • applyTo

        protected abstract RedactorLogEntry applyTo(MetadataItem item,
                               IMetadataAccess metadata)

        Applies the redaction to a given metadata item.

        Parameters:
        item - Metadata item
        metadata - Metadata access
        Returns:
        Redaction result
      • applyTo

        public RedactorLogEntry applyTo(DocumentFormatInstance formatInstance)

        Applies the redaction to a given format instance.

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