public class FileReader extends ServiceableReader implements CacheableProcessingComponent
| Modifier and Type | Field and Description |
|---|---|
private Collection<String> |
_allowedFormats |
private MetadataAwareAmetysObject |
_ametysObject |
private BinaryMetadata |
_binary |
private int |
_cropHeight |
private int |
_cropWidth |
private int |
_height |
private int |
_maxHeight |
private int |
_maxWidth |
private String |
_path |
private boolean |
_readForDownload |
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
private int |
_width |
managerobjectModel, out, parameters, resolver, source| Constructor and Description |
|---|
FileReader() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
_isImage()
Determines if the file is an image
|
void |
generate() |
protected MetadataAwareAmetysObject |
getAmetysObject()
Get the ametys object.
|
Serializable |
getKey() |
long |
getLastModified() |
String |
getMimeType() |
SourceValidity |
getValidity() |
void |
recycle() |
void |
service(ServiceManager serviceManager) |
void |
setup(SourceResolver res,
Map objModel,
String src,
Parameters par) |
setOutputStream, shouldSetContentLengthenableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected AmetysObjectResolver _resolver
private int _width
private int _height
private int _maxWidth
private int _maxHeight
private int _cropWidth
private int _cropHeight
private boolean _readForDownload
private MetadataAwareAmetysObject _ametysObject
private BinaryMetadata _binary
private Collection<String> _allowedFormats
public FileReader()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface Serviceableservice in class ServiceableReaderServiceExceptionpublic void setup(SourceResolver res, Map objModel, String src, Parameters par) throws ProcessingException, SAXException, IOException
setup in interface SitemapModelComponentsetup in class AbstractReaderProcessingExceptionSAXExceptionIOExceptionprotected MetadataAwareAmetysObject getAmetysObject() throws ProcessingException
ProcessingException - if the information provided was insufficient to resolve an object.public Serializable getKey()
getKey in interface CacheableProcessingComponentpublic SourceValidity getValidity()
getValidity in interface CacheableProcessingComponentpublic long getLastModified()
getLastModified in interface ReadergetLastModified in class AbstractReaderpublic String getMimeType()
getMimeType in interface SitemapOutputComponentgetMimeType in class AbstractReaderpublic void generate() throws IOException, SAXException, ProcessingException
generate in interface ReaderIOExceptionSAXExceptionProcessingExceptionpublic void recycle()
recycle in interface Recyclablerecycle in class AbstractReaderprotected boolean _isImage()
true if file is a image