public class MinimizeCSSReader extends AbstractMinimizeReader
Modifier and Type | Field and Description |
---|---|
private static Pattern |
CSS_URL_PATTERN_IMPORT |
private static Pattern |
CSS_URL_PATTERN_IMPORT_URL |
private static Pattern |
CSS_URL_PATTERN_NOTIMPORT_URL |
private static Pattern |
CSS_URL_PATTERN_SRC |
private static Pattern |
IMPORT_PATTERN |
_hashCache, _resolver
manager
objectModel, out, parameters, resolver, source
Constructor and Description |
---|
MinimizeCSSReader() |
Modifier and Type | Method and Description |
---|---|
private String |
__removeComment(String initialString) |
protected String |
_handleFile(HashCache.FileData file,
String internalContextPath,
String externalContextPath)
Implement to include a file
|
private String |
_handleFile(String fileUri,
String media,
String nestedParentFilesName,
String internalContextPath,
String externalContextPath) |
private String |
_replaceRelativeUri(String content,
String fileUri,
Pattern pattern) |
private String |
_resolveImportUrl(String content,
String nestedParentFilesName,
String internalContextPath,
String externalContextPath) |
String |
getMimeType() |
_handleFiles, generate, getExternalContextPath, getInternalContextPath, getKey, getLastModified, getValidity, service, setup
recycle, setOutputStream, shouldSetContentLength
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private static final Pattern CSS_URL_PATTERN_SRC
private static final Pattern CSS_URL_PATTERN_NOTIMPORT_URL
private static final Pattern CSS_URL_PATTERN_IMPORT_URL
private static final Pattern CSS_URL_PATTERN_IMPORT
private static final Pattern IMPORT_PATTERN
public MinimizeCSSReader()
public String getMimeType()
getMimeType
in interface SitemapOutputComponent
getMimeType
in class AbstractReader
protected String _handleFile(HashCache.FileData file, String internalContextPath, String externalContextPath)
AbstractMinimizeReader
_handleFile
in class AbstractMinimizeReader
file
- The file to includeinternalContextPath
- The context path to resolve importsexternalContextPath
- The context path used inside the filesprivate String _handleFile(String fileUri, String media, String nestedParentFilesName, String internalContextPath, String externalContextPath)
private String _resolveImportUrl(String content, String nestedParentFilesName, String internalContextPath, String externalContextPath) throws URISyntaxException
URISyntaxException
private String _replaceRelativeUri(String content, String fileUri, Pattern pattern) throws URISyntaxException
URISyntaxException
private String __removeComment(String initialString)