org.eclipse.birt.report.engine.extension
Interface IReportItemGeneration


public interface IReportItemGeneration

Represents the extended item generation extension, which processes the report item at report geenration time.


Method Summary
 void finish()
          Performs clean up work
 org.eclipse.birt.report.engine.extension.Size getSize()
          Get the size of the extended item.
 boolean needSerialization()
          returns whether the extended item needs serialization of state information at generation time
 void onRowSets(IRowSet[] rowSets)
          processes the extended item in report generation environment.
 void serialize(java.io.OutputStream ostream)
          serializes the extended item generation time state.
 void setApplicationClassLoader(java.lang.ClassLoader loader)
          passes the class loader used to load user defined classes.
 void setModelObject(org.eclipse.birt.report.model.api.ExtendedItemHandle modelHandle)
          passes a handle to the extended report item model to the extension
 void setReportQueries(org.eclipse.birt.data.engine.api.IBaseQueryDefinition[] queries)
          pass the prepared query definition to extended item implementation, so that it can access data.
 void setScriptContext(org.eclipse.birt.report.engine.api.script.IReportContext context)
          pass the script context to the report item.
 

Method Detail

setModelObject

public void setModelObject(org.eclipse.birt.report.model.api.ExtendedItemHandle modelHandle)
passes a handle to the extended report item model to the extension

Parameters:
modelHandle - a handle to the extended item model object

setApplicationClassLoader

public void setApplicationClassLoader(java.lang.ClassLoader loader)
passes the class loader used to load user defined classes.

Parameters:
loader - class loader used to load the classes

setScriptContext

public void setScriptContext(org.eclipse.birt.report.engine.api.script.IReportContext context)
pass the script context to the report item.

Parameters:
context - report context used by java-based script

setReportQueries

public void setReportQueries(org.eclipse.birt.data.engine.api.IBaseQueryDefinition[] queries)
pass the prepared query definition to extended item implementation, so that it can access data.


onRowSets

public void onRowSets(IRowSet[] rowSets)
               throws org.eclipse.birt.core.exception.BirtException
processes the extended item in report generation environment.

Parameters:
rowSets - rowSets an array of row sets that is passed to the extension
Returns:
an object that captures the generation-time state information about the extended item. Presentation engine guarantees that the same object is returned to the extended item instance at presentation time. To achieve such a goal, generation engine may uses serialization services provided by the IReportItemSerializable interface.
Throws:
org.eclipse.birt.core.exception.BirtException - throws exception when there is a problem processing the extended item

needSerialization

public boolean needSerialization()
returns whether the extended item needs serialization of state information at generation time

Returns:
whether the extended item needs to serialize state information at generation time

serialize

public void serialize(java.io.OutputStream ostream)
               throws org.eclipse.birt.core.exception.BirtException
serializes the extended item generation time state. The application developer should not assume that the output stream is a file stream. Presentation engine guarantees that a corresponding input stream is available for deserializing what is written by this function.

Parameters:
ostream - the output stream to write the generation time state of the extended item to
Throws:
org.eclipse.birt.core.exception.BirtException - when there is a problem serializing the extended item state

getSize

public org.eclipse.birt.report.engine.extension.Size getSize()
Get 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. Notice that 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.

Returns:
the size of the extended item. Return null if the size does not matter or can not be determined.

finish

public void finish()
Performs clean up work



Copyright © 2005 Actuate Corp. All rights reserved.