#
Extended Item Generation-Time Support

###### Identifier:

org.eclipse.birt.report.engine.reportitemgeneration

###### Since:

1.0

###### Description:

This extension point specifies how the new report item should be instantiated, processed, and persisted at report generation time. In a server environment, the plugin registry uses this extension point registration to discover supported report item extensions.

###### Configuration Markup:

<!ELEMENT extension (reportItem+)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

- point - a fully qualified identifier of the target extension point
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance

<!ELEMENT reportItem EMPTY>

<!ATTLIST reportItem

name CDATA #REQUIRED

class CDATA #REQUIRED>

- name - the unique name of the extended item, i.e., "org.eclipse.birt.chart" for chart extension.
- class - the fully qualified name of the java class that implements `IReportItemGeneration`

###### Examples:

The following is a sample usage of the reportItemGeneration extension point:

    <extension point="org.eclipse.birt.report.engine.reportitemGeneration" name="chart generation extension">
      <reportItem name="chart" class="org.eclipse.birt.report.chartitem.ChartGeneration" createReportQuery="item"/>
     </extension>

###### API Information:

The value of the class attribute must be the fully qualified name of a class that implements `org.eclipse.birt.engine.extension.IReportItemGeneration`. The interface provides the following functions:

- `public void setModelObject(ExtendedItemHandle handle)` ---- passes the model object to the extension provider.
- `public void onRowSets(IRowSet[] rowSets) throws BirtException` ---- processes the extended item in report generation environment. The data that the report item needs is passed in through the rowSets array
- `public boolean needSerialization()` ---- returns whether the extended item has anything to be serialized to report document.
- `public void serialize(OutputStream ostream) throws BirtException` ---- serializes the extended item generation time state. The application developer should not assume that the output stream is a file stream. Engine only guarantees that a corresponding input stream is available for deserializing what is written by this function.
- `public void Size getSize()` ---- gets the size of the extended item. The size is a Dimension object. The width and height can only be in absolute units (inch, mm, etc.) or pixel. It can not be a relative size such as 150% or 1.2em. An extended item can obtain its design-time size information by querying DE. This function is needed because the actual size may not be the same as the design-time size.
- `public void finish()` ---- performs cleanup jobs

###### Supplied Implementation:

Chart as an extended item

Copyright (c) 2005 Actuate Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
Contributors: Actuate Corporation - initial API and implementation