use of com.cubrid.cubridmanager.core.common.task.GenerateCertificateTask in project cubrid-manager by CUBRID.
the class GenCertDialog method genCertFile.
private void genCertFile() {
GenerateCertificateTask task = new GenerateCertificateTask(serverInfo);
if (!StringUtil.isEmpty(countryText.getText())) {
task.setCName(countryText.getText());
}
if (!StringUtil.isEmpty(stateText.getText())) {
task.setStName(stateText.getText());
}
if (!StringUtil.isEmpty(cityText.getText())) {
task.setLonName(cityText.getText());
}
if (!StringUtil.isEmpty(organizationText.getText())) {
task.setOrgname(organizationText.getText());
}
if (!StringUtil.isEmpty(emailText.getText())) {
task.setEmail(emailText.getText());
}
int index = dateCombo.getSelectionIndex();
task.setDays(validValues[index]);
TaskExecutor taskExecutor = new CommonTaskExec(Messages.msgGenCert);
taskExecutor.addTask(task);
new ExecTaskWithProgress(taskExecutor).exec();
if (task.isSuccess()) {
serverInfo.setCertStatus(CertStatus.CUSTOMIZED);
CommonUITool.openInformationBox(Messages.titleRestartCMS, Messages.msgRestartCMS);
} else {
CommonUITool.openErrorBox(task.getErrorMsg());
}
}
Aggregations