ro.isdc.wro.model.resource.processor.decorator
Class MinimizeAwareProcessorDecorator
java.lang.Object
ro.isdc.wro.util.AbstractDecorator<T>
ro.isdc.wro.model.resource.processor.decorator.AbstractProcessorDecoratorSupport<ResourcePreProcessor>
ro.isdc.wro.model.resource.processor.decorator.ProcessorDecorator
ro.isdc.wro.model.resource.processor.decorator.MinimizeAwareProcessorDecorator
- All Implemented Interfaces:
- ImportAware, MinimizeAware, ResourcePostProcessor, ResourcePreProcessor, SupportAware, SupportedResourceTypeAware, ObjectDecorator<ResourcePreProcessor>
public class MinimizeAwareProcessorDecorator
- extends ProcessorDecorator
Enhance the decorated processor with the ability to skip processing based on minimize aware state of the processor.
In other words, if the processor is minimize aware and the minimize flag is set to false, the processor won't be
applied and the content will remain unchanged.
- Since:
- 1.4.7
- Author:
- Alex Objelean
MinimizeAwareProcessorDecorator
public MinimizeAwareProcessorDecorator(Object processor)
- Uses minimize flag as true by default.
- Parameters:
processor
-
MinimizeAwareProcessorDecorator
public MinimizeAwareProcessorDecorator(Object processor,
boolean minimize)
- Decorates a pre or post processor.
isEnabled
protected boolean isEnabled(Resource resource)
-
- Overrides:
isEnabled
in class ProcessorDecorator
- Parameters:
resource
- ResourcePreProcessor
for which enabled flag should be checked.
- Returns:
- a flag indicating if this processor is enabled. When false, the processing will be skipped and the content
will be left unchanged. This value is true by default.
Copyright © 2008-2013. All Rights Reserved.