Package org.eclipse.birt.report.engine.api

# Class HTMLImageHandler

java.lang.Object
org.eclipse.birt.report.engine.api.HTMLImageHandler

All Implemented Interfaces:
  `IHTMLImageHandler`

Direct Known Subclasses:
  `HTMLCompleteImageHandler`, `HTMLServerImageHandler`

public class HTMLImageHandler extends Object implements IHTMLImageHandler

## Constructor Summary

Constructors
Constructor
Description
`HTMLImageHandler()`

## Method Summary

Modifier and Type
Method
Description
`CachedImage`
`addCachedImage(String id, int type, IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)`
add the image into cache.
`CachedImage`
`getCachedImage(String id, int type, org.eclipse.birt.report.engine.api.script.IReportContext context)`
get the cached image.
`protected Object`
`getRenderContext(org.eclipse.birt.report.engine.api.script.IReportContext context)`
Get render context.
`String`
`onCustomImage(IImage image, Object context)`
Deprecated.
`String`
`onCustomImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)`
`String`
`onDesignImage(IImage image, Object context)`
Deprecated.
`String`
`onDesignImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)`
`String`
`onDocImage(IImage image, Object context)`
Deprecated.
`String`
`onDocImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)`
`String`
`onFileImage(IImage image, Object context)`
Deprecated.
`String`
`onFileImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)`
`String`
`onURLImage(IImage image, Object context)`
Deprecated.
`String`
`onURLImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HTMLImageHandler

public HTMLImageHandler()

## Method Details

### onCustomImage

@Deprecated public String onCustomImage(IImage image, Object context)
Deprecated.
Description copied from interface: `IHTMLImageHandler`
handles a custom image created for example, by chart extension. The implementation supplies a URL and optionally stores the image.

Specified by:
  `onCustomImage` in interface `IHTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image

### onCustomImage

public String onCustomImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)

Specified by:
  `onCustomImage` in interface `IHTMLImageHandler`

### onDesignImage

@Deprecated public String onDesignImage(IImage image, Object context)
Deprecated.
Description copied from interface: `IHTMLImageHandler`
handles a design image. The implementation supplies a URL and optionally stores the image.

Specified by:
  `onDesignImage` in interface `IHTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image

### onDesignImage

public String onDesignImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)

Specified by:
  `onDesignImage` in interface `IHTMLImageHandler`

### onDocImage

@Deprecated public String onDocImage(IImage image, Object context)
Deprecated.
Description copied from interface: `IHTMLImageHandler`
handles a database image. The implementation supplies a URL and optionally stores the image.

Specified by:
  `onDocImage` in interface `IHTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image

### onDocImage

public String onDocImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)

Specified by:
  `onDocImage` in interface `IHTMLImageHandler`

### onFileImage

@Deprecated public String onFileImage(IImage image, Object context)
Deprecated.
Description copied from interface: `IHTMLImageHandler`
handles a image specified as a on-disk URI. The implementation supplies a URL and optionally stores the image.

Specified by:
  `onFileImage` in interface `IHTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image

### onFileImage

public String onFileImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)

Specified by:
  `onFileImage` in interface `IHTMLImageHandler`

### onURLImage

@Deprecated public String onURLImage(IImage image, Object context)
Deprecated.
Description copied from interface: `IHTMLImageHandler`
handles an image specified as an external URL. The implementation supplies a URL and optionally stores the image.

Specified by:
  `onURLImage` in interface `IHTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image

### onURLImage

public String onURLImage(IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)

Specified by:
  `onURLImage` in interface `IHTMLImageHandler`

### getRenderContext

protected Object getRenderContext(org.eclipse.birt.report.engine.api.script.IReportContext context)
Get render context.

Parameters:
  `context` -
Returns:

### getCachedImage

public CachedImage getCachedImage(String id, int type, org.eclipse.birt.report.engine.api.script.IReportContext context)
get the cached image.

Specified by:
  `getCachedImage` in interface `IHTMLImageHandler`
Parameters:
  `id` - cache key
  `type` - image type.
  `context` - report context
Returns:
  the cached image

### addCachedImage

public CachedImage addCachedImage(String id, int type, IImage image, org.eclipse.birt.report.engine.api.script.IReportContext context)
add the image into cache.

Specified by:
  `addCachedImage` in interface `IHTMLImageHandler`
Parameters:
  `id` - cached key
  `type` - image type
  `image` - image object.
  `context` - report context
Returns:
  the cached image.