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 |
manager
objectModel, 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, shouldSetContentLength
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected 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 Serviceable
service
in class ServiceableReader
ServiceException
public void setup(SourceResolver res, Map objModel, String src, Parameters par) throws ProcessingException, SAXException, IOException
setup
in interface SitemapModelComponent
setup
in class AbstractReader
ProcessingException
SAXException
IOException
protected MetadataAwareAmetysObject getAmetysObject() throws ProcessingException
ProcessingException
- if the information provided was insufficient to resolve an object.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 String getMimeType()
getMimeType
in interface SitemapOutputComponent
getMimeType
in class AbstractReader
public void generate() throws IOException, SAXException, ProcessingException
generate
in interface Reader
IOException
SAXException
ProcessingException
public void recycle()
recycle
in interface Recyclable
recycle
in class AbstractReader
protected boolean _isImage()
true
if file is a image