public class DefaultProcessorDecorator extends ProcessorDecorator
| Constructor and Description |
|---|
DefaultProcessorDecorator(Object processor,
boolean minimize) |
DefaultProcessorDecorator(Object processor,
ProcessingCriteria criteria) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isEnabled(Resource resource) |
void |
process(Resource resource,
Reader reader,
Writer writer)
Process a content supplied by a reader and perform some sort of processing.
|
isEligible, toStringdestroy, getSupportedResourceType, getSupportedResourceTypeInternal, getSupportedResourceTypes, isImportAware, isMinimize, isMinimizeInternal, isSupported, processgetDecoratedObject, getOriginalDecoratedObject, getOriginalDecoratedObjectpublic DefaultProcessorDecorator(Object processor, boolean minimize)
public DefaultProcessorDecorator(Object processor, ProcessingCriteria criteria)
public 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)process in interface ResourcePreProcessorprocess in class ProcessorDecoratorresource - 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.protected boolean isEnabled(Resource resource)
isEnabled in class ProcessorDecoratorresource - ResourcePreProcessor for which enabled flag should be checked.Copyright © 2008-2014. All Rights Reserved.