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)
- Parameters:
reportLocation
- http string url ex: http://compiereserver.domain.com/webApp/standalone.jrxml
- 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)
- Start the process.
Called then pressing the Process button in R_Request.
It should only return false, if the function could not be performed
as this causes the process to abort.
- Specified by:
startProcess
in interface org.compiere.process.ProcessCall
- Parameters:
ctx
- contextpi
- Compiere standard process infotrx
-
- Returns:
- true if success
getReportFile
private java.io.File getReportFile(java.lang.String reportPath,
java.lang.String reportType)
- Parameters:
reportPath
- reportType
-
- Returns:
- the abstract file corresponding to typed report
getReportFile
private java.io.File getReportFile(java.lang.String reportPath)
- Parameters:
reportPath
-
- Returns:
- the abstract file corresponding to report
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