public abstract class AbstractMinimizeReader extends ServiceableReader implements CacheableProcessingComponent
Modifier and Type | Field and Description |
---|---|
protected HashCache |
_hashCache
the hash cache
|
protected SourceResolver |
_resolver
The source resolver
|
manager
objectModel, out, parameters, resolver, source
Constructor and Description |
---|
AbstractMinimizeReader() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
_handleFile(HashCache.FileData file,
String internalContextPath,
String externalContextPath)
Implement to include a file
|
protected String |
_handleFiles(List<HashCache.FileData> files,
String internalContextPath,
String externalContextPath)
Minimize files
|
void |
generate() |
protected String |
getExternalContextPath()
Get the context path to transform relative links to absolute links
|
protected String |
getInternalContextPath()
Get the context path to resolve imports internally
|
Serializable |
getKey() |
long |
getLastModified() |
SourceValidity |
getValidity() |
void |
service(ServiceManager smanager) |
void |
setup(SourceResolver res,
Map obj,
String src,
Parameters par) |
getMimeType, recycle, setOutputStream, shouldSetContentLength
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected SourceResolver _resolver
protected HashCache _hashCache
public AbstractMinimizeReader()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableReader
ServiceException
public Serializable getKey()
getKey
in interface CacheableProcessingComponent
public SourceValidity getValidity()
getValidity
in interface CacheableProcessingComponent
public long getLastModified()
getLastModified
in interface Reader
getLastModified
in class AbstractReader
public void setup(SourceResolver res, Map obj, String src, Parameters par) throws ProcessingException, SAXException, IOException
setup
in interface SitemapModelComponent
setup
in class AbstractReader
ProcessingException
SAXException
IOException
public void generate() throws IOException, SAXException, ProcessingException
generate
in interface Reader
IOException
SAXException
ProcessingException
protected String getInternalContextPath()
protected String getExternalContextPath()
protected String _handleFiles(List<HashCache.FileData> files, String internalContextPath, String externalContextPath)
files
- The filesinternalContextPath
- The context path to resolve importsexternalContextPath
- The context path used inside the filesprotected abstract String _handleFile(HashCache.FileData file, String internalContextPath, String externalContextPath)
file
- The file to includeinternalContextPath
- The context path to resolve importsexternalContextPath
- The context path used inside the files