From 11519fb5f976b5598c7b16dd93cea3cead0080f5 Mon Sep 17 00:00:00 2001 From: Thomas Bayen Date: Wed, 18 Jun 2014 16:23:15 +0200 Subject: [PATCH] IDEMPIERE-1698 cleaner api through changed package for ReportStarter --- org.adempiere.base/src/org/adempiere/util/ProcessUtil.java | 2 +- .../report => adempiere/report/jasper}/Barbecue.java | 2 +- .../src/org/adempiere/report/jasper/ProcessFactory.java | 6 +++++- .../report => adempiere/report/jasper}/ReportStarter.java | 3 +-- 4 files changed, 8 insertions(+), 5 deletions(-) rename org.adempiere.report.jasper/src/org/{compiere/report => adempiere/report/jasper}/Barbecue.java (92%) rename org.adempiere.report.jasper/src/org/{compiere/report => adempiere/report/jasper}/ReportStarter.java (97%) diff --git a/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java b/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java index 1822ea4c61..2ae25b537e 100644 --- a/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java +++ b/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java @@ -53,7 +53,7 @@ import org.compiere.wf.MWorkflow; */ public final class ProcessUtil { - public static final String JASPER_STARTER_CLASS = "org.compiere.report.ReportStarter"; + public static final String JASPER_STARTER_CLASS = "org.adempiere.report.jasper.ReportStarter"; /** Logger */ private static CLogger log = CLogger.getCLogger(ProcessUtil.class); diff --git a/org.adempiere.report.jasper/src/org/compiere/report/Barbecue.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/Barbecue.java similarity index 92% rename from org.adempiere.report.jasper/src/org/compiere/report/Barbecue.java rename to org.adempiere.report.jasper/src/org/adempiere/report/jasper/Barbecue.java index 1ca9aa9249..6cc619f6db 100644 --- a/org.adempiere.report.jasper/src/org/compiere/report/Barbecue.java +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/Barbecue.java @@ -1,4 +1,4 @@ -package org.compiere.report; +package org.adempiere.report.jasper; import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; diff --git a/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ProcessFactory.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ProcessFactory.java index d86aea91f7..bca37fc619 100644 --- a/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ProcessFactory.java +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ProcessFactory.java @@ -16,7 +16,6 @@ package org.adempiere.report.jasper; import org.adempiere.base.IProcessFactory; import org.adempiere.util.ProcessUtil; import org.compiere.process.ProcessCall; -import org.compiere.report.ReportStarter; /** * ProcessFactory to start the ReportStarter class. @@ -33,10 +32,15 @@ import org.compiere.report.ReportStarter; */ public class ProcessFactory implements IProcessFactory { + public static final String JASPER_STARTER_CLASS_DEPRECATED = "org.compiere.report.ReportStarter"; + @Override public ProcessCall newProcessInstance(String className) { if (ProcessUtil.JASPER_STARTER_CLASS.equals(className)) return new ReportStarter(); + // this is for compatibility with older installations + if (JASPER_STARTER_CLASS_DEPRECATED.equals(className)) + return new ReportStarter(); else return null; } diff --git a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java similarity index 97% rename from org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java rename to org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java index cb427282b6..f76ce1c739 100644 --- a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java @@ -11,7 +11,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * For the text or an alternative of this public license, you may reach us * *****************************************************************************/ -package org.compiere.report; +package org.adempiere.report.jasper; import java.awt.print.PrinterJob; import java.io.ByteArrayOutputStream; @@ -79,7 +79,6 @@ import net.sf.jasperreports.engine.xml.JRXmlWriter; import org.adempiere.base.Service; import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.DBException; -import org.adempiere.report.jasper.JRViewerProvider; import org.adempiere.util.IProcessUI; import org.compiere.model.MAttachment; import org.compiere.model.MAttachmentEntry;