public interface ResourcePreProcessor
Reader and writes the processed content to the
Writer. The processor should focus only on transformation. If a processing fails, it is preferred to
propagate the exception, because wro4j can allow custom behavior for this situation. It is possible to treat the
exceptions by leaving the processed output unchanged, but in this case you may not benefit of global configuration.void process(Resource resource, Reader reader, Writer writer) throws IOException
Resource, because
this way you can ignore the other preProcessors from the chain.RuntimeException and the processing chain is interrupted (by default)WroConfiguration.isIgnoreFailingProcessor() is true)resource - the original resource as it found in the model.reader - Reader used to read processed resource content.writer - Writer where used to write processed results.IOException - when an exception occurs. The future version will change the exception type to Exception, because
any exception may occur during processing. The processing failure will be handled based on value of
WroConfiguration.isIgnoreFailingProcessor() configuration flag.Copyright © 2008-2014. All Rights Reserved.