TFORMer SDK - JAVA  7.0
Public Member Functions
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 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.
DataSource getFirstDataSource () throws TFormerException
 Gets the first DataSource defined in the Project.
FormLayout getFirstFormLayout () throws TFormerException
 Gets the first FormLayout of the Project.
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 defined in the Project.
int getNumberOfDataSources () throws TFormerException
 Gets the number of DataSources defined in the Project.
int getNumberOfFormLayouts () throws TFormerException
 Gets the number of FormLayouts defined in this Project.
Repository getRepository ()
 Return the repository in which the project is defined.
void removeDataField (DataField field) throws TFormerException
 Removes a DataField from the Project.
void removeDataField (String name) throws TFormerException
 Removes a DataField from the Project.
void removeDataSource (DataSource dataSource) throws TFormerException
 Removes the DataSource from the Project.
void removeDataSource (String name) throws TFormerException
 Removes the DataSource from the Project.
void removeFormLayout (FormLayout form) throws TFormerException
 Removes a FormLayout from the Project.
void removeFormLayout (String name) throws TFormerException
 Removes a FormLayout 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 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.

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

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

Gets the first DataField of the Project.

Returns:
DataField object for the first DataField
See also:
DataField

Gets the first DataSource defined in the Project.

Returns:
The first DataSource defined in the Project
See also:
DataSource

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

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

Gets the number of DataFields defined in the Project.

Returns:
The number of DataFields defined in the Project
See also:
DataField

Gets the number of DataSources defined in the Project.

Returns:
The number of DataSources defined in the Project
See also:
DataSource

Gets the number of FormLayouts defined in this Project.

Returns:
The number of FormLayouts defined in this Project
See also:
FormLayout

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

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