com.dynalivery.pcre
Class PCRESaffronJob

java.lang.Object
  |
  +--com.dynalivery.pcre.PCRESaffronJob

public class PCRESaffronJob
extends java.lang.Object


Constructor Summary
PCRESaffronJob(PCREEngine engine)
          Creates new PCRESaffronJob
 
Method Summary
 void Close()
          Job close call to the server..
 void concatenate(PCREJob job)
          Concatenates the output files opened in PCREJob.
 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.
 void OutputConcatToSaffronHtml(java.lang.String htmlFileName, PCRESaffronHtmlOptions options)
          Concatenate multiple job outputs to a single Html document using Saffron.
 void OutputConcatToSaffronPDF(java.lang.String pdfFileName, PCRESaffronPDFOptions options)
          Concatenate multiple job outputs to a single PDF document using Saffron.
 void OutputConcatToSaffronRTF(java.lang.String rtfFileName, PCRESaffronRTFOptions options)
          Concatenate multiple job outputs to a single RTF document using Saffron.
 void OutputConcatToSaffronSVG(java.lang.String svgFileName, PCRESaffronSVGOptions options)
          Concatenate multiple job outputs to a single SVG document using Saffron.
 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 setStoreOutputInRepository(boolean value)
          This method prepares the report server to store the output in the repostory.
 void Start()
          Issue a PEStartPrintJob call for the job.
 void storeOutputInRepository(java.lang.String repositoryFolder, RepositorySecurityOptions securityOptions, RepositoryExpirationOptions expirationOptions, boolean overwrite)
          This method will store the output files in the repository.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PCRESaffronJob

public PCRESaffronJob(PCREEngine engine)
Creates new PCRESaffronJob
Method Detail

concatenate

public void concatenate(PCREJob job)
                 throws ConcatenationLimitException
Concatenates the output files opened in PCREJob. Maximum of 10 jobs can be concatenated on a single run.

OutputConcatToSaffronPDF

public void OutputConcatToSaffronPDF(java.lang.String pdfFileName,
                                     PCRESaffronPDFOptions options)
                              throws PCREServerError,
                                     PCREAPIError,
                                     PCREClientError
Concatenate multiple job outputs to a single PDF document using Saffron.
Parameters:
pdfFileName - The name of the file to export to.
options - The PCRESaffronPDFOptions to use when outputing.

OutputConcatToSaffronRTF

public void OutputConcatToSaffronRTF(java.lang.String rtfFileName,
                                     PCRESaffronRTFOptions options)
                              throws PCREServerError,
                                     PCREAPIError,
                                     PCREClientError
Concatenate multiple job outputs to a single RTF document using Saffron.
Parameters:
rtfFileName - The name of the file to export to.
options - The PCRESaffronRTFOptions to use when outputing.

OutputConcatToSaffronHtml

public void OutputConcatToSaffronHtml(java.lang.String htmlFileName,
                                      PCRESaffronHtmlOptions options)
                               throws PCREServerError,
                                      PCREAPIError,
                                      PCREClientError
Concatenate multiple job outputs to a single Html document using Saffron.
Parameters:
htmlFileName - The name of the file to export to.
options - The PCRESaffronHtmlOptions to use when outputing.

OutputConcatToSaffronSVG

public void OutputConcatToSaffronSVG(java.lang.String svgFileName,
                                     PCRESaffronSVGOptions options)
                              throws PCREServerError,
                                     PCREAPIError,
                                     PCREClientError
Concatenate multiple job outputs to a single SVG document using Saffron.
Parameters:
svgFileName - The name of the file to export to.
options - The PCRESaffronSVGOptions to use when outputing.

Start

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

Close

public void Close()
           throws PCREServerError,
                  PCREAPIError
Job close call to the server.. closes all jobs that were concatenated using Start

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.

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.

setStoreOutputInRepository

public void setStoreOutputInRepository(boolean value)
                                throws InvalidCallSequenceException
This method prepares the report server to store the output in the repostory.
Parameters:
value - If set to true, the report server will prepare to store output in the repository, else it will not and if asked will throw an exception.
Throws:
InvalidCallSequenceException - thrown if this called a between the time that a output or export method is called and the time that the start method is called.

storeOutputInRepository

public void storeOutputInRepository(java.lang.String repositoryFolder,
                                    RepositorySecurityOptions securityOptions,
                                    RepositoryExpirationOptions expirationOptions,
                                    boolean overwrite)
                             throws InvalidPathnameException,
                                    RepositoryNotEnabledException,
                                    InvalidCallSequenceException,
                                    InternalRepositoryException,
                                    RepositorySecurityException,
                                    DuplicateObjectException
This method will store the output files in the repository. This method must be called after the start method in order for the output to exist.
Parameters:
repositoryFolder - the repository folder where all of the output files should be placed.
securityInfo - the security attributes of the output in the repository
expirationOptions - the expiration attributes of the output in the repository
overwrite - if set to true will overwrite any output in the specified repository folder. If set to false, a DuplicateObjectException will be thrown if output of the same name already exists in the specified repository folder.
Throws:
InvalidPathnameException - thrown if the repositoryFolder parameter is null or doesn't exist in the repository.
RepositoryNotEnabledException - thrown if the repository has not been enabled on the report server machine that this job is executing on.
InvalidCallSequenceException - thrown if the setStoreOutputInRepository was not called with a value of true before this method was called.
InternalRepositoryException - thrown if an unexpected condition such as a communications error occurs while communicating with the report engine.
RepositorySecurityException - thrown if the user doesn't have permission to store the output in the given repository folder.
DuplicateObjectException - thrown if the overwrite parameter is false and files of the same name already exist in the specified repository folder.