Package org.ametys.core.resources
Class ResourceReader
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.reading.AbstractReader
-
- org.apache.cocoon.reading.ServiceableReader
-
- org.ametys.core.resources.ResourceReader
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,LogEnabled
,Serviceable
,CacheableProcessingComponent
,Reader
,SitemapModelComponent
,SitemapOutputComponent
public class ResourceReader extends ServiceableReader implements CacheableProcessingComponent
Default resource reader, that handle different resources type using the ResourcesExtensionPoint.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,Object>
_additionalParameters
private SourceResolver
_resolver
private ResourceHandler
_resourceHandler
private ResourceHandlerExtensionPoint
_resourcesHandlerEP
private Source
_source
static String
LAST_MODIFIED
last modified parameter name for resources parameters-
Fields inherited from class org.apache.cocoon.reading.ServiceableReader
manager
-
Fields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
-
-
Constructor Summary
Constructors Constructor Description ResourceReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate()
Serializable
getKey()
long
getLastModified()
String
getMimeType()
SourceValidity
getValidity()
void
recycle()
void
service(ServiceManager sManager)
void
setup(SourceResolver res, Map objModel, String src, Parameters par)
-
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
-
-
-
-
Field Detail
-
LAST_MODIFIED
public static final String LAST_MODIFIED
last modified parameter name for resources parameters- See Also:
- Constant Field Values
-
_resourcesHandlerEP
private ResourceHandlerExtensionPoint _resourcesHandlerEP
-
_resourceHandler
private ResourceHandler _resourceHandler
-
_resolver
private SourceResolver _resolver
-
_additionalParameters
private Map<String,Object> _additionalParameters
-
-
Constructor Detail
-
ResourceReader
public ResourceReader()
-
-
Method Detail
-
service
public void service(ServiceManager sManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableReader
- Throws:
ServiceException
-
setup
public void setup(SourceResolver res, Map objModel, String src, Parameters par) throws ProcessingException, SAXException, IOException
- Specified by:
setup
in interfaceSitemapModelComponent
- Overrides:
setup
in classAbstractReader
- Throws:
ProcessingException
SAXException
IOException
-
generate
public void generate() throws IOException, ProcessingException
- Specified by:
generate
in interfaceReader
- Throws:
IOException
ProcessingException
-
getKey
public Serializable getKey()
- Specified by:
getKey
in interfaceCacheableProcessingComponent
-
getValidity
public SourceValidity getValidity()
- Specified by:
getValidity
in interfaceCacheableProcessingComponent
-
recycle
public void recycle()
- Specified by:
recycle
in interfaceRecyclable
- Overrides:
recycle
in classAbstractReader
-
getMimeType
public String getMimeType()
- Specified by:
getMimeType
in interfaceSitemapOutputComponent
- Overrides:
getMimeType
in classAbstractReader
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfaceReader
- Overrides:
getLastModified
in classAbstractReader
-
-