|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.opensagres.xdocreport.document.images.AbstractImageRegistry
public abstract class AbstractImageRegistry
Abstract class for IImageRegistry
.
Field Summary | |
---|---|
protected IEntryOutputStreamProvider |
outputStreamProvider
|
protected IEntryReaderProvider |
readerProvider
|
protected IEntryWriterProvider |
writerProvider
|
Fields inherited from interface fr.opensagres.xdocreport.document.images.IImageRegistry |
---|
GET_HEIGHT_METHOD, GET_PATH_METHOD, GET_WIDTH_METHOD, IMAGE_INFO, REGISTER_IMAGE_METHOD |
Constructor Summary | |
---|---|
AbstractImageRegistry(IEntryReaderProvider readerProvider,
IEntryWriterProvider writerProvider,
IEntryOutputStreamProvider outputStreamProvider,
FieldsMetadata fieldsMetadata)
|
Method Summary | |
---|---|
protected ImageProviderInfo |
createImageProviderInfo(IImageProvider imageProvider)
|
FieldsMetadata |
getFieldsMetadata()
|
String |
getHeight(ImageProviderInfo info,
String defaultHeight)
Returns the height of the image provider if not null and the given defaultHeight otherwise. |
protected abstract String |
getImageBasePath()
|
protected String |
getImageEntryName(ImageProviderInfo imageProviderInfo)
|
protected String |
getImageId()
|
List<ImageProviderInfo> |
getImageProviderInfos()
Returns list of image provider info. |
protected abstract String |
getPath(ImageProviderInfo info)
|
String |
getPath(ImageProviderInfo info,
String defaultPath)
|
protected abstract String |
getSize(float sizeAsPixel)
|
String |
getWidth(ImageProviderInfo info,
String defaultWidth)
Returns the width of the image provider if not null and the given defaultWidth otherwise. |
void |
postProcess()
Called after processing of the template engine. |
void |
preProcess()
Called before processing of the template engine. |
ImageProviderInfo |
registerImage(Object image,
String fieldName,
IContext context)
Register the instance of imageProvider in the registry. |
protected void |
saveBinaryImage(ImageProviderInfo imageProviderInfo)
|
protected void |
saveBinaryImages()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final IEntryReaderProvider readerProvider
protected final IEntryWriterProvider writerProvider
protected final IEntryOutputStreamProvider outputStreamProvider
Constructor Detail |
---|
public AbstractImageRegistry(IEntryReaderProvider readerProvider, IEntryWriterProvider writerProvider, IEntryOutputStreamProvider outputStreamProvider, FieldsMetadata fieldsMetadata)
Method Detail |
---|
public ImageProviderInfo registerImage(Object image, String fieldName, IContext context) throws XDocReportException, IOException
IImageRegistry
registerImage
in interface IImageRegistry
XDocReportException
IOException
public List<ImageProviderInfo> getImageProviderInfos()
IImageRegistry
getImageProviderInfos
in interface IImageRegistry
protected ImageProviderInfo createImageProviderInfo(IImageProvider imageProvider)
protected String getImageId()
public void preProcess() throws XDocReportException
IImageRegistry
preProcess
in interface IImageRegistry
XDocReportException
public void postProcess() throws XDocReportException
IImageRegistry
postProcess
in interface IImageRegistry
XDocReportException
protected void saveBinaryImages() throws XDocReportException
XDocReportException
protected void saveBinaryImage(ImageProviderInfo imageProviderInfo) throws XDocReportException
XDocReportException
protected String getImageEntryName(ImageProviderInfo imageProviderInfo)
protected abstract String getImageBasePath()
public String getPath(ImageProviderInfo info, String defaultPath)
protected abstract String getPath(ImageProviderInfo info)
public String getWidth(ImageProviderInfo info, String defaultWidth) throws IOException
IImageRegistry
getWidth
in interface IImageRegistry
IOException
public String getHeight(ImageProviderInfo info, String defaultHeight) throws IOException
IImageRegistry
getHeight
in interface IImageRegistry
IOException
public FieldsMetadata getFieldsMetadata()
protected abstract String getSize(float sizeAsPixel)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |