Package org.ametys.cms.content
Class FileReader
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.reading.AbstractReader
org.ametys.core.util.cocoon.AbstractResourceReader
org.ametys.cms.content.FileReader
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,LogEnabled
,Serviceable
,CacheableProcessingComponent
,Reader
,SitemapModelComponent
,SitemapOutputComponent
@Deprecated
public class FileReader
extends AbstractResourceReader
implements Serviceable, CacheableProcessingComponent
Deprecated.
Reader for binary or file metadata.
-
Field Summary
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
Deprecated.The ametys object resolver.Fields inherited from class org.ametys.core.util.cocoon.AbstractResourceReader
__ALLOWED_OUTPUT_FORMATS, __DEFAULT_FORMAT, __UNRESIZABLE_FORMATS
Fields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doSetup
(SourceResolver res, Map objModel, String src, Parameters par) Deprecated.protected MetadataAwareAmetysObject
Deprecated.Get the ametys object.protected String
Deprecated.If needed, returns the resource's name, properly encoded for using in a "Content-Disposition" HTTP header.
May be null, in which case the result ofAbstractResourceReader.getFilename()
is used instead.protected String
Deprecated.Returns the resource's name.protected InputStream
Deprecated.Returns the resource'sInputStream
.getKey()
Deprecated.long
Deprecated.protected long
Deprecated.Returns the resource's length.Deprecated.Deprecated.void
recycle()
Deprecated.void
service
(ServiceManager serviceManager) Deprecated.Methods inherited from class org.ametys.core.util.cocoon.AbstractResourceReader
generate, generateThumbnail, getKeySuffix, processImage, setup
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 Details
-
_resolver
Deprecated.The ametys object resolver.
-
-
Constructor Details
-
FileReader
public FileReader()Deprecated.
-
-
Method Details
-
service
Deprecated.- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
doSetup
public void doSetup(SourceResolver res, Map objModel, String src, Parameters par) throws ProcessingException, IOException Deprecated.Description copied from class:AbstractResourceReader
Called byAbstractResourceReader.setup(SourceResolver, Map, String, Parameters)
. This method should be implemented by subclasses to retrieve the actual resource.- Specified by:
doSetup
in classAbstractResourceReader
- Parameters:
res
- theSourceResolver
.objModel
- the Cocoon's object model.src
- the source, as given by the sitemap.par
- the parameters, as given by the sitemap.- Throws:
ProcessingException
- if an error occurs while processing the resource.IOException
- if an error occurs while accessing the resource.
-
getAmetysObject
Deprecated.Get the ametys object.- Returns:
- the ametys object.
- Throws:
ProcessingException
- if the information provided was insufficient to resolve an object.
-
getInputStream
Deprecated.Description copied from class:AbstractResourceReader
Returns the resource'sInputStream
.- Specified by:
getInputStream
in classAbstractResourceReader
- Returns:
- the resource's
InputStream
.
-
getFilename
Deprecated.Description copied from class:AbstractResourceReader
Returns the resource's name.- Specified by:
getFilename
in classAbstractResourceReader
- Returns:
- the resource's name.
-
getEncodedFilename
Deprecated.Description copied from class:AbstractResourceReader
If needed, returns the resource's name, properly encoded for using in a "Content-Disposition" HTTP header.
May be null, in which case the result ofAbstractResourceReader.getFilename()
is used instead.- Specified by:
getEncodedFilename
in classAbstractResourceReader
- Returns:
- the encoded resource's name, if any.
-
getLength
Deprecated.Description copied from class:AbstractResourceReader
Returns the resource's length.- Specified by:
getLength
in classAbstractResourceReader
- Returns:
- the resource's length.
-
getKey
Deprecated.- Specified by:
getKey
in interfaceCacheableProcessingComponent
-
getValidity
Deprecated.- Specified by:
getValidity
in interfaceCacheableProcessingComponent
-
getLastModified
Deprecated.- Specified by:
getLastModified
in interfaceReader
- Overrides:
getLastModified
in classAbstractReader
-
getMimeType
Deprecated.- Specified by:
getMimeType
in interfaceSitemapOutputComponent
- Overrides:
getMimeType
in classAbstractReader
-
recycle
Deprecated.- Specified by:
recycle
in interfaceRecyclable
- Overrides:
recycle
in classAbstractReader
-