ro.isdc.wro.model.resource.processor.impl.css
Class CssImportPreProcessor
java.lang.Object
ro.isdc.wro.model.resource.processor.impl.css.AbstractCssImportPreProcessor
ro.isdc.wro.model.resource.processor.impl.css.CssImportPreProcessor
- All Implemented Interfaces:
- ImportAware, ResourcePreProcessor
- Direct Known Subclasses:
- LessCssImportPreProcessor
@SupportedResourceType(value=CSS)
public class CssImportPreProcessor
- extends AbstractCssImportPreProcessor
CssImport Processor responsible for handling css @import
statement. It is implemented as both:
preProcessor & postProcessor. It is necessary because preProcessor is responsible for updating model with found
imported resources, while post processor removes import occurrences.
When processor finds an import which is not valid, it will check the
WroConfiguration.isIgnoreMissingResources()
flag. If it is set to false, the processor will fail.
- Author:
- Alex Objelean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALIAS
public static final String ALIAS
- See Also:
- Constant Field Values
CssImportPreProcessor
public CssImportPreProcessor()
doTransform
protected String doTransform(String cssContent,
List<Resource> foundImports)
throws IOException
- Perform actual transformation of provided cssContent and the list of found import resources.
- Specified by:
doTransform
in class AbstractCssImportPreProcessor
- Parameters:
cssContent
- the css to transform.foundImports
- the list of found imports.
- Throws:
IOException
removeImportStatements
protected String removeImportStatements(String cssContent)
- Returns:
- the css content with all css import statements removed.
Copyright © 2008-2013. All Rights Reserved.