Making a Custom PreFilter
To make a custom prefilter you must create a Java class that implements the following interface:
package com.escenic.syndication.xml.filter; import java.io.InputStream; public interface StreamFilter { InputStream filter(InputStream pStream); }
Prefilters can be chained, so the filter()
method
accepts a data stream that is either the content of the original file to
be imported or the output of the preceding prefilter in the chain. The
last prefilter in a chain must output well-formed XML.
A prefilter may throw an exception if it encounters an error or unexpected data in the input stream. This will cause the import service to abandon processing of the current import file and move the original file to the error directory specified in the task configuration (see Creating Import Tasks).