use of org.pentaho.di.ui.cluster.dialog.SlaveServerDialog in project pentaho-kettle by pentaho.
the class RepositoryExplorerDialog method newSlaveServer.
public void newSlaveServer() {
try {
SlaveServer slaveServer = new SlaveServer();
SlaveServerDialog dd = new SlaveServerDialog(shell, slaveServer, rep.getSlaveServers());
if (dd.open()) {
// See if this slave server already exists...
ObjectId idSlave = rep.getSlaveID(slaveServer.getName());
if (idSlave == null) {
rep.insertLogEntry("Creating new slave server '" + slaveServer.getName() + "'");
rep.save(slaveServer, Const.VERSION_COMMENT_INITIAL_VERSION, null);
} else {
MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);
mb.setMessage(BaseMessages.getString(PKG, "RepositoryExplorerDialog.Slave.Create.AlreadyExists.Message"));
mb.setText(BaseMessages.getString(PKG, "RepositoryExplorerDialog.Slave.Create.AlreadyExists.Title"));
mb.open();
}
// Refresh tree...
refreshTree();
}
} catch (KettleException e) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "RepositoryExplorerDialog.Connection.Create.UnexpectedError.Title"), BaseMessages.getString(PKG, "RepositoryExplorerDialog.Connection.Create.UnexpectedError.Message"), e);
}
}
Aggregations