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/IReportItemGeneration.java
public abstract void setScriptContext( IReportContext context );
	/**
	 * pass the prepared query definition to extended item implementation, so
	 * that it can access data.
	 */
	public void setReportQueries( IBaseQueryDefinition[] queries );
	/**
	 * processes the extended item in report generation environment.
	 * @deprecated since BIRT 2.3
	 * @param rowSets
	 *            rowSets an array of row sets that is passed to the extension
	 * @return 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 BirtException
	 *             throws exception when there is a problem processing the
	 *             extended item
	 */
	public abstract void onRowSets( IRowSet[] rowSets ) throws BirtException;
	/**
	 * processes the extended item in report generation environment.
	 * 
	 * @param results
	 *            results is an array of query results which is passed to the
	 *            extended item. The extended item could retrieve data from
	 *            those results.
	 * @return an object that captures the generation-time state information