Bug 209916 Improve design of IReportItemGeneration and IReportItemPresentation
This enhancement proposes to enhance the design of IReportItemGeneration and IReportItemPresentation to make them easier to use and less likely to change in the future. The idea is to replace all the setter method that need to be implemented, by a single init method passing a new interface with all the content available through getter methods. Detailed proposal below: 1- Deprecate all set methods, but still call them. Add some javadoc as follow: @deprecated implement @link #init(IReportItemPresentationInfo) instead 2- Add a new init(IReportItemPresentationInfo) method (with a @since 2.3 keyword) 3- Create a new interface IReportItemPresentationInfo with getter methods corresponding to the setter methods, and implement it internally. Locale getLocale(); int getResolution(); ... A similar fix can be done for IReportItemGeneration
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/IReportItemPresentation.java
* Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.engine.extension;
import java.io.InputStream;
import java.util.Locale;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.data.engine.api.IBaseQueryDefinition;
import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
import org.eclipse.birt.report.engine.api.script.IReportContext;
import org.eclipse.birt.report.engine.content.IContent;
import org.eclipse.birt.report.engine.content.IStyle;
import org.eclipse.birt.report.model.api.ExtendedItemHandle;
/**
 * Represents the extended item presentation time extension.
 * 
 * The calling sequence in presentation engine might work as follows:
 * <p>
 * <li> Design engine creates a new instance of the extended item.
 * <li> Presentation engine detects that the element is an extended item. It
 * dynamically creates an object with type IReportItemPresentation.
 * <li> The presentation engine calls various setXXX methods to pass
 * initialization parameters to the extension implementation.
 * <li> deserialize method restores the generation time state
 * <li> Render the extended item through onRowSets method, handled the returned
 * image
 * <li> Call finish() for cleanup.
 */
public interface IReportItemPresentation
{