public class ProcessorDecorator extends AbstractProcessorDecoratorSupport<ResourcePreProcessor>
ProcessorDecorator, though
it is not abstract (for backward compatibility reasons). It will be renamed to ProcessorDecorator.| Constructor and Description |
|---|
ProcessorDecorator(Object processor)
Hides the postProcessor adaptation logic.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEligible(boolean minimize,
ResourceType searchedType)
Indicates if the processor is eligible for usage based on provided criteria.
|
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.
|
String |
toString() |
getSupportedResourceType, getSupportedResourceTypeInternal, getSupportedResourceTypes, isImportAware, isMinimize, isMinimizeInternal, isSupported, processgetDecoratedObject, getOriginalDecoratedObject, getOriginalDecoratedObjectpublic ProcessorDecorator(Object processor)
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)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.public final boolean isEligible(boolean minimize,
ResourceType searchedType)
minimize - - when true the processor should be minimize aware.searchedType - - the type of the accepted processor. If the processor will have no type specified it will still be
eligible.protected boolean isEnabled(Resource resource)
resource - ResourcePreProcessor for which enabled flag should be checked.public String toString()
toString in class AbstractDecorator<ResourcePreProcessor>Copyright © 2008-2013. All Rights Reserved.