use of org.pentaho.di.trans.dataservice.serialization.DataServiceValidationException in project pdi-dataservice-server-plugin by pentaho.
the class DataServiceDialogController method saveAndClose.
public void saveAndClose() throws XulException {
try {
if (dataServiceHasNoName(model)) {
return;
}
String existing = dataService != null ? dataService.getName() : null;
delegate.save(delegate.checkConflict(delegate.checkDefined(model.getDataService()), existing));
// Remove edited data service if name changed
if (dataService != null && !model.getServiceName().equals(existing)) {
delegate.removeDataService(dataService);
}
// Ensure the synchronization service is installed
delegate.createSyncService().install(model.getTransMeta());
close();
} catch (DataServiceValidationException e) {
error(getString(PKG, "DataServiceDialog.SaveError.Title"), e.getMessage());
} catch (Exception e) {
error(getString(PKG, "DataServiceDialog.SaveError.Title"), e.getMessage());
getLogChannel().logError(e.getMessage(), e);
}
}
Aggregations