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

# Class HTMLCompleteImageHandler

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

All Implemented Interfaces:
  `IHTMLImageHandler`

public class HTMLCompleteImageHandler extends HTMLImageHandler
Default implementation for writing images in a form that is compatible with a web browser's "HTML Complete" save option, i.e., writes images to a predefined folder. ImageDirectory: absolute path save the image into that directy, return the aboluste URL of that image. ImageDirectory: null, treat it as "." ImageDirectory: relative relative to the base folder. BaseFolder: parent folder of the output file, save the file into image directory and return the relative path (base on the base folder). BaseFolder:null, use "." as the base folder and return the aboluste path,

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Logger`
`log`

## Constructor Summary

Constructors
Constructor
Description
`HTMLCompleteImageHandler()`
dummy constructor

## Method Summary

Modifier and Type
Method
Description
`protected File`
`createUniqueFile(String imageDir, String prefix, String postfix)`
Creates a unique temporary file to store an image
`protected String`
`getImageMapID(IImage image)`
returns the unique identifier for the image
`protected String`
`handleImage(IImage image, Object context, String prefix, boolean needMap)`
handles an image report item and returns an image URL
`String`
`onCustomImage(IImage image, Object context)`
Deprecated.
`String`
`onDesignImage(IImage image, Object context)`
Deprecated.
`String`
`onDocImage(IImage image, Object context)`
Deprecated.
`String`
`onFileImage(IImage image, Object context)`
Deprecated.
`String`
`onURLImage(IImage image, Object context)`
Deprecated.

### Methods inherited from class org.eclipse.birt.report.engine.api.HTMLImageHandler

`addCachedImage, getCachedImage, getRenderContext, onCustomImage, onDesignImage, onDocImage, onFileImage, onURLImage`

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

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

## Field Details

### log

protected Logger log

## Constructor Details

### HTMLCompleteImageHandler

public HTMLCompleteImageHandler()
dummy constructor

## Method Details

### onDesignImage

@Deprecated public String onDesignImage(IImage image, Object context)
Deprecated.
(non-Javadoc)

Specified by:
  `onDesignImage` in interface `IHTMLImageHandler`
Overrides:
  `onDesignImage` in class `HTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image
See Also:
  - invalid reference

        org.eclipse.birt.report.engine.api2.IHTMLImageHandler#onDesignImage(org.eclipse.birt.report.engine.api2.IImage, java.lang.Object)

### onDocImage

@Deprecated public String onDocImage(IImage image, Object context)
Deprecated.
(non-Javadoc)

Specified by:
  `onDocImage` in interface `IHTMLImageHandler`
Overrides:
  `onDocImage` in class `HTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image
See Also:
  - invalid reference

        org.eclipse.birt.report.engine.api2.IHTMLImageHandler#onDocImage(org.eclipse.birt.report.engine.api2.IImage, java.lang.Object)

### onURLImage

@Deprecated public String onURLImage(IImage image, Object context)
Deprecated.
(non-Javadoc)

Specified by:
  `onURLImage` in interface `IHTMLImageHandler`
Overrides:
  `onURLImage` in class `HTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image
See Also:
  - invalid reference

        org.eclipse.birt.report.engine.api2.IHTMLImageHandler#onURLImage(org.eclipse.birt.report.engine.api2.IImage, java.lang.Object)

### onCustomImage

@Deprecated public String onCustomImage(IImage image, Object context)
Deprecated.
(non-Javadoc)

Specified by:
  `onCustomImage` in interface `IHTMLImageHandler`
Overrides:
  `onCustomImage` in class `HTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image
See Also:
  - invalid reference

        org.eclipse.birt.report.engine.api2.IHTMLImageHandler#onCustomImage(org.eclipse.birt.report.engine.api2.IImage, java.lang.Object)

### createUniqueFile

protected File createUniqueFile(String imageDir, String prefix, String postfix)
Creates a unique temporary file to store an image

Parameters:
  `imageDir` - directory to put image into
  `prefix` - file name prefix
  `postfix` - file name suffix
Returns:
  a Java File Object

### onFileImage

@Deprecated public String onFileImage(IImage image, Object context)
Deprecated.
(non-Javadoc)

Specified by:
  `onFileImage` in interface `IHTMLImageHandler`
Overrides:
  `onFileImage` in class `HTMLImageHandler`
Parameters:
  `image` - the image definition object
  `context` - the context for generating the URL
Returns:
  the URL for the image
See Also:
  - invalid reference

        org.eclipse.birt.report.engine.api2.IHTMLImageHandler#onFileImage(org.eclipse.birt.report.engine.api2.IImage, java.lang.Object)

### handleImage

protected String handleImage(IImage image, Object context, String prefix, boolean needMap)
handles an image report item and returns an image URL

Parameters:
  `image` - represents the image design information
  `context` - context information
  `prefix` - image prefix in URL
  `needMap` - whether image map is needed
Returns:
  URL for the image

### getImageMapID

protected String getImageMapID(IImage image)
returns the unique identifier for the image

Parameters:
  `image` - the image object
Returns:
  the image id