Project Class Reference

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

List of all members.

Public Member Functions

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


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 .



Project-objects are used in a Repository. The GlobalProject is available for repositories as well as for stand-alone form-layouts:


Type Description

RepositoryA Project is used by the user to divide a Repository into logical units. Each Project holds a set of DataField-objects. Data-fields defined within a Project are usable exclusively by form-layouts which are member of this Project. Beside the user-defined Project-objects a Repository contains one Repository.GlobalProject by default. This Repository.GlobalProject is only used for defining system-wide data-fields, it can not store a reference to a FormLayout.
Stand-Alone FormLayout A stand-alone FormLayout can be imagined like a very simple type of Repository. This simplified Repository contains exactly one Repository.GlobalProject which stores the DataField-definitions and the FormLayout itself. User-defined Project-objects are not supported by a stand-alone FormLayout.






In order to access the data-fields in a Project you may either use the method GetDataField or you may iterate through all available data-fields using FirstDataField and DataField. DataField.Next (please check out the respective examples).
If you want to know, whether the returned DataField is actually used in a FormLayout you can use the method FormLayout.getDataFieldUsage.



Important: 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.



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.

Returns:
DataField object for the created DataField
Parameters:
sName The name of the DataField to be added to the Project.
Exceptions:
TFormerException if an error occurs and the datafield cannot be created

DataSource addDataSource ( DataSourceType  type,
String  name 
) throws TFormerException

Creates and adds a DataSource to the Project.

Returns:
DataSource object of the created DataSource
Parameters:
name The name of the DataSource to be added to the Project.
type The type of the DataSource.
Exceptions:
TFormerException 

FormLayout addFormLayout ( String  sName  )  throws TFormerException

Creates and adds a FormLayout to the Project.

Returns:
FormLayout object for the created Form
Parameters:
sName The name of the FormLayout to be added to the Project.
Exceptions:
TFormerException 

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.

void dump ( PrintStream  s  )  throws IOException, TFormerException

Dumps the current instance into a text stream.

Parameters:
s instance of the stream
Exceptions:
IOException error in I/O
TFormerException error occurred into TFORMer runtime.

String getComment (  )  throws TFormerException

Gets the comment for the Project.

Returns:
The comment for the Project.
Exceptions:
TFormerException if an error occurs

DataField getDataField ( String  name  )  throws TFormerException

Gets the DataField information from the Project.

Parameters:
name The name of the DataField to be retrieved from the Project.
Returns:
null if the requested object doesn't exist, otherwise a valid instance
Exceptions:
TFormerException error occurs in TFORMer runtime

DataSource getDataSource ( String  name  )  throws TFormerException

Gets the DataSource information from the Project.

Parameters:
name The name of the DataSource to be retrieved from the Project.
Returns:
null if the requested object doesn't exist, otherwise a valid instance
Exceptions:
TFormerException if an error occurs or the specified DataSource does not exist

String getDefaultDirectory (  )  throws TFormerException

Gets the default directory of the Project.

Returns:
The default directory of the Project.
Exceptions:
TFormerException if an error occurs

String getDescription (  )  throws TFormerException

Gets the description of the Project.

Returns:
The description of the Project.
Exceptions:
TFormerException if an error occurs

DataField getFirstDataField (  )  throws TFormerException

Gets the first DataField of the Project and returns a DataField object.

Returns:
DataField object for the first DataField
Exceptions:
TFormerException 

DataSource getFirstDataSource (  )  throws TFormerException

Gets the first DataSource defined in the Project.

Returns:
The first DataSource defined in the Project.
Exceptions:
TFormerException if an error occurs

FormLayout getFirstFormLayout (  )  throws TFormerException

Gets the first FormLayout of the Project and returns a FormLayout object.

Returns:
FormLayout object for the first FormLayout, null if not exists
Exceptions:
TFormerException 

FormLayout getFormLayout ( String  sName  )  throws TFormerException

Gets the FormLayout information from the Project.

Parameters:
sName The name of the FormLayout to be retrieved from the Project.
Returns:
null if the requested object doesn't exist, otherwise a valid instance
Exceptions:
TFormerException error occurs in TFORMer runtime

String getName (  )  throws TFormerException

Gets the name of the Project.

Returns:
The name of the Project.
Exceptions:
TFormerException if an error occurs

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 FirstProject.

The property is null if there are no further objects available.

Returns:
The next Project object in the list or null.
Exceptions:
TFormerException if an error occurs

int getNumberOfDataFields (  )  throws TFormerException

Gets the number of DataFields of the calling Project.

Returns:
the number of DataFields of the calling Project
Exceptions:
TFormerException 

int getNumberOfDataSources (  )  throws TFormerException

Gets the number of DataSources of the calling Project.

Returns:
the number of DataSources of the calling Project
Exceptions:
TFormerException 

int getNumberOfFormLayouts (  )  throws TFormerException

Gets the number of Forms of the calling Project.

Returns:
the number of Forms of the calling Project
Exceptions:
TFormerException 

void removeDataField ( String  name  )  throws TFormerException

Removes a DataField from the Project by name.

Parameters:
name Name of the datafield
Exceptions:
TFormerException 

void removeDataField ( DataField  field  )  throws TFormerException

Removes a DataField from the Project.

Parameters:
field DataField to be removed
Exceptions:
TFormerException 

void removeDataSource ( String  name  )  throws TFormerException

Removes the DataSource from the Project by name.

Parameters:
name The name of the DataSource to be removed from the Project.
Exceptions:
TFormerException 

void removeDataSource ( DataSource  dataSource  )  throws TFormerException

Removes the DataSource from the Project.

Parameters:
dataSource The DataSource to be removed from the Project.
Exceptions:
TFormerException 

void removeFormLayout ( String  name  )  throws TFormerException

Removes a Form from the Project by name.

Parameters:
name of the Form to be removed
Exceptions:
TFormerException 

void removeFormLayout ( FormLayout  form  )  throws TFormerException

Removes a Form from the Project.

Parameters:
form FormLayout to be removed
Exceptions:
TFormerException 

void setComment ( String  sComment  )  throws TFormerException

Sets the comment for the Project.

Parameters:
sComment The comment for the Project. if an error occurs
Exceptions:
TFormerException 

void setDescription ( String  sDescription  )  throws TFormerException

Sets the description of the Project.

Parameters:
sDescription The description of the Project.
Exceptions:
TFormerException if an error occurs

void setName ( String  sName  )  throws TFormerException

Sets or sets the name of the Project.

Parameters:
sName The name of the Project.
Exceptions:
TFormerException if an error occurs

String toString (  ) 

Returns a string representation of the instance.

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