org.pentaho.platform.dataaccess.datasource.wizard.models
Class DatasourceModel

java.lang.Object
  extended by XulEventSourceAdapter
      extended by org.pentaho.platform.dataaccess.datasource.wizard.models.DatasourceModel
All Implemented Interfaces:
IModelInfoValidationListener, IRelationalModelValidationListener, IWizardModel

public class DatasourceModel
extends XulEventSourceAdapter
implements IWizardModel, IRelationalModelValidationListener, IModelInfoValidationListener


Constructor Summary
DatasourceModel()
           
 
Method Summary
 void clearModel()
           
 void copyOverMetadata(Domain oldDomain, Domain newDomain)
          This is a utility method that looks into an old domain for the same column ids, and then copies over the old metadata into the new.
 String generateTableName()
          Strips all non-alphanumeric characters from the datasourceName, replaces spaces with underscores, and finally lowercases the string for return making it valid for use as a table name
 String getDatasourceName()
          
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatasourceModel

public DatasourceModel()
Method Detail

getGuiStateModel


setGuiStateModel


getDatasourceName


setDatasourceName


getSelectedRelationalConnection


setSelectedRelationalConnection


getQuery


setQuery


getDomain

public Domain getDomain()

setDomain

public void setDomain(Domain domain)

getModelInfo


setModelInfo


isValidated

Specified by:
isValidated in interface IWizardModel

getDatasourceType


setDatasourceType


validate

public void validate()

clearModel

public void clearModel()
Specified by:
clearModel in interface IWizardModel

onRelationalModelInValid

public void onRelationalModelInValid()
Description copied from interface: IRelationalModelValidationListener
Fired when the the model is valid

Specified by:
onRelationalModelInValid in interface IRelationalModelValidationListener

onRelationalModelValid

public void onRelationalModelValid()
Description copied from interface: IRelationalModelValidationListener
Fired when the the model is valid

Specified by:
onRelationalModelValid in interface IRelationalModelValidationListener

onCsvModelInValid

public void onCsvModelInValid()

onCsvModelValid

public void onCsvModelValid()

copyOverMetadata

public void copyOverMetadata(Domain oldDomain,
                             Domain newDomain)
This is a utility method that looks into an old domain for the same column ids, and then copies over the old metadata into the new.

Parameters:
oldDomain -
newDomain -

onModelInfoInvalid

public void onModelInfoInvalid()
Specified by:
onModelInfoInvalid in interface IModelInfoValidationListener

onModelInfoValid

public void onModelInfoValid()
Specified by:
onModelInfoValid in interface IModelInfoValidationListener

generateTableName

public String generateTableName()
Strips all non-alphanumeric characters from the datasourceName, replaces spaces with underscores, and finally lowercases the string for return making it valid for use as a table name

Returns:

onCsvInValid

public void onCsvInValid()
Specified by:
onCsvInValid in interface IModelInfoValidationListener

onCsvValid

public void onCsvValid()
Specified by:
onCsvValid in interface IModelInfoValidationListener