org.pentaho.platform.dataaccess.datasource.wizard.models
Class DatasourceModel
java.lang.Object
org.pentaho.ui.xul.XulEventSourceAdapter
org.pentaho.platform.dataaccess.datasource.wizard.models.DatasourceModel
- All Implemented Interfaces:
- IModelInfoValidationListener, IRelationalModelValidationListener, IWizardModel, org.pentaho.ui.xul.XulEventSource
public class DatasourceModel
- extends org.pentaho.ui.xul.XulEventSourceAdapter
- implements IWizardModel, IRelationalModelValidationListener, IModelInfoValidationListener
Methods inherited from class org.pentaho.ui.xul.XulEventSourceAdapter |
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
DatasourceModel
public DatasourceModel()
getGuiStateModel
public GuiStateModel getGuiStateModel()
setGuiStateModel
public void setGuiStateModel(GuiStateModel guiStateModel)
getDatasourceName
public String getDatasourceName()
setDatasourceName
public void setDatasourceName(String datasourceName)
getSelectedRelationalConnection
public IConnection getSelectedRelationalConnection()
setSelectedRelationalConnection
public void setSelectedRelationalConnection(IConnection value)
getQuery
public String getQuery()
setQuery
public void setQuery(String value)
getDomain
public org.pentaho.metadata.model.Domain getDomain()
setDomain
public void setDomain(org.pentaho.metadata.model.Domain domain)
getModelInfo
public ModelInfo getModelInfo()
setModelInfo
public void setModelInfo(ModelInfo modelInfo)
isValidated
public boolean isValidated()
- Specified by:
isValidated
in interface IWizardModel
getDatasourceType
public DatasourceType getDatasourceType()
setDatasourceType
public void setDatasourceType(DatasourceType datasourceType)
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(org.pentaho.metadata.model.Domain oldDomain,
org.pentaho.metadata.model.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