TdkDatabaseDlgController Class Reference

Defines the TdkDatabaseDlgController class. This class defines the connect database dialog controller. More...

#include <TdkDatabaseDlgController.h>

Inheritance diagram for TdkDatabaseDlgController:

TdkDlgController TdkObserver TdkSubject List of all members.

Behavioral Methods

Methods related connect database dialog behavior.

virtual void setInitialState ()
 Sets the initial state of the dialog.
virtual void update (TdkSubject *changedObject)
 This method is called when the user interacts with the dialog.
virtual bool getDbList (const std::string &dbType, const std::string &host, const std::string &user, const std::string &password)
 Method updates the list of terralib databases avaliable on selected DBMS.
virtual std::string dlgName ()
 Retrieves dialog's definiton name.
virtual void setApplication (TdkApplication *app)
 Sets TdkApplication pointer.
virtual int getActionId (const string &action)
 Retrieves the action generated by user. Given a action name retrives the correspondent int value.
static bool isConnectOperation ()
 Method used by sinalize connect database operation.
virtual TdkConDescriptorgetDbDescriptor () throw (TdkException)
 Retrieves the connection descriptor, based on dialogs attributes.
virtual void directoryClicked ()
 Action called on directory button clicked.
virtual void dbmsChanged (const std::string &dbms)
 Action called on dbms element list changed.
virtual void setConnectionMode (const std::string &dbType)
 Changes the dialog to connect state. Enables fields based on dbType parameter.
virtual void setCreationMode (const std::string &dbType)
 Changes the dialog to create state. Enables fields based on dbType parameter.
virtual void setDBMS_Mode (const std::string &dbType)
 Changes the dialog state to a specific database driver. Enables fields based on dbType parameter.
virtual TdkConDescriptorcreateDbDescriptor (const std::string &dbType, const std::string &dbName, const std::string &host, const std::string &user, const std::string &pword)
 Retrieves the TdkConDescriptor based on dialog parameters.
virtual void okClicked ()
 Action called on ok button clicked.

Public Member Functions

Constructor and Destructor Methods
Methods related to instantiation and destruction.

 TdkDatabaseDlgController (TdkDatabaseDlg *dlg)
 Constructor.
virtual ~TdkDatabaseDlgController ()
 Virtual destructor.

Private Attributes

TdkApplication_app
 Pointer to TdkApplication.

Static Private Attributes

static bool _isConnectOp = true
 Flag that sinalizes a connection operation.

Detailed Description

Defines the TdkDatabaseDlgController class. This class defines the connect database dialog controller.

TODO: 1)

See also:
TdkDlgController


Constructor & Destructor Documentation

TdkDatabaseDlgController::TdkDatabaseDlgController ( TdkDatabaseDlg dlg  ) 

Constructor.

Parameters:
dlg Pointer to connect database dialog.

TdkDatabaseDlgController::~TdkDatabaseDlgController (  )  [virtual]

Virtual destructor.


Member Function Documentation

void TdkDatabaseDlgController::setInitialState (  )  [virtual]

Sets the initial state of the dialog.

Implements TdkDlgController.

void TdkDatabaseDlgController::update ( TdkSubject changedObject  )  [virtual]

This method is called when the user interacts with the dialog.

Parameters:
changedObject Object that signals a change.

Implements TdkObserver.

bool TdkDatabaseDlgController::getDbList ( const std::string &  dbType,
const std::string &  host,
const std::string &  user,
const std::string &  password 
) [virtual]

Method updates the list of terralib databases avaliable on selected DBMS.

Parameters:
dbType Database driver type.
host Host name.
user User name.
password User password.

std::string TdkDatabaseDlgController::dlgName (  )  [virtual]

Retrieves dialog's definiton name.

Returns:
Returns the definition TDK_DATABASE_DLG_NAME

Implements TdkDlgController.

bool TdkDatabaseDlgController::isConnectOperation (  )  [static]

Method used by sinalize connect database operation.

Returns:
True if the operation is a connect operation, false otherwise.

void TdkDatabaseDlgController::setApplication ( TdkApplication app  )  [virtual]

Sets TdkApplication pointer.

Parameters:
app Pointer to TdkApplication.

int TdkDatabaseDlgController::getActionId ( const string &  action  )  [virtual]

Retrieves the action generated by user. Given a action name retrives the correspondent int value.

Returns:
Returns action correspondent int value.

Reimplemented from TdkDlgController.

TdkConDescriptor * TdkDatabaseDlgController::getDbDescriptor (  )  throw (TdkException) [protected, virtual]

Retrieves the connection descriptor, based on dialogs attributes.

Returns:
Returns TdkConDescriptor correspondent to dialog parameters.

void TdkDatabaseDlgController::directoryClicked (  )  [protected, virtual]

Action called on directory button clicked.

void TdkDatabaseDlgController::dbmsChanged ( const std::string &  dbms  )  [protected, virtual]

Action called on dbms element list changed.

Parameters:
dbms Name of dbms used.

void TdkDatabaseDlgController::setConnectionMode ( const std::string &  dbType  )  [protected, virtual]

Changes the dialog to connect state. Enables fields based on dbType parameter.

Parameters:
dbType Name of dbms used.

void TdkDatabaseDlgController::setCreationMode ( const std::string &  dbType  )  [protected, virtual]

Changes the dialog to create state. Enables fields based on dbType parameter.

Parameters:
dbType Name of dbms used.

void TdkDatabaseDlgController::setDBMS_Mode ( const std::string &  dbType  )  [protected, virtual]

Changes the dialog state to a specific database driver. Enables fields based on dbType parameter.

Parameters:
dbType Name of dbms used.

TdkConDescriptor * TdkDatabaseDlgController::createDbDescriptor ( const std::string &  dbType,
const std::string &  dbName,
const std::string &  host,
const std::string &  user,
const std::string &  pword 
) [protected, virtual]

Retrieves the TdkConDescriptor based on dialog parameters.

Parameters:
dbType Name of dbms used.
dbName Terralib database name.
host Host name.
user User name.
pword User password.

void TdkDatabaseDlgController::okClicked (  )  [protected, virtual]

Action called on ok button clicked.


Member Data Documentation

TdkApplication* TdkDatabaseDlgController::_app [private]

Pointer to TdkApplication.

bool TdkDatabaseDlgController::_isConnectOp = true [static, private]

Flag that sinalizes a connection operation.


The documentation for this class was generated from the following files:
Generated on Fri Jun 15 16:54:34 2007 for TDK by  doxygen 1.5.2