TFORMer SDK - JAVA  7.5
Public Member Functions | List of all members
Project Class Reference

Provides access to Project information of a Repository or a stand-alone link FormLayout. More...

Public Member Functions

DataField addDataField (String sName) throws TFormerException
 Creates and adds a DataField to the Project. More...
 
DataSource addDataSource (DataSourceType type, String name) throws TFormerException
 Creates and adds a DataSource to the Project. More...
 
FormLayout addFormLayout (String sName) throws TFormerException
 Creates and adds a FormLayout to the Project. More...
 
void dispose () throws TFormerException
 Releases the resources allocated by this instance. More...
 
void dump (PrintStream s) throws IOException, TFormerException
 Dumps the current instance into a text stream. More...
 
String getComment () throws TFormerException
 Gets the comment for the Project. More...
 
DataField getDataField (String name) throws TFormerException
 Gets the DataField information from the Project. More...
 
DataSource getDataSource (String name) throws TFormerException
 Gets the DataSource information from the Project. More...
 
String getDefaultDirectory () throws TFormerException
 Gets the default directory of the Project. More...
 
String getDescription () throws TFormerException
 Gets the description of the Project. More...
 
DataField getFirstDataField () throws TFormerException
 Gets the first DataField of the Project. More...
 
DataSource getFirstDataSource () throws TFormerException
 Gets the first DataSource defined in the Project. More...
 
FormLayout getFirstFormLayout () throws TFormerException
 Gets the first FormLayout of the Project. More...
 
FormLayout getFormLayout (String sName) throws TFormerException
 Gets the FormLayout information from the Project. More...
 
String getName () throws TFormerException
 Gets the name of the Project. More...
 
Project getNext () throws TFormerException
 Gets the next Project defined in the Repository. More...
 
int getNumberOfDataFields () throws TFormerException
 Gets the number of DataFields defined in the Project. More...
 
int getNumberOfDataSources () throws TFormerException
 Gets the number of DataSources defined in the Project. More...
 
int getNumberOfFormLayouts () throws TFormerException
 Gets the number of FormLayouts defined in this Project. More...
 
Repository getRepository ()
 Return the repository in which the project is defined. More...
 
void removeDataField (DataField field) throws TFormerException
 Removes a DataField from the Project. More...
 
void removeDataField (String name) throws TFormerException
 Removes a DataField from the Project. More...
 
void removeDataSource (DataSource dataSource) throws TFormerException
 Removes the DataSource from the Project. More...
 
void removeDataSource (String name) throws TFormerException
 Removes the DataSource from the Project. More...
 
void removeFormLayout (FormLayout form) throws TFormerException
 Removes a FormLayout from the Project. More...
 
void removeFormLayout (String name) throws TFormerException
 Removes a FormLayout from the Project. More...
 
void setComment (String sComment) throws TFormerException
 Sets the comment for the Project. More...
 
void setDescription (String sDescription) throws TFormerException
 Sets the description of the Project. More...
 
void setName (String sName) throws TFormerException
 Sets the name of the Project. More...
 
String toString ()
 Returns a string representation of the instance. More...
 

Detailed Description

Provides access to Project information of a Repository or a stand-alone link FormLayout.

This class is used to retrieve or set information belonging to a user-defined Project or to the GlobalProject.

Overview

A Project is a logical container for related FormLayout, DataSource and DataField definitions. It divides a Repository into logical units.

Exactly one GlobalProject is available for both a Repository or a stand-alone FormLayout. In the case of a Repository additional Project objects can be created by the user.

In order to access the DataFields in a Project you may either use the method Project.getDataField or you may iterate through all available DataFields using Project.getFirstDataField and DataField.getNext. If you want to know, whether the returned DataField is actually used in a FormLayout you can use the method FormLayout.getDataFieldUsage.

Example

To retrieve all Project objects within a Repository do the following:

// Retrieve the first Project
Project project = repository.getFirstProject ();
while (project != null)
{
System.out.println (project.toString());
// Get the next Project
project = project.getNext ();
}
Attention
The Project is only valid as long as it is available in the Repository. If it is removed from the Repository all instances of the Project immediately become invalid.

More Information

GlobalProject

Note
Thread-safety: A single instance of this class must not be used by different threads.

Member Function Documentation

DataField addDataField ( String  sName) throws TFormerException

Creates and adds a DataField to the Project.

Parameters
sNameThe name of the DataField to be added to the Project.
Returns
DataField object
See also
DataField
DataSource addDataSource ( DataSourceType  type,
String  name 
) throws TFormerException

Creates and adds a DataSource to the Project.

Returns
DataSource object
Parameters
typeThe type of the DataSource
nameThe name of the DataSource to be added to the Project
See also
DataSource
FormLayout addFormLayout ( String  sName) throws TFormerException

Creates and adds a FormLayout to the Project.

Returns
FormLayout object
Parameters
sNameThe name of the FormLayout to be added to the Project
See also
FormLayout
void dispose ( ) throws TFormerException

Releases the resources allocated by this instance.

Call this method in every case (even in case of exceptions) is this instance is not required anymore.

void dump ( PrintStream  s) throws IOException, TFormerException

Dumps the current instance into a text stream.

Parameters
sInstance of the stream
String getComment ( ) throws TFormerException

Gets the comment for the Project.

Returns
The comment for the Project
DataField getDataField ( String  name) throws TFormerException

Gets the DataField information from the Project.

Parameters
nameThe name of the DataField to be retrieved from the Project
Returns
A valid object instance or null
See also
DataField
DataSource getDataSource ( String  name) throws TFormerException

Gets the DataSource information from the Project.

Parameters
nameThe name of the DataSource to be retrieved from the Project
Returns
A valid object instance or null
See also
DataSource
String getDefaultDirectory ( ) throws TFormerException

Gets the default directory of the Project.

Returns
The default directory of the Project
String getDescription ( ) throws TFormerException

Gets the description of the Project.

Returns
The description of the Project
DataField getFirstDataField ( ) throws TFormerException

Gets the first DataField of the Project.

Returns
DataField object for the first DataField
See also
DataField
DataSource getFirstDataSource ( ) throws TFormerException

Gets the first DataSource defined in the Project.

Returns
The first DataSource defined in the Project
See also
DataSource
FormLayout getFirstFormLayout ( ) throws TFormerException

Gets the first FormLayout of the Project.

Returns
FormLayout object for the first FormLayout, null if no FormLayout exists
See also
FormLayout
FormLayout getFormLayout ( String  sName) throws TFormerException

Gets the FormLayout information from the Project.

Parameters
sNameThe name of the FormLayout to be retrieved from the Project
Returns
A valid object instance or null
See also
FormLayout
String getName ( ) throws TFormerException

Gets the name of the Project.

Returns
The name of the Project
Project getNext ( ) throws TFormerException

Gets the next Project defined in the Repository.

A Repository stores a list of Project objects. You can use this method to iterate through the list. To retrieve the first Project in the Repository see Repository.getFirstProject.

Returns
The next Project object in the list or null
int getNumberOfDataFields ( ) throws TFormerException

Gets the number of DataFields defined in the Project.

Returns
The number of DataFields defined in the Project
See also
DataField
int getNumberOfDataSources ( ) throws TFormerException

Gets the number of DataSources defined in the Project.

Returns
The number of DataSources defined in the Project
See also
DataSource
int getNumberOfFormLayouts ( ) throws TFormerException

Gets the number of FormLayouts defined in this Project.

Returns
The number of FormLayouts defined in this Project
See also
FormLayout
Repository getRepository ( )

Return the repository in which the project is defined.

Returns
The containing Repository
void removeDataField ( DataField  field) throws TFormerException

Removes a DataField from the Project.

Parameters
fieldDataField to be removed
See also
DataField
void removeDataField ( String  name) throws TFormerException

Removes a DataField from the Project.

Parameters
nameName of the DataField
See also
DataField
void removeDataSource ( DataSource  dataSource) throws TFormerException

Removes the DataSource from the Project.

Parameters
dataSourceThe DataSource to be removed from the Project
See also
DataSource
void removeDataSource ( String  name) throws TFormerException

Removes the DataSource from the Project.

Parameters
nameThe name of the DataSource to be removed from the Project
See also
DataSource
void removeFormLayout ( FormLayout  form) throws TFormerException

Removes a FormLayout from the Project.

Parameters
formFormLayout to be removed
See also
FormLayout
void removeFormLayout ( String  name) throws TFormerException

Removes a FormLayout from the Project.

Parameters
nameName of the FormLayout to be removed
See also
FormLayout
void setComment ( String  sComment) throws TFormerException

Sets the comment for the Project.

Parameters
sCommentThe comment for the Project. if an error occurs
void setDescription ( String  sDescription) throws TFormerException

Sets the description of the Project.

Parameters
sDescriptionThe description of the Project
void setName ( String  sName) throws TFormerException

Sets the name of the Project.

Parameters
sNameThe name of the Project
String toString ( )

Returns a string representation of the instance.

Returns
A string representation of the instance

© 2006-2017 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Fri Nov 3 2017 07:59:14 for TFORMer SDK - JAVA with doxygen 1.8.9.1