com.dynalivery.harmoni
Class HarmoniJob

java.lang.Object
  |
  +--com.dynalivery.harmoni.HarmoniJob
Direct Known Subclasses:
PCREJob, WordJob

public abstract class HarmoniJob
extends java.lang.Object


Field Summary
static int H_SF_ASCENDING
           
static int H_SF_DESCENDING
           
 
Constructor Summary
HarmoniJob(HarmoniEngine engine, short handle)
          Construct a (report) HarmoniJob object with the given handle.
HarmoniJob(HarmoniJob parent, short handle)
          Construct a (sub-report) HarmoniJob object with the given handle.
 
Method Summary
 boolean CheckSelectionFormula()
          Checks the selection formula for validity.
 boolean ClearServerLog()
          Clears the current server logs and starts a fresh log that can be retrieved using GetServerLog()
 void Close()
          Closes the print job.
 void DeleteNthSortField(int sortFieldN)
          Delete a given sort field from a report.
 void DeleteXmlFile(boolean xmlFileStatus)
          Set the deletion option the DOR file in SetPrivateData True by default, if set to false the xml file passed by SetPrivateData will not be deleted.
 HarmoniEngine getEngine()
          Get the engine that opened this job
 int GetHandle()
          Get the handle for this job
 short GetJobStatus(HarmoniJobInfo info)
          This method evaluates the status of a print job.
 java.lang.String GetName()
          Get the name associated with this job
 HarmoniLogOnInfo GetNthTableLogOnInfo(int tableN)
           
 java.io.InputStream getOutputAsStream(java.lang.String outputFileName)
          This method will return an InputStream which contains the requested output name.
 java.lang.String[] getOutputFileNames()
          This method will return an array of output file names which can be used as the outputFileName parameter of a call to getOutputAsStream.
 HarmoniPrintOptions GetPrintOptions()
          This method retieves the print options specified for the report
 HarmoniDEVMODE GetSelectedPrinter(java.lang.StringBuffer driverName, java.lang.StringBuffer printerName, java.lang.StringBuffer portName)
          Obtain the selected printer.
 HarmoniPrinterInfo GetSelectedPrinterByName(java.lang.StringBuffer printName)
          This method returns the printer info for the job
 void GetSelectionFormula(java.lang.StringBuffer formulaText)
          Get the selection formula used in this job's report.
 java.lang.String GetServerLog()
          Returns the Server log associated with the current run.
 void GetSQLQuery(java.lang.StringBuffer queryBuffer)
          Get the SQL query for this job's report.
 short GetStatus(HarmoniJobInfo info)
          Get the status and progress statistics of a report job.
 void OutputTo(java.lang.String outputFileName, FormatOptions fmtOptions)
          Output the job to Saffron
 void OutputToPrinter(int copies)
          Sets the print destination for this job to be the printer.
 void OutputToSaffronHtml(java.lang.String htmlFileName, HTMLFormatOptions options)
          Deprecated. As of Harmoni 1.0, replaced by OutputTo(FormatOptions, DestinationOptions)
 void OutputToSaffronJPEG(java.lang.String jpegFileName, RasterFormatOptions options)
          Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
 void OutputToSaffronPDF(java.lang.String pdfFileName, PDFFormatOptions options)
          Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
 void OutputToSaffronPNG(java.lang.String pngFileName, RasterFormatOptions options)
          Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
 void OutputToSaffronRTF(java.lang.String rtfFileName, RTFFormatOptions options)
          Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
 void OutputToSaffronSVG(java.lang.String svgFileName, SVGFormatOptions options)
          Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
 void SelectPrinter(java.lang.String driverName, java.lang.String printerName, java.lang.String portName, HarmoniDEVMODE mode)
          Select Printer.
 boolean SelectPrinterByName(java.lang.String printerName, HarmoniPrinterInfo harmoniInfo)
          This method sets the given printer for the report.
 void SetJobTitle(java.lang.String jobTitle)
          Used to log any string which the user desires to the server.log file.
 void SetName(java.lang.String jobName)
          Set the name associated with this job
 void SetNthSortField(int sortFieldN, java.lang.String name, int direction)
          Change the given sort field's name and direction.
 void SetNthTableLogOnInfo(int tableN, HarmoniLogOnInfo logOnInfo, boolean propagate)
          Sets the SQL connection information for the given table in this job's report.
 java.lang.String SetNthTablePrivateDataFromXMLFile(int table, java.lang.String xmlFileName)
          The method reads an XML file from the file system and sets the private data for table N.
 void SetPrintOptions(HarmoniPrintOptions options)
          Set the Print Options for this report.
 java.io.OutputStream SetPrivateData()
          This method is useful to set the data for a DOR report when the client wants to write the XML representation of the data to an OutputStream.
 java.lang.String SetPrivateData(DORDataSet dod)
          Pass your data objects to Harmoni using Data Object Reporting.
 java.io.OutputStream SetPrivateData(int table)
          This method is useful to set the data for a DOR report when the client wants to write the XML representation of the data to an OutputStream.
 java.lang.String SetPrivateData(int table, DORDataSet dod)
          Pass your data objects to Harmoni using Data Object Reporting Returns the absolute file name of this data file on the server.
 java.lang.String SetPrivateData(int table, java.sql.ResultSet rs)
          Pass your data objects to Harmoni using Data Object Reporting Returns the absolute file name of this data file on the server.
 java.lang.String SetPrivateData(int table, java.lang.String xmlFileName)
          Pass your data objects to Harmoni using Data Object Reporting Returns the absolute file name of this data file on the server.
 java.lang.String SetPrivateData(java.sql.ResultSet rs)
          Pass your data objects to Harmoni using Data Object Reporting.
 java.lang.String SetPrivateData(java.sql.ResultSet rs, java.sql.ResultSetMetaData md)
          Pass your data objects to Harmoni using Data Object Reporting Returns the absolute file name of this data file on the server.
 java.lang.String SetPrivateData(java.lang.String xmlFileName)
          The method reads an XML file from the file system and sets the private data for table 0.Returns the absolute file name of this data file on the server.
 void SetPrivateDataFromMainReport(int subReportTable, HarmoniJob parent, int mainReportTable)
          The method sets the private data for the sub-report specified from dor data previously passed to the using SetPrivateData.
 void SetPrivateDataFromServerMachine(int table, java.lang.String xmlFileName)
          The method sets the private data for the table specified from a xml file already accessible to the report server.
 java.lang.String SetPrivateDataFromXMLFile(java.lang.String xmlFileName)
          The method reads an XML file from the file system and sets the private data for table 0.
 void setRetrieveOutputAsStream(boolean value)
          This method informs the report server to retrieve the output as a java input stream.
 void setRetrieveOutputToClientDisk(boolean value)
          This method informs the report server to retrieve the output files and write them to the client disk.
 void SetSelectionFormula(java.lang.String formulaText)
          Set the selection formula for this job's report.
 void SetSQLQuery(java.lang.String queryString)
          Set the SQL query for this job's report.
 void Start()
          Issue a PEStartPrintJob call for the job.
 boolean TestNthTableConnectivity(int tableN)
          Test a database table's settings to see if they are valid.
 boolean VerifyDatabase()
          This method verifies that connection to databases specified in this report are valid.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

H_SF_DESCENDING

public static final int H_SF_DESCENDING

H_SF_ASCENDING

public static final int H_SF_ASCENDING
Constructor Detail

HarmoniJob

public HarmoniJob(HarmoniEngine engine,
                  short handle)
Construct a (report) HarmoniJob object with the given handle.
Parameters:
engine - The HarmoniEngine which is handling this job
handle - The handle which this job is to be given

HarmoniJob

public HarmoniJob(HarmoniJob parent,
                  short handle)
Construct a (sub-report) HarmoniJob object with the given handle.
Parameters:
parent - The parent of the new subjob.
handle - The handle which this job is to be given
Method Detail

CheckSelectionFormula

public boolean CheckSelectionFormula()
                              throws HarmoniServerError,
                                     HarmoniAPIError
Checks the selection formula for validity.
Returns:
boolean indicating whether the section formula is legal.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

Close

public void Close()
           throws HarmoniServerError,
                  HarmoniAPIError
Closes the print job. If printing has not yet finished, it continues. See Crystal Developer's Guide for more information.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

DeleteNthSortField

public void DeleteNthSortField(int sortFieldN)
                        throws HarmoniServerError,
                               HarmoniAPIError
Delete a given sort field from a report.
Parameters:
sortFieldN - The index of the sort field to delete.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

getEngine

public HarmoniEngine getEngine()
Get the engine that opened this job
Returns:
The engine that opened this job

GetServerLog

public java.lang.String GetServerLog()
                              throws HarmoniServerError,
                                     HarmoniAPIError
Returns the Server log associated with the current run.
Returns:
 
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

ClearServerLog

public boolean ClearServerLog()
                       throws HarmoniServerError,
                              HarmoniAPIError
Clears the current server logs and starts a fresh log that can be retrieved using GetServerLog()
Returns:
 
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

GetHandle

public int GetHandle()
Get the handle for this job
Returns:
The handle for this job

GetJobStatus

public short GetJobStatus(HarmoniJobInfo info)
                   throws HarmoniAPIError,
                          HarmoniServerError
This method evaluates the status of a print job. A call to HarmoniJob.Start() blocks both the client and the engine process, so attempting to use this call while Start() blocks, even from a different client thread, won't return useful information.
Parameters:
info - HarmoniJobInfo, information about the job status
Returns:
short, 0 if PEOpenEngine , or PEOpenPrintJob, has not been called successfully.
PE_JOBNOTSTARTED if the job has not started yet
PE_JOBINPROGRESS if the job is in progress
PE_JOBCOMPLETED if the job has completed successfully
PE_JOBFAILED if the job has failed
PE_JOBCANCELLED if the job has been canceled by the user
PE_JOBHALTED if the report has been halted
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

GetName

public java.lang.String GetName()
Get the name associated with this job
Returns:
The name of this job.

GetNthTableLogOnInfo

public HarmoniLogOnInfo GetNthTableLogOnInfo(int tableN)
                                      throws HarmoniServerError,
                                             HarmoniAPIError

GetPrintOptions

public HarmoniPrintOptions GetPrintOptions()
                                    throws HarmoniAPIError,
                                           HarmoniServerError
This method retieves the print options specified for the report
Returns:
HarmoniPrintOptions, returns print options if the call is successful, null if call fails
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

GetSelectedPrinter

public HarmoniDEVMODE GetSelectedPrinter(java.lang.StringBuffer driverName,
                                         java.lang.StringBuffer printerName,
                                         java.lang.StringBuffer portName)
                                  throws HarmoniServerError,
                                         HarmoniAPIError
Obtain the selected printer. See Crystal Developer's Guide for more information.
Parameters:
driverName - The name of the driver to use
printerName - The printer name to use.
portName - The name of the port to use
Returns:
A class describing a printer.

GetSelectedPrinterByName

public HarmoniPrinterInfo GetSelectedPrinterByName(java.lang.StringBuffer printName)
                                            throws HarmoniAPIError,
                                                   HarmoniServerError
This method returns the printer info for the job
Parameters:
printName, - holds the Printer Name of the job
Returns:
harmoniInfo, returns the printerInfo of the printer attached to the report
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

GetSelectionFormula

public void GetSelectionFormula(java.lang.StringBuffer formulaText)
                         throws HarmoniServerError,
                                HarmoniAPIError
Get the selection formula used in this job's report.
Parameters:
formulaText - The StringBuffer to which the selection formula text will be appended.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

GetSQLQuery

public void GetSQLQuery(java.lang.StringBuffer queryBuffer)
                 throws HarmoniServerError,
                        HarmoniAPIError
Get the SQL query for this job's report.
Parameters:
queryBuffer - The StringBuffer to which the SQL statement will be appended.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

GetStatus

public short GetStatus(HarmoniJobInfo info)
                throws HarmoniServerError,
                       HarmoniAPIError
Get the status and progress statistics of a report job.
Parameters:
info - A HarmoniJobInfo object which status information will be placed into.
Returns:
Indicates the status of the job. The various status codes have the following meaning:

HarmoniJob.JOB_NOTSTARTED
Job has not started yet
HarmoniJob.JOB_INPROGRESS
Job is in progress
HarmoniJob.JOB_COMPLETED
Job has completed successfully
HarmoniJob.JOB_FAILED
Job has failed
HarmoniJob.JOB_CANCELLED
Job has been cancelled by the user
HarmoniJob.JOB_HALTED
Job has exceeded the record or time governors
'-1'
Either the print engine or the print job has not yet been opened.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

OutputTo

public void OutputTo(java.lang.String outputFileName,
                     FormatOptions fmtOptions)
              throws InvalidParameterException,
                     HarmoniServerError,
                     HarmoniAPIError,
                     HarmoniClientError
Output the job to Saffron
Parameters:
outputFileName -  
formatOptions - The options the specify the format to output to

OutputToSaffronHtml

public void OutputToSaffronHtml(java.lang.String htmlFileName,
                                HTMLFormatOptions options)
                         throws InvalidParameterException,
                                HarmoniServerError,
                                HarmoniAPIError,
                                HarmoniClientError
Deprecated. As of Harmoni 1.0, replaced by OutputTo(FormatOptions, DestinationOptions)

Output the job to Saffron HTML format.
Parameters:
htmlFileName - The name of the file to export to.
options - The options to use when outputing.

OutputToSaffronPDF

public void OutputToSaffronPDF(java.lang.String pdfFileName,
                               PDFFormatOptions options)
                        throws InvalidParameterException,
                               HarmoniServerError,
                               HarmoniAPIError,
                               HarmoniClientError
Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)

Output the job to Saffron PDF format.
Parameters:
pdfFileName - The name of the file to export to.
options - The options to use when outputing.

OutputToSaffronRTF

public void OutputToSaffronRTF(java.lang.String rtfFileName,
                               RTFFormatOptions options)
                        throws InvalidParameterException,
                               HarmoniServerError,
                               HarmoniAPIError,
                               HarmoniClientError
Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)

Output the job to Saffron RTF format.
Parameters:
rtfFileName - The name of the file to export to.
options - The options to use when outputing.

OutputToSaffronJPEG

public void OutputToSaffronJPEG(java.lang.String jpegFileName,
                                RasterFormatOptions options)
                         throws InvalidParameterException,
                                HarmoniServerError,
                                HarmoniAPIError,
                                HarmoniClientError
Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)

Output the job to Saffron JPEG format.
Parameters:
jpegFileName - The name of the file to export to.
options - The options to use when outputing.

OutputToSaffronPNG

public void OutputToSaffronPNG(java.lang.String pngFileName,
                               RasterFormatOptions options)
                        throws InvalidParameterException,
                               HarmoniServerError,
                               HarmoniAPIError,
                               HarmoniClientError
Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)

Output the job to Saffron PNG format.
Parameters:
pngFileName - The name of the file to export to.
options - The options to use when outputing.

OutputToSaffronSVG

public void OutputToSaffronSVG(java.lang.String svgFileName,
                               SVGFormatOptions options)
                        throws InvalidParameterException,
                               HarmoniServerError,
                               HarmoniAPIError,
                               HarmoniClientError
Deprecated. As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)

Output the job to Saffron SVG format.
Parameters:
svgFileName - The name of the file to export to.
options - The options to use when outputing.

OutputToPrinter

public void OutputToPrinter(int copies)
                     throws HarmoniServerError,
                            HarmoniAPIError
Sets the print destination for this job to be the printer. See the Crystal Developer's Guide for more information about which printer is used.
Parameters:
copies - The number of copies of the report to print
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

SetJobTitle

public void SetJobTitle(java.lang.String jobTitle)
                 throws HarmoniAPIError,
                        HarmoniServerError
Used to log any string which the user desires to the server.log file. The purpose of this method is to allow the user to log any string to the server.log file so that the job can be associated with the user running the job in case errors need to reported back to that user. For example: SetJobTitle("John Smith, Marketing Dept. ext. 5533");

SelectPrinter

public void SelectPrinter(java.lang.String driverName,
                          java.lang.String printerName,
                          java.lang.String portName,
                          HarmoniDEVMODE mode)
                   throws HarmoniServerError,
                          HarmoniAPIError
Select Printer.
Parameters:
driverName - The name of the driver
printerName - The name of the printer
portName - The name of the port
mode - The mode in which the printer should be selected The parameters must be supplied or a windows dialog will be thrown up on the server machine.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

SelectPrinterByName

public boolean SelectPrinterByName(java.lang.String printerName,
                                   HarmoniPrinterInfo harmoniInfo)
                            throws HarmoniAPIError,
                                   HarmoniServerError
This method sets the given printer for the report.
Parameters:
printerName, - the printer to be attched to the report.
harmoniInfo, - is the HarmoniPrinterInfo of the printer.
Returns:
boolean, true if the call is succesful and false if call fails.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

SetName

public void SetName(java.lang.String jobName)
Set the name associated with this job
Parameters:
jobName - The name to use for this job

DeleteXmlFile

public void DeleteXmlFile(boolean xmlFileStatus)
Set the deletion option the DOR file in SetPrivateData True by default, if set to false the xml file passed by SetPrivateData will not be deleted.
Parameters:
xmlFileStatus - true or false value

SetNthSortField

public void SetNthSortField(int sortFieldN,
                            java.lang.String name,
                            int direction)
                     throws HarmoniServerError,
                            HarmoniAPIError
Change the given sort field's name and direction. See Crystal Developer's Help for information on adding new sort fields to a report.
Parameters:
sortFieldN - The number of the sort field to be changed.
name - The name of the sort data field.
direction - The new direction of the sort field (Either HarmoniJob.SF_ASCENDING or HarmoniJob.SF_DESCENDING).
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

SetNthTableLogOnInfo

public void SetNthTableLogOnInfo(int tableN,
                                 HarmoniLogOnInfo logOnInfo,
                                 boolean propagate)
                          throws HarmoniServerError,
                                 HarmoniAPIError
Sets the SQL connection information for the given table in this job's report.
Parameters:
tableN - The number of the table.
logOnInfo - The HarmoniLogOnInfo object which gives the new SQL connection information for the table.
propagate - Indicates whether or not new logon information should apply to any other tables in the report that had the same original server and database names as the specified table.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

SetPrintOptions

public void SetPrintOptions(HarmoniPrintOptions options)
                     throws HarmoniServerError,
                            HarmoniAPIError
Set the Print Options for this report.
Parameters:
options - Class providing Print Options. Null is not accepted.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

SetSelectionFormula

public void SetSelectionFormula(java.lang.String formulaText)
                         throws HarmoniServerError,
                                HarmoniAPIError
Set the selection formula for this job's report.
Parameters:
formulaText - The new selection formula.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

SetPrivateData

public java.lang.String SetPrivateData(int table,
                                       DORDataSet dod)
                                throws HarmoniClientError,
                                       HarmoniAPIError,
                                       HarmoniServerError,
                                       DORException
Pass your data objects to Harmoni using Data Object Reporting Returns the absolute file name of this data file on the server.
Parameters:
table - int : The table number in the report or subreport.
dod - com.dynalivery.dor.DORResultSet
Throws:
HarmoniClientError -  
HarmoniAPIError -  
HarmoniServerError -  
DORException -  

SetPrivateData

public java.io.OutputStream SetPrivateData()
                                    throws DORException,
                                           HarmoniAPIError
This method is useful to set the data for a DOR report when the client wants to write the XML representation of the data to an OutputStream. The XML must be structured in accordance with the Microsoft schema for ADO recordsets. The Harmoni Developer's Manual has examples of how to translate XML data representations to the Microsoft schema for ADO recordsets using an XSLT processor. The OutputStream which is returned by this method should be closed immediately after the XML data is written to the stream. It must certainly be closed before the Start method is called in order for the dor data to exist on the server before the report processing begins. The data will be set for table 0 of the dor report when this method is called.
Throws:
DORException - thrown if an error occurs while preparing to transfer the XML representation of the dor data to the server.
HarmoniAPIError - thrown if there was an error in the config server.

SetPrivateData

public java.io.OutputStream SetPrivateData(int table)
                                    throws DORException,
                                           HarmoniAPIError
This method is useful to set the data for a DOR report when the client wants to write the XML representation of the data to an OutputStream. The XML must be structured in accordance with the Microsoft schema for ADO recordsets. The Harmoni Developer's Manual has examples of how to translate XML data representations to the Microsoft schema for ADO recordsets using an XSLT processor. The OutputStream which is returned by this method should be closed immediately after the XML data is written to the stream. It must certainly be closed before the Start method is called in order for the dor data to exist on the server before the report processing begins.
Parameters:
table - int : The zero index table number in the report or subreport for multi-table dor.
Throws:
DORException - thrown if an error occurs while preparing to transfer the XML representation of the dor data to the server.
HarmoniAPIError - thrown if there was an error in the config server.

SetPrivateData

public java.lang.String SetPrivateData(int table,
                                       java.lang.String xmlFileName)
                                throws HarmoniServerError,
                                       HarmoniAPIError,
                                       HarmoniClientError,
                                       java.io.FileNotFoundException,
                                       DORException
Pass your data objects to Harmoni using Data Object Reporting Returns the absolute file name of this data file on the server.
Parameters:
table - int : The table number in the report or subreport.
xmlFileName - String : The full path to the xml file.
Throws:
HarmoniClientError - The DOR file wasn't created properly. Either there was an error with the Data Object, or in creating the DOR File.
HarmoniServerError - A fatal error occured during the remote call. The DOR file could not be sent to the server.
HarmoniAPIError - The Engine could not set the Private Data.
java.io.FileNotFoundException - The path to the xml file does not exist.
DORException -  

SetPrivateData

public java.lang.String SetPrivateData(int table,
                                       java.sql.ResultSet rs)
                                throws HarmoniClientError,
                                       HarmoniAPIError,
                                       HarmoniServerError,
                                       DORException
Pass your data objects to Harmoni using Data Object Reporting Returns the absolute file name of this data file on the server.
Parameters:
table - int : The table number in the report or subreport.
rs - java.sql.ResultSet : the implementation of the ResultSet interface which describes your Data Object
Throws:
HarmoniClientError - The DOR file wasn't created properly. Either there was an error with the Data Object, or in creating the DOR File.
HarmoniServerError - A fatal error occured during the remote call. The DOR file could not be sent to the server.
HarmoniAPIError - The Engine could not set the Private Data.
DORException -  

SetPrivateData

public java.lang.String SetPrivateData(DORDataSet dod)
                                throws HarmoniClientError,
                                       HarmoniAPIError,
                                       HarmoniServerError,
                                       DORException
Pass your data objects to Harmoni using Data Object Reporting. Returns the absolute file name of this data file on the server.
Parameters:
dod - DORDataSet : The data object for table zero of the report or subreport.
Throws:
HarmoniClientError -  
HarmoniAPIError -  
HarmoniServerError -  
DORException -  

SetPrivateData

public java.lang.String SetPrivateData(java.lang.String xmlFileName)
                                throws HarmoniServerError,
                                       HarmoniAPIError,
                                       HarmoniClientError,
                                       java.io.FileNotFoundException,
                                       DORException
The method reads an XML file from the file system and sets the private data for table 0.Returns the absolute file name of this data file on the server.
Parameters:
xmlFileName - java.lang.String Fully qualified path to the XML file.

SetPrivateDataFromXMLFile

public java.lang.String SetPrivateDataFromXMLFile(java.lang.String xmlFileName)
                                           throws HarmoniServerError,
                                                  HarmoniAPIError,
                                                  HarmoniClientError,
                                                  java.io.FileNotFoundException,
                                                  DORException
The method reads an XML file from the file system and sets the private data for table 0. Returns the absolute file name of this data file on the server.
Parameters:
xmlFileName - java.lang.String Fully qualified path to the XML file.
Throws:
HarmoniClientError - The DOR file wasn't created properly. Either there was an error with the Data Object, or in creating the DOR File.
HarmoniServerError - A fatal error occured during the remote call. The DOR file could not be sent to the server.
HarmoniAPIError - The Engine could not set the Private Data.
java.io.FileNotFoundException - The path to the xml file does not exist.
DORException -  

SetNthTablePrivateDataFromXMLFile

public java.lang.String SetNthTablePrivateDataFromXMLFile(int table,
                                                          java.lang.String xmlFileName)
                                                   throws HarmoniServerError,
                                                          HarmoniAPIError,
                                                          HarmoniClientError,
                                                          java.io.FileNotFoundException,
                                                          DORException
The method reads an XML file from the file system and sets the private data for table N. Returns the absolute file name of this data file on the server.
Parameters:
table - int The table number in the report
xmlFileName - java.lang.String Fully qualified path to the XML file.
Throws:
HarmoniClientError - The DOR file wasn't created properly. Either there was an error with the Data Object, or in creating the DOR File.
HarmoniServerError - A fatal error occured during the remote call. The DOR file could not be sent to the server.
HarmoniAPIError - The Engine could not set the Private Data.
java.io.FileNotFoundException - The path to the xml file does not exist.
DORException -  

SetPrivateData

public java.lang.String SetPrivateData(java.sql.ResultSet rs)
                                throws HarmoniClientError,
                                       HarmoniAPIError,
                                       HarmoniServerError,
                                       DORException
Pass your data objects to Harmoni using Data Object Reporting. Returns the absolute file name of this data file on the server.
Parameters:
rs - java.sql.ResultSet : The data object for table zero of the report or subreport.
Throws:
HarmoniClientError - The DOR file wasn't created properly. Either there was an error with the Data Object, or in creating the DOR File.
HarmoniServerError - A fatal error occured during the remote call. The DOR file could not be sent to the server.
HarmoniAPIError - The Engine could not set the Private Data.
DORException -  

SetPrivateData

public java.lang.String SetPrivateData(java.sql.ResultSet rs,
                                       java.sql.ResultSetMetaData md)
                                throws HarmoniClientError,
                                       HarmoniAPIError,
                                       HarmoniServerError,
                                       DORException
Pass your data objects to Harmoni using Data Object Reporting Returns the absolute file name of this data file on the server.
Parameters:
rs - java.sql.ResultSet : the implementation of the ResultSet interface which describes your Data Object
md - java.sql.ResultSetMetaData : the implementation of the ResultSetMetaData interface which describes your Data Object
Throws:
HarmoniClientError - The DOR file wasn't created properly. Either there was an error with the Data Object, or in creating the DOR File.
HarmoniServerError - A fatal error occured during the remote call. The DOR file could not be sent to the server.
HarmoniAPIError - The Engine could not set the Private Data.
DORException -  

SetPrivateDataFromServerMachine

public void SetPrivateDataFromServerMachine(int table,
                                            java.lang.String xmlFileName)
                                     throws HarmoniAPIError,
                                            HarmoniServerError
The method sets the private data for the table specified from a xml file already accessible to the report server.
Parameters:
table - The table asociated with the report in the report template.
xmlFileName - java.lang.String Fully qualified path to the XML file.

SetPrivateDataFromMainReport

public void SetPrivateDataFromMainReport(int subReportTable,
                                         HarmoniJob parent,
                                         int mainReportTable)
                                  throws HarmoniAPIError,
                                         HarmoniServerError
The method sets the private data for the sub-report specified from dor data previously passed to the using SetPrivateData.
Parameters:
subReportTable - The table asociated with a sub-report in the report template.
parent - The parent job of this template.

SetSQLQuery

public void SetSQLQuery(java.lang.String queryString)
                 throws HarmoniServerError,
                        HarmoniAPIError
Set the SQL query for this job's report.
Parameters:
queryString - The new SQL query for this job's report.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

Start

public void Start()
           throws HarmoniServerError,
                  HarmoniAPIError,
                  FileReturnException
Issue a PEStartPrintJob call for the job.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

getOutputAsStream

public java.io.InputStream getOutputAsStream(java.lang.String outputFileName)
                                      throws FileReturnException,
                                             InvalidCallSequenceException
This method will return an InputStream which contains the requested output name. This method is useful when writting the output directly to a servlet instead of to the client disk.
Parameters:
outputFileName - the name of the output to retrieve as a stream from the server. The client can obtain the list of the output file names by calling getOutputFileNames.
Throws:
FileReturnException - thrown if an error occurred while getting the output from the server.
InvalidCallSequenceException - thrown if the setRetrieveOutputAsStream method was not called with a value of true before this method was called.

getOutputFileNames

public java.lang.String[] getOutputFileNames()
                                      throws FileReturnException,
                                             InvalidCallSequenceException
This method will return an array of output file names which can be used as the outputFileName parameter of a call to getOutputAsStream.
Throws:
FileReturnException - thrown if an error occurred while getting the output filename list from the server.
InvalidCallSequenceException - thrown if the setRetrieveOutputAsStream method was not called with a value of true before this method was called.

TestNthTableConnectivity

public boolean TestNthTableConnectivity(int tableN)
                                 throws HarmoniServerError,
                                        HarmoniAPIError
Test a database table's settings to see if they are valid.
Parameters:
tableN - The number of the table.
Returns:
A boolean indicating whether the settings are valid.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

VerifyDatabase

public boolean VerifyDatabase()
                       throws HarmoniAPIError,
                              HarmoniServerError
This method verifies that connection to databases specified in this report are valid.
Returns:
true if call is successful, falseif call fails.
Throws:
HarmoniServerError - A fatal error occured during the remote call.
HarmoniAPIError - The remote print engine call returned a value indicating failure.

setRetrieveOutputToClientDisk

public void setRetrieveOutputToClientDisk(boolean value)
                                   throws InvalidCallSequenceException
This method informs the report server to retrieve the output files and write them to the client disk. This method must be called before any of the Output or Export methods. The files are actually retrieved during the Start method call.

setRetrieveOutputAsStream

public void setRetrieveOutputAsStream(boolean value)
                               throws InvalidCallSequenceException
This method informs the report server to retrieve the output as a java input stream. This method must be called before any of the Output or Export methods. The input stream can be obtained after the Start method completes by calling the getOutputAsStream method.