Public Member Functions | |
JobTrayControl | addJobTrayControl (String name) throws TFormerException |
Creates and adds a new JobTrayControl to the Repository. | |
Printer | addPrinter (String sName) throws TFormerException |
Creates and adds the Printer to the Repository. | |
Project | addProject (String sName) throws TFormerException |
Creates and adds the Project in the Repository. | |
void | close (boolean bCommitChanges) throws TFormerException |
Close this Repository. | |
void | dispose () throws TFormerException |
Releases the resources allocated into TFORMer runtime by the instance. | |
void | dump (PrintStream s) throws IOException, TFormerException |
Dump the current instance into the stream. | |
int | getBuildNumber () throws TFormerException |
Gets the build number of the Repository. | |
String | getComment () throws TFormerException |
Gets the comment for the Repository. | |
DataSource | getDefaultDataSource () throws TFormerException |
Gets the default DataSource. | |
JobTrayControl | getDefaultJobTrayControl () throws TFormerException |
Gets the default JobTrayControl in the Repository. | |
Printer | getDefaultPrinter () throws TFormerException |
Gets the Default Printer of the Repository. | |
String | getDescription () throws TFormerException |
Gets the description of the Repository. | |
JobTrayControl | getFirstJobTrayControl () throws TFormerException |
Gets the first JobTrayControl in the Repository. | |
Printer | getFirstPrinter () throws TFormerException |
Gets the first Printer stored in the Repository. | |
Project | getFirstProject () throws TFormerException |
Gets the first Project stored in the Repository. | |
String | getFullPath () throws TFormerException |
Gets the path of the Repository. | |
Project | getGlobalProject () throws TFormerException |
Gets the global Project of the Repository. | |
JobTrayControl | getJobTrayControl (String name) throws TFormerException |
Gets a JobTrayControl defined in the Repository. | |
int | getNumberOfJobTrayControls () throws TFormerException |
Gets the number of JobTrayControl-objects stored in the Repository. | |
int | getNumberofPrinters () throws TFormerException |
Gets the number of printers defined in the Repository. | |
int | getNumberOfProjects () throws TFormerException |
Gets the number of Project-objects stored in the Repository. | |
Printer | getPrinter (String name) throws TFormerException |
Gets the Printer from the Repository. | |
Project | getProject (String name) throws TFormerException |
Gets the Project defined in the Repository. | |
int | getVersionMajor () throws TFormerException |
Gets the major version number of the Repository. | |
int | getVersionMinor () throws TFormerException |
Gets the minor version number of the Repository. | |
boolean | isAutoSave () |
Gets a flag indicating whether to save changes to the Repository automatically. | |
boolean | isModified () throws TFormerException |
Gets a flag indicating whether this Repository has been modified. | |
boolean | isReadOnly () throws TFormerException |
Gets a flag indicating whether this Repository is read-only. | |
void | removeJobTrayControl (JobTrayControl jobTrayControl) throws TFormerException |
Removes the JobTrayControl from the Repository. | |
void | removeJobTrayControl (String name) throws TFormerException |
Removes the JobTrayControl from the Repository by name. | |
void | removePrinter (Printer printer) throws TFormerException |
Removes the Printer from the Repository. | |
void | removePrinter (String name) throws TFormerException |
Removes the Printer from the Repository by name. | |
void | removeProject (Project project) throws TFormerException |
Removes the Project from the Repository. | |
void | removeProject (String name) throws TFormerException |
Removes the Project from the Repository by name. | |
Repository (String sFilename, boolean bCreateNewRepository, boolean bIsReadOnly) throws TFormerException | |
Constructor for Repository Objects. | |
void | save () throws TFormerException |
Saves this Repository. | |
void | saveAs (String sFilename) throws TFormerException |
Saves a copy of this Repository. | |
void | setAutoSave (boolean bAutoSave) |
Sets a flag indicating whether to save changes to the Repository automatically. | |
void | setComment (String sComment) throws TFormerException |
Sets the comment for the Repository. | |
void | setDescription (String sDescription) throws TFormerException |
Sets the description of the Repository. | |
void | setModified (boolean bModified) throws TFormerException |
Sets a flag indicating whether this Repository has been modified. | |
String | toString () |
Returns a string representation of the instance. |
The Java API of TFORMer Runtime unifies access to a Repository and to a stand-alone FormLayout using this class.
Refer to the table below to understand the difference between a Repository (or Repository-based FormLayout) and a stand-alone FormLayout.
Type | Example Filename | Description |
---|---|---|
and Repository-based FormLayout | C:-IT\TFORMer\6.0 Repository\Demos.tfr Filename extension: *.tfr | A Repository is a data-structure which references an arbitrary number of FormLayout-objects. User-defined Project-objects are used to divide a Repository into logical areas. Each FormLayout referenced from within a Repository is a member of exactly one Project. Data-fields defined within a Project are only usable by form-layouts which are member of this Project. The so-called GlobalProject is allocated by default and is exclusively used to define data-fields which are available for all form-layouts (regardless of their actual Project-membership). It can not store references to a FormLayout. The Repository also stores JobTrayControl-objects. They may be used whenever printing any FormLayout referenced by this Repository (see JobTrayControlName). When printing a specific FormLayout within a Repository 3 parameters must be specified to identify the FormLayout:
|
Stand-Alone FormLayout | C: Files\TEC-IT\TFORMer6\Bin\Default_Report_EN.tff Filename extension: *.tff | A stand-alone FormLayout can be used on its own. It can be imagined like a very simple type of Repository which contains exactly one GlobalProject which stores the DataField-definitions as well as the FormLayout itself. A stand-alone FormLayout is not able to share DataField-definitions with other form layouts and can not contain user-defined Project-objects. The stand-alone FormLayout also stores JobTrayControl-objects. They may be used whenever printing this FormLayout (see JobTrayControlName). When printing a Job using a stand-alone FormLayout 1 parameter must be specified:
|
// create a Repository instance (using a stand-alone FormLayout - extension *.tff) Repository repo = new Repository("C:\\ProgramData\\TEC-IT\\TFORMer\\6.0\\Examples\\Command Line\\ODBCReportPDF\\ODBCReportPDF.tff", false, true);
// create a Repository instance (using a Repository - extension *.tfr) Repository repo = new Repository("C:\\ProgramData\\TEC-IT\\TFORMer\\6.0\\Examples\\Demo Repository\\Demos.tfr", false, true);
Repository | ( | String | sFilename, | |
boolean | bCreateNewRepository, | |||
boolean | bIsReadOnly | |||
) | throws TFormerException |
Constructor for Repository Objects.
Calls native allocation methods and either creates a new Repository or opens an existing Repository or a stand-alone FormLayout.
sFilename | the full path of a new or existing Repository | |
bCreateNewRepository | true if a new Repository should be created, false if an existing Repository should be opened | |
bIsReadOnly | true if Repository should be opened as readonly (only when opening an existing Repository) |
TFormerException | if an error occurred |
JobTrayControl addJobTrayControl | ( | String | name | ) | throws TFormerException |
Creates and adds a new JobTrayControl to the Repository.
name | The name of the JobTrayControl. |
TFormerException |
Printer addPrinter | ( | String | sName | ) | throws TFormerException |
Creates and adds the Printer to the Repository.
sName | The name the Printer. |
TFormerException |
Project addProject | ( | String | sName | ) | throws TFormerException |
Creates and adds the Project in the Repository.
sName | The name of the Project. |
TFormerException |
void close | ( | boolean | bCommitChanges | ) | throws TFormerException |
Close this Repository.
Any changes to a stand-alone FormLayout are not written to disk (see Save(), SaveAs() or Repository). This also implies that creating a new and empty stand-alone FormLayout is not supported.
bCommitChanges | If you call this method with commitChanges = false , all changes will be lost (even if AutoSave is enabled)! |
TFormerException |
void dispose | ( | ) | throws TFormerException |
Releases the resources allocated into TFORMer runtime by the instance.
Remember to call always this method after the use of the instance, also in exception case.
The repository will close saving the changes based on the value of isAutoSave()
TFormerException | error occurred into TFORMer runtime. |
void dump | ( | PrintStream | s | ) | throws IOException, TFormerException |
Dump the current instance into the stream.
s | stream in which write the instance dump |
IOException | error in I/O | |
TFormerException | error in TFORMer runtime |
int getBuildNumber | ( | ) | throws TFormerException |
Gets the build number of the Repository.
TFormerException |
String getComment | ( | ) | throws TFormerException |
Gets the comment for the Repository.
TFormerException |
DataSource getDefaultDataSource | ( | ) | throws TFormerException |
JobTrayControl getDefaultJobTrayControl | ( | ) | throws TFormerException |
Gets the default JobTrayControl in the Repository.
TFormerException |
Printer getDefaultPrinter | ( | ) | throws TFormerException |
Gets the Default Printer of the Repository.
TFormerException |
String getDescription | ( | ) | throws TFormerException |
Gets the description of the Repository.
TFormerException |
JobTrayControl getFirstJobTrayControl | ( | ) | throws TFormerException |
Gets the first JobTrayControl in the Repository.
TFormerException |
Printer getFirstPrinter | ( | ) | throws TFormerException |
Gets the first Printer stored in the Repository.
TFormerException |
Project getFirstProject | ( | ) | throws TFormerException |
Gets the first Project stored in the Repository.
null
if it doesn't exist TFormerException |
String getFullPath | ( | ) | throws TFormerException |
Project getGlobalProject | ( | ) | throws TFormerException |
Gets the global Project of the Repository.
TFormerException |
JobTrayControl getJobTrayControl | ( | String | name | ) | throws TFormerException |
Gets a JobTrayControl defined in the Repository.
name | The name of the JobTrayControl. |
null
if the requested object doesn't exist, otherwise a valid instance TFormerException | error occurs in TFORMer runtime |
int getNumberOfJobTrayControls | ( | ) | throws TFormerException |
Gets the number of JobTrayControl-objects stored in the Repository.
TFormerException |
int getNumberofPrinters | ( | ) | throws TFormerException |
Gets the number of printers defined in the Repository.
TFormerException |
int getNumberOfProjects | ( | ) | throws TFormerException |
Gets the number of Project-objects stored in the Repository.
TFormerException |
Printer getPrinter | ( | String | name | ) | throws TFormerException |
Gets the Printer from the Repository.
name | The name of the Printer. |
null
if the requested object doesn't exist, otherwise a valid instance TFormerException | error occurs in TFORMer runtime |
Project getProject | ( | String | name | ) | throws TFormerException |
Gets the Project defined in the Repository.
name | The name of the Project. |
null
if the requested object doesn't exist, otherwise a valid instance TFormerException | error occurs in TFORMer runtime |
int getVersionMajor | ( | ) | throws TFormerException |
Gets the major version number of the Repository.
TFormerException |
int getVersionMinor | ( | ) | throws TFormerException |
Gets the minor version number of the Repository.
TFormerException |
boolean isAutoSave | ( | ) |
Gets a flag indicating whether to save changes to the Repository automatically.
boolean isModified | ( | ) | throws TFormerException |
Gets a flag indicating whether this Repository has been modified.
TFormerException |
boolean isReadOnly | ( | ) | throws TFormerException |
Gets a flag indicating whether this Repository is read-only.
TFormerException |
void removeJobTrayControl | ( | JobTrayControl | jobTrayControl | ) | throws TFormerException |
Removes the JobTrayControl from the Repository.
jobTrayControl | The JobTrayControl instance. |
TFormerException |
void removeJobTrayControl | ( | String | name | ) | throws TFormerException |
Removes the JobTrayControl from the Repository by name.
name | The name of the JobTrayControl. |
TFormerException |
void removePrinter | ( | Printer | printer | ) | throws TFormerException |
Removes the Printer from the Repository.
printer | The Printer. |
TFormerException |
void removePrinter | ( | String | name | ) | throws TFormerException |
Removes the Printer from the Repository by name.
name | The name of the Printer. |
TFormerException |
void removeProject | ( | Project | project | ) | throws TFormerException |
Removes the Project from the Repository.
project | The Project. |
TFormerException |
void removeProject | ( | String | name | ) | throws TFormerException |
Removes the Project from the Repository by name.
name | The name of the Project. |
TFormerException |
void save | ( | ) | throws TFormerException |
Saves this Repository.
For a stand-alone FormLayout this method is not available.
TFormerException |
void saveAs | ( | String | sFilename | ) | throws TFormerException |
Saves a copy of this Repository.
For a stand-alone FormLayout this method is not available.
sFilename | The filename of the Repository. |
TFormerException |
void setAutoSave | ( | boolean | bAutoSave | ) |
Sets a flag indicating whether to save changes to the Repository automatically.
bAutoSave | If true changes to the Repository are saved automatically. |
void setComment | ( | String | sComment | ) | throws TFormerException |
Sets the comment for the Repository.
sComment | The comment for the Repository. |
TFormerException |
void setDescription | ( | String | sDescription | ) | throws TFormerException |
Sets the description of the Repository.
sDescription | The description of the Repository. |
TFormerException |
void setModified | ( | boolean | bModified | ) | throws TFormerException |
Sets a flag indicating whether this Repository has been modified.
bModified | true if this Repository was modified; otherwise, false. |
TFormerException |
String toString | ( | ) |
Returns a string representation of the instance.
© 2006-2009 All rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
Generated on Wed Sep 2 16:01:28 2009 for TFORMer Runtime JAVA Developer Reference with doxygen 1.5.8 |