public abstract class AbstractImageRegistry extends Object implements IImageRegistry
IImageRegistry.| Modifier and Type | Field and Description |
|---|---|
protected IEntryOutputStreamProvider |
outputStreamProvider |
protected IEntryReaderProvider |
readerProvider |
protected IEntryWriterProvider |
writerProvider |
GET_HEIGHT_METHOD, GET_PATH_METHOD, GET_WIDTH_METHOD, IMAGE_INFO, REGISTER_IMAGE_METHOD| Constructor and Description |
|---|
AbstractImageRegistry(IEntryReaderProvider readerProvider,
IEntryWriterProvider writerProvider,
IEntryOutputStreamProvider outputStreamProvider,
FieldsMetadata fieldsMetadata) |
| Modifier and Type | Method and Description |
|---|---|
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) |
abstract String |
getSize(float sizeAsPixel) |
abstract Float |
getSize(String sizeAsDxa) |
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() |
protected final IEntryReaderProvider readerProvider
protected final IEntryWriterProvider writerProvider
protected final IEntryOutputStreamProvider outputStreamProvider
public AbstractImageRegistry(IEntryReaderProvider readerProvider, IEntryWriterProvider writerProvider, IEntryOutputStreamProvider outputStreamProvider, FieldsMetadata fieldsMetadata)
public ImageProviderInfo registerImage(Object image, String fieldName, IContext context) throws XDocReportException, IOException
IImageRegistryregisterImage in interface IImageRegistryXDocReportExceptionIOExceptionpublic List<ImageProviderInfo> getImageProviderInfos()
IImageRegistrygetImageProviderInfos in interface IImageRegistryprotected ImageProviderInfo createImageProviderInfo(IImageProvider imageProvider)
protected String getImageId()
public void preProcess()
throws XDocReportException
IImageRegistrypreProcess in interface IImageRegistryXDocReportExceptionpublic void postProcess()
throws XDocReportException
IImageRegistrypostProcess in interface IImageRegistryXDocReportExceptionprotected void saveBinaryImages()
throws XDocReportException
XDocReportExceptionprotected void saveBinaryImage(ImageProviderInfo imageProviderInfo) throws XDocReportException
XDocReportExceptionprotected 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
IImageRegistrygetWidth in interface IImageRegistryIOExceptionpublic String getHeight(ImageProviderInfo info, String defaultHeight) throws IOException
IImageRegistrygetHeight in interface IImageRegistryIOExceptionpublic FieldsMetadata getFieldsMetadata()
public abstract String getSize(float sizeAsPixel)
sizeAsPixel - Copyright © 2017. All Rights Reserved.