com.docmosis.template.population
Interface ImageSupplier
- public interface ImageSupplier
This interface marks an ImageSupplier which can be used to obtain images on the fly.
getImage
public ImageSupplierInfo getImage(String key,
String value)
throws ImageSupplier.ImageSupplierException
- Get an image for the given key and value. The key comes from the template and
the value comes from the data.
The returned Info object specifies whether the image is supplied
by this supplier (even if a null input stream is returned) and
this decision should be based on some attribute of the key.
If the key or value are not of interest, then the returned info
should give false for isImageSupplied() and the caller can
then choose to source the image elsewhere.
- Parameters:
key
- the key from the templatevalue
- the value from the data against that key
- Returns:
- an Info object indicating whether the key was of the correct
type and an image stream (which may be null);
- Throws:
ImageSupplier.ImageSupplierException
- if anything goes wrong- See Also:
ImageSupplierInfo
Copyright © 2014 Docmosis Pty Ltd. All Rights Reserved.