Package org.ametys.site
Class SiteResourceReader
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,Configurable
,LogEnabled
,Serviceable
,CacheableProcessingComponent
,Reader
,SitemapModelComponent
,SitemapOutputComponent
Resource reader handling hashed resources in site cache as well as "normal" resources.
-
Field Summary
Fields inherited from class org.ametys.core.cocoon.RuntimeResourceReader
_manager, LAST_MODIFIED
Fields inherited from class org.apache.cocoon.reading.ResourceReader
bufferSize, byteRanges, configuredBufferSize, configuredByteRanges, configuredExpires, configuredQuickTest, expires, inputSource, quickTest, request, response
Fields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
setAttachmentContentDisposition
(FileSource fileSource) Sets the Content-Disposition header as "attachment" with the wanted filename.void
setup
(SourceResolver res, Map cocoonObjectModel, String src, Parameters par) Methods inherited from class org.ametys.core.cocoon.RuntimeResourceReader
generate, getKey, service
Methods inherited from class org.apache.cocoon.reading.ResourceReader
configure, getLastModified, getMimeType, getValidity, hasRanges, parameterize, processStream, recycle, setupHeaders
Methods inherited from class org.apache.cocoon.reading.AbstractReader
setOutputStream, shouldSetContentLength
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
SiteResourceReader
public SiteResourceReader()
-
-
Method Details
-
setup
public void setup(SourceResolver res, Map cocoonObjectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException - Specified by:
setup
in interfaceSitemapModelComponent
- Overrides:
setup
in classRuntimeResourceReader
- Throws:
ProcessingException
SAXException
IOException
-
setAttachmentContentDisposition
Sets the Content-Disposition header as "attachment" with the wanted filename.- Parameters:
fileSource
- the file source.
-