Search in sources :

Example 1 with GenerateCertificateTask

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());
    }
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) TaskExecutor(com.cubrid.common.ui.spi.progress.TaskExecutor) GenerateCertificateTask(com.cubrid.cubridmanager.core.common.task.GenerateCertificateTask) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)

Aggregations

CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)1 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)1 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)1 GenerateCertificateTask (com.cubrid.cubridmanager.core.common.task.GenerateCertificateTask)1