TFORMer SDK - JAVA
7.0
|
Opens or creates a Repository, opens a stand-alone FormLayout. More...
Public Member Functions | |
Repository (String sFilename, boolean bCreateNewRepository, boolean bIsReadOnly) throws TFormerException | |
Constructor for Repository objects. | |
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 by the instance. | |
void | dump (PrintStream s) throws IOException, TFormerException |
Dump the current instance into the stream. | |
void | finalize () |
Releases unmanaged resources and performs other cleanup operations before the Repository is reclaimed by garbage collection. | |
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 full pathname 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/Sets 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 (String name) throws TFormerException |
Removes the JobTrayControl from the Repository. | |
void | removeJobTrayControl (JobTrayControl jobTrayControl) throws TFormerException |
Removes the JobTrayControl from the Repository. | |
void | removePrinter (String name) throws TFormerException |
Removes the Printer from the Repository. | |
void | removePrinter (Printer printer) throws TFormerException |
Removes the Printer from the Repository. | |
void | removeProject (String name) throws TFormerException |
Removes the Project from the Repository. | |
void | removeProject (Project project) throws TFormerException |
Removes the Project from the Repository. | |
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. |
Opens or creates a Repository, opens a stand-alone FormLayout.
*.tfr
) and a subfolder structure on the file system. It references an arbitrary number of user-defined Project objects. These user-defined Projects are used to divide a Repository into logical areas. Each Project is a container which holds DataField definitions, DataSource definitions and references an arbitrary number of FormLayout objects.The so-called GlobalProject is allocated by default and is exclusively used to define DataFields which are available for all FormLayouts regardless of their actual Project membership.// Create a new Repository instance using a stand-alone FormLayout (extension *.tff) // Examples are usually installed in // - Windows Vista or later: C:/Program Data/TEC-IT/TFORMer/7.0/Examples // - Older Microsoft Windows versions: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/7.0/Examples Repository repository = new Repository("C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/7.0/Examples/Command Line/ODBCReportPDF/ODBCReportPDF.tff", false, true);
To open a Repository do the following:
// Create a new Repository instance using a Repository (extension *.tfr) // Examples are usually installed in // - Windows Vista: C:/Program Data/TEC-IT/TFORMer/7.0/Examples // - Older Microsoft Windows versions: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/7.0/Examples Repository repository = new Repository("C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/7.0/Examples/Demo Repository/Demos.tfr", false, true);
*.tfr
) to disk. A stand-alone FormLayout cannot be created, saved or permanently modified on disk via this class.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 (see also Passing Files) |
bCreateNewRepository | true if a new Repository should be created, false if an existing Repository should be opened |
bIsReadOnly | true if Repository should be opened read-only (only when opening an existing Repository) |
JobTrayControl addJobTrayControl | ( | String | name | ) | throws TFormerException |
Creates and adds a new JobTrayControl to the Repository.
For a stand-alone FormLayout this method is not available
name | The name of the JobTrayControl |
Printer addPrinter | ( | String | sName | ) | throws TFormerException |
Creates and adds the Printer to the Repository.
sName | The name of the Printer |
Project addProject | ( | String | sName | ) | throws TFormerException |
Creates and adds the Project in the Repository.
For a stand-alone FormLayout this method is not available. A stand-alone FormLayout contains only a GlobalProject which can't be retrieved by name.
sName | The name of the Project |
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). Thus you can't create new stand-alone FormLayouts.
bCommitChanges | If you call this method with commitChanges = false , all changes will be lost (even if isAutoSave() is enabled)! |
void dispose | ( | ) | throws TFormerException |
Releases the resources allocated by the instance.
Call this method in every case (even in case of exceptions) is this instance is not required anymore. The Repository will be closed, changes are saved if isAutoSave() is true
.
void dump | ( | PrintStream | s | ) | throws IOException, TFormerException |
Dump the current instance into the stream.
s | Instance of the stream |
void finalize | ( | ) |
Releases unmanaged resources and performs other cleanup operations before the Repository is reclaimed by garbage collection.
int getBuildNumber | ( | ) | throws TFormerException |
Gets the build number of the Repository.
String getComment | ( | ) | throws TFormerException |
Gets the comment for the Repository.
For a stand-alone FormLayout this property is not available
DataSource getDefaultDataSource | ( | ) | throws TFormerException |
Gets the default JobTrayControl in the Repository.
Printer getDefaultPrinter | ( | ) | throws TFormerException |
Gets the default Printer of the Repository.
For a stand-alone FormLayout this property is not available
String getDescription | ( | ) | throws TFormerException |
Gets the description of the Repository.
For a stand-alone FormLayout this property is always empty
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.
For a stand-alone FormLayout always null
is returned. Use getGlobalProject() instead.
null
if it doesn't existString getFullPath | ( | ) | throws TFormerException |
Gets the full pathname 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.
name | The name of the JobTrayControl |
null
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.
The GlobalProject is not counted, so the number of Project-objects is always 0 for stand-alone FormLayouts.
Printer getPrinter | ( | String | name | ) | throws TFormerException |
Gets the Printer from the Repository.
name | The name of the Printer |
null
Project getProject | ( | String | name | ) | throws TFormerException |
Gets the Project defined in the Repository.
For a stand-alone FormLayout this method is not available. A stand-alone FormLayout contains only a GlobalProject which can't be retrieved by name.
name | The name of the Project |
null
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.
If AutoSave is set to true
all changes will be saved even when this instance is disposed without calling Close(). If you call Close() directly with commitChanges = false
all changes will be lost!
The state of the AutoSave property is not stored on the hard disk. AutoSave is always true
after creating or opening a Repository with read/write access.
true
changes to the Repository will be saved automatically boolean isModified | ( | ) | throws TFormerException |
Gets/Sets a flag indicating whether this Repository has been modified.
true
if this Repository was modified boolean isReadOnly | ( | ) | throws TFormerException |
Gets a flag indicating whether this Repository is read-only.
Read-only means that the Repository can be changed in memory but changes won't be written to disk.
true
if this instance is read-only void removeJobTrayControl | ( | String | name | ) | throws TFormerException |
Removes the JobTrayControl from the Repository.
For a stand-alone FormLayout this method is not available
name | The name of the JobTrayControl |
void removeJobTrayControl | ( | JobTrayControl | jobTrayControl | ) | throws TFormerException |
Removes the JobTrayControl from the Repository.
For a stand-alone FormLayout this method is not available
jobTrayControl | The JobTrayControl instance |
void removePrinter | ( | String | name | ) | throws TFormerException |
Removes the Printer from the Repository.
name | The name of the Printer |
void removePrinter | ( | Printer | printer | ) | throws TFormerException |
Removes the Printer from the Repository.
printer | The Printer |
void removeProject | ( | String | name | ) | throws TFormerException |
void removeProject | ( | Project | project | ) | throws TFormerException |
void save | ( | ) | throws TFormerException |
Saves this Repository.
For a stand-alone FormLayout this method is not available.
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 |
void setAutoSave | ( | boolean | bAutoSave | ) |
Sets a flag indicating whether to save changes to the Repository automatically.
If AutoSave is set to true
all changes will be saved even when this instance is disposed without calling Close(). If you call Close() directly with commitChanges = false
all changes will be lost!
The state of the AutoSave property is not stored on the hard disk. AutoSave is always true
after creating or opening a Repository with read/write access.
bAutoSave | If true changes to the Repository will be saved automatically |
void setComment | ( | String | sComment | ) | throws TFormerException |
Sets the comment for the Repository.
sComment | The comment for the Repository |
void setDescription | ( | String | sDescription | ) | throws TFormerException |
Sets the description of the Repository.
sDescription | The description of the Repository |
void setModified | ( | boolean | bModified | ) | throws TFormerException |
Sets a flag indicating whether this Repository has been modified.
bModified | Set to true if this Repository was modified |
String toString | ( | ) |
Returns a string representation of the instance.
© 2006-2012 - all rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
Generated on Tue Oct 23 2012 16:33:20 for TFORMer SDK - JAVA with doxygen 1.8.0 |