org.compiere.report
Class ReportStarter
java.lang.Object
org.compiere.report.ReportStarter
- All Implemented Interfaces:
- org.compiere.process.ProcessCall
- public class ReportStarter
- extends java.lang.Object
- implements org.compiere.process.ProcessCall
- Author:
- rlemeill
originaly coming from an application note from compiere.co.uk
Field Summary |
private static org.compiere.util.CLogger |
log
|
private static java.io.File |
REPORT_HOME
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.compiere.util.CLogger log
REPORT_HOME
private static java.io.File REPORT_HOME
ReportStarter
public ReportStarter()
isRequestedonAS
private boolean isRequestedonAS(java.net.URL requestURL)
- Parameters:
requestURL
-
- Returns:
- true if the report is on the same ip address than Application Server
isMD5HomeInterfaceAvailable
private boolean isMD5HomeInterfaceAvailable()
- Returns:
- true if the class org.compiere.interfaces.MD5Home is present
ejbGetRemoteMD5
private java.lang.String ejbGetRemoteMD5(java.lang.String requestedURLString)
- Parameters:
requestedURLString
-
- Returns:
- md5 hash of remote file computed directly on application server
null if problem or if report doesn't seem to be on AS (different IP or 404)
getRemoteFile
private java.io.File getRemoteFile(java.lang.String reportLocation,
java.lang.String localPath)
- Parameters:
reportLocation
- http://applicationserver/webApp/standalone.jrxml for exemplelocalPath
- Where to put the http downloadede file
- Returns:
- abstract File wich represent the downloaded file
httpDownloadedReport
private java.io.File httpDownloadedReport(java.lang.String reportLocation)
- Returns:
- downloaded File (or already existing one)
startProcess
public boolean startProcess(java.util.Properties ctx,
org.compiere.process.ProcessInfo pi,
org.compiere.util.Trx trx)
- Specified by:
startProcess
in interface org.compiere.process.ProcessCall
reportResult
private void reportResult(int AD_PInstance_ID,
java.lang.String errMsg)
- Parameters:
AD_PInstance_ID
- errMsg
-
processReport
private ReportStarter.JasperData processReport(java.io.File reportFile)
- Parameters:
reportFile
-
- Returns:
addProcessParameters
private void addProcessParameters(int AD_PInstance_ID,
java.util.Map params)
JWScorrectClassPath
private void JWScorrectClassPath()
compileReport
private net.sf.jasperreports.engine.JasperReport compileReport(java.io.File reportFile,
java.io.File jasperFile)
- Parameters:
reportFile
- jasperFile
-
- Returns:
- compiled JasperReport
getReportData
public ReportStarter.ReportData getReportData(int AD_PInstance_ID)
- Parameters:
AD_PInstance_ID
-
- Returns:
- ReportData