Project: Birt
Bug 209916 Improve design of IReportItemGeneration and IReportItemPresentation
Reported: 2007-11-15 05:21:06 | Status: resolved fixed

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

Files changed in fix:
chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/ChartReportItemGenerationProxy.java chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/ChartReportItemPresentationProxy.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ExtendedGenerateExecutor.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/IReportItemGeneration.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/IReportItemGenerationInfo.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/IReportItemPresentation.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/IReportItemPresentationInfo.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/ReportItemGenerationBase.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/ReportItemPresentationBase.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/internal/ReportItemGenerationInfo.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/extension/internal/ReportItemPresentationInfo.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/presentation/LocalizedContentVisitor.java