Job Class Reference

This is the main class of TFORMer Runtime for generating output. More...

List of all members.

Public Member Functions

void dispose () throws TFormerException
 Releases the resources allocated into TFORMer runtime by this instance.
String getConfigurationFile ()
 Gets the current configuration file for TFORMer Runtime.
String getFormName ()
 Gets the name of the Repository-based FormLayout for this Job.
int getFromPage ()
 Gets the first page number to be printed.
JobData getJobData ()
 Gets the JobData for the Job.
String getJobTrayControlName ()
 Gets the name of the JobTrayControl to be used for this Job.
int getNumberOfCopies ()
 Gets the number of copies to be printed.
String getOutputName ()
 Gets the name of the output file or the name of the spool-job(on Microsoft Windows printers).
String getPrinterName ()
 Gets type and name of the output device.
EPrinterType getPrinterType ()
 Gets the type of the generated output.
String getProjectName ()
 Gets the name of the Project-name for printing a Repository-based FormLayout.
String getRecordCopyDataField ()
 Gets the name of the DataField which holds the number of Record copies.
String getRepositoryName ()
 Gets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.
int getStartColumn ()
 Gets the column-number of the first label to be printed.
int getStartRow ()
 Gets the row-number of the first label to be printed.
int getToPage ()
 Gets the last page number to be printed.
 Job () throws TFormerException
 Initializes a new instance of the Job class.
void print () throws TFormerException
 Prints the Job using the selected FormLayout and JobData.
void saveXml (String filename) throws TFormerException
 Saves the data used for printing a Job as XML file.
void setConfigurationFile (String sConfigurationFile)
 Sets the current configuration file for TFORMer Runtime.
void setFormName (String sFormName)
 Sets the name of the Repository-based FormLayout for this Job.
void setFromPage (int nFromPage)
 Set the first page number to be printed.
void setJobData (JobData jobData)
 Sets the JobData for the Job.
void setJobTrayControlName (String sJobTrayControlName)
 Sets the name of the JobTrayControl to be used for this Job.
void setNumberOfCopies (int numberOfCopies) throws IllegalArgumentException
 Sets the number of copies to be printed.
void setOutputName (String sOutputName)
 Sets the name of the output file or the name of the spool-job(on Microsoft Windows printers).
void setPrinterName (String sPrinterName)
 Sets type and name of the output device.
void setPrinterType (EPrinterType printerType)
 Sets the type of the generated output.
void setProjectName (String sProjectName)
 Sets the name of the Project-name for printing a Repository-based FormLayout.
void setRecordCopyDataField (String sRecordCopyDataField)
 Sets the name of the DataField which holds the number of Record copies.
void setRepositoryName (String sRepositoryName)
 Sets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.
void setStartColumn (int startColumn) throws IllegalArgumentException
 Sets the column-number of the first label to be printed.
void setStartRow (int startRow) throws IllegalArgumentException
 Sets the row-number of the first label to be printed.
void setToPage (int nToPage)
 Sets the last page number to be printed.


Detailed Description

This is the main class of TFORMer Runtime for generating output.




The basic steps to generate output are as follows:

Task See Also Note
Create a JobData JobData A JobData is used to pass data to a Job.
Provide data for the JobData JobDataRecordSet, JobDataCsv, JobDataOdbc, JobDataXml Provide data programmatically or connect the JobData with a file or a database.
The JobData is responsible to provide values for the data-fields required for the Formlayout to be printed.
Create a Job Job The Job class is the main class for printing a Formlayout.
Connect the Job with the JobData JobData If no JobData is connected with the Job the default data for the Formlayout is used. This default data is identical to the data-set which was used for printing or previewing the Formlayout in the last TFORMer Designer session.
Adjust the properties of the Job The most important properties are the output-type and the name of the target device (OutputName, PrinterType or PrinterName). The order in which the properties are set is irrelevant. The method Print() takes care to apply the settings correctly.
Print the Job Print Generates the Job based on the FormLayout and JobData in the required output format.

Thread-safety:

A single instance of this class must not be used by different threads.



Constructor & Destructor Documentation

Job (  )  throws TFormerException

Initializes a new instance of the Job class.

Exceptions:
TFormerException error occurred into TFORMer runtime.


Member Function Documentation

void dispose (  )  throws TFormerException

Releases the resources allocated into TFORMer runtime by this instance.

Remember to call this method always after the use of the instance, in order to release the memory allocated.

Exceptions:
TFormerException error occurred into TFORMer runtime.

String getConfigurationFile (  ) 

Gets the current configuration file for TFORMer Runtime.

Returns:
The current configuration file for TFORMer Runtime.

String getFormName (  ) 

Gets the name of the Repository-based FormLayout for this Job.

Returns:
The name of the Repository-based FormLayout for this Job.

int getFromPage (  ) 

Gets the first page number to be printed.

Returns:
The first page number to be printed.

JobData getJobData (  ) 

Gets the JobData for the Job.

Returns:
The JobData for the Job.

String getJobTrayControlName (  ) 

Gets the name of the JobTrayControl to be used for this Job.

Returns:
The name of the JobTrayControl to be used for this Job.

int getNumberOfCopies (  ) 

Gets the number of copies to be printed.

Returns:
The number of copies to be printed.

String getOutputName (  ) 

Gets the name of the output file or the name of the spool-job(on Microsoft Windows printers).

Returns:
The name of the output file or the name of the spool-job(on Microsoft Windows printers).

String getPrinterName (  ) 

Gets type and name of the output device.

Returns:
The type and name of the output device.

EPrinterType getPrinterType (  ) 

Gets the type of the generated output.

Returns:
The type of the generated output.

String getProjectName (  ) 

Gets the name of the Project-name for printing a Repository-based FormLayout.

Returns:
The name of the Project-name for printing a Repository-based FormLayout.

String getRecordCopyDataField (  ) 

Gets the name of the DataField which holds the number of Record copies.

Returns:
The name of the DataField which holds the number of Record copies.

String getRepositoryName (  ) 

Gets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.

Returns:
The filename of the Repository or the filename of the stand-alone FormLayout for this Job.

int getStartColumn (  ) 

Gets the column-number of the first label to be printed.

Returns:
The column-number of the first label to be printed (starting from 0).

int getStartRow (  ) 

Gets the row-number of the first label to be printed.

Returns:
The row-number of the first label to be printed (starting from 0).

int getToPage (  ) 

Gets the last page number to be printed.

Returns:
The last page number to be printed.

void print (  )  throws TFormerException

Prints the Job using the selected FormLayout and JobData.

  • For a Repository-based FormLayout: Starts the output based on the selected RepositoryName, ProjectName, FormName and the selected JobData.
  • For stand-alone FormLayout: Starts the output based on the selected stand-alone FormLayout (specified using RepositoryName) and the selected JobData.

If no JobData was specified with the property JobData then TFORMer uses default data for this Job. The default data is stored along with the FormLayout using file-extension *.xml and contains the DataField-values entered during the last TFORMer Designer session.

Note: TFORMer uses a configuration file named TFORMer.xml for adjusting system-wide output options like form sizes, color mode and so on. See setConfigurationFile(String) for details.

Exceptions:
TFormerException error occurred into TFORMer runtime.

void saveXml ( String  filename  )  throws TFormerException

Saves the data used for printing a Job as XML file.

All DataField-values set via an arbitrary JobData are cached internally. This function writes the cache to the specified file using the internal TFORMer format. The structure of this file is described in JobDataXml. It can be reused as a JobDataXml.

Parameters:
filename The name of the output file.
Exceptions:
TFormerException error occurred into TFORMer runtime.

void setConfigurationFile ( String  sConfigurationFile  ) 

Sets the current configuration file for TFORMer Runtime.

Parameters:
sConfigurationFile The current configuration file for TFORMer Runtime.

void setFormName ( String  sFormName  ) 

Sets the name of the Repository-based FormLayout for this Job.

Parameters:
sFormName The name of the Repository-based FormLayout for this Job.

void setFromPage ( int  nFromPage  ) 

Set the first page number to be printed.

Parameters:
nFromPage the first page number to be printed.

void setJobData ( JobData  jobData  ) 

Sets the JobData for the Job.

Parameters:
jobData The JobData for the Job.

void setJobTrayControlName ( String  sJobTrayControlName  ) 

Sets the name of the JobTrayControl to be used for this Job.

Parameters:
sJobTrayControlName The name of the JobTrayControl to be used for this Job.

void setNumberOfCopies ( int  numberOfCopies  )  throws IllegalArgumentException

Sets the number of copies to be printed.

Parameters:
numberOfCopies The number of copies to be printed.
Exceptions:
IllegalArgumentException error for negative value

void setOutputName ( String  sOutputName  ) 

Sets the name of the output file or the name of the spool-job(on Microsoft Windows printers).

Parameters:
sOutputName the name of the output file or the name of the spool-job(on Microsoft Windows printers).

void setPrinterName ( String  sPrinterName  ) 

Sets type and name of the output device.

Parameters:
sPrinterName The type and name of the output device.

void setPrinterType ( EPrinterType  printerType  ) 

Sets the type of the generated output.

Parameters:
printerType The type of the generated output.

void setProjectName ( String  sProjectName  ) 

Sets the name of the Project-name for printing a Repository-based FormLayout.

Parameters:
sProjectName The name of the Project-name for printing a Repository-based FormLayout.

void setRecordCopyDataField ( String  sRecordCopyDataField  ) 

Sets the name of the DataField which holds the number of Record copies.

Parameters:
sRecordCopyDataField The name of the DataField which holds the number of Record copies.

void setRepositoryName ( String  sRepositoryName  ) 

Sets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.

Parameters:
sRepositoryName The filename of the Repository or the filename of the stand-alone FormLayout for this Job.

void setStartColumn ( int  startColumn  )  throws IllegalArgumentException

Sets the column-number of the first label to be printed.

Parameters:
startColumn The column-number of the first label to be printed (leftmost column has index 0).
Exceptions:
IllegalArgumentException error for negative value

void setStartRow ( int  startRow  )  throws IllegalArgumentException

Sets the row-number of the first label to be printed.

Parameters:
startRow The row-number of the first label to be printed (topmost row has index 0).

void setToPage ( int  nToPage  ) 

Sets the last page number to be printed.

Parameters:
nToPage the last page number to be printed.


© 2006-2009 All rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Wed Sep 2 16:01:27 2009 for TFORMer Runtime JAVA Developer Reference with doxygen 1.5.8