Search in sources :

Example 1 with LegacyDatasourceConverter

use of org.pentaho.platform.dataaccess.datasource.wizard.service.impl.utils.LegacyDatasourceConverter in project data-access by pentaho.

the class MultitableDatasourceService method deSerializeModelState.

public MultiTableDatasourceDTO deSerializeModelState(String dtoStr) throws DatasourceServiceException {
    try {
        XStream xs = new XStream();
        xs.registerConverter(new LegacyDatasourceConverter());
        return (MultiTableDatasourceDTO) xs.fromXML(dtoStr);
    } catch (Exception e) {
        logger.error(e);
        throw new DatasourceServiceException(e);
    }
}
Also used : XStream(com.thoughtworks.xstream.XStream) DatasourceServiceException(org.pentaho.platform.dataaccess.datasource.wizard.service.DatasourceServiceException) KettleDatabaseException(org.pentaho.di.core.exception.KettleDatabaseException) ConnectionServiceException(org.pentaho.platform.dataaccess.datasource.wizard.service.ConnectionServiceException) LegacyDatasourceConverter(org.pentaho.platform.dataaccess.datasource.wizard.service.impl.utils.LegacyDatasourceConverter) DatasourceServiceException(org.pentaho.platform.dataaccess.datasource.wizard.service.DatasourceServiceException)

Aggregations

XStream (com.thoughtworks.xstream.XStream)1 KettleDatabaseException (org.pentaho.di.core.exception.KettleDatabaseException)1 ConnectionServiceException (org.pentaho.platform.dataaccess.datasource.wizard.service.ConnectionServiceException)1 DatasourceServiceException (org.pentaho.platform.dataaccess.datasource.wizard.service.DatasourceServiceException)1 LegacyDatasourceConverter (org.pentaho.platform.dataaccess.datasource.wizard.service.impl.utils.LegacyDatasourceConverter)1