Search in sources :

Example 1 with PlanDumpTask

use of com.cubrid.cubridmanager.core.cubrid.database.task.PlanDumpTask in project cubrid-manager by CUBRID.

the class PlanDumpDialog method buttonPressed.

/**
	 * When press button in button bar,call this method
	 * 
	 * @param buttonId the button id
	 */
protected void buttonPressed(int buttonId) {
    if (buttonId == IDialogConstants.OK_ID) {
        if (!verify()) {
            return;
        }
        task = new PlanDumpTask(database.getServer().getServerInfo());
        task.setDbName(database.getName());
        task.setPlanDrop(repairButton.getSelection() ? YesNoType.Y : YesNoType.N);
        String serverName = database.getServer().getName();
        String dbName = database.getName();
        jobName = Messages.titlePlanDumpDialog + " - " + dbName + "@" + serverName;
        TaskJobExecutor taskExec = new CommonTaskJobExec(this);
        taskExec.addTask(task);
        JobFamily jobFamily = new JobFamily();
        jobFamily.setServerName(serverName);
        jobFamily.setDbName(dbName);
        taskExec.schedule(jobName, jobFamily, true, Job.SHORT);
        return;
    }
    super.buttonPressed(buttonId);
}
Also used : TaskJobExecutor(com.cubrid.common.ui.spi.progress.TaskJobExecutor) CommonTaskJobExec(com.cubrid.common.ui.spi.progress.CommonTaskJobExec) PlanDumpTask(com.cubrid.cubridmanager.core.cubrid.database.task.PlanDumpTask) JobFamily(com.cubrid.common.ui.spi.progress.JobFamily)

Aggregations

CommonTaskJobExec (com.cubrid.common.ui.spi.progress.CommonTaskJobExec)1 JobFamily (com.cubrid.common.ui.spi.progress.JobFamily)1 TaskJobExecutor (com.cubrid.common.ui.spi.progress.TaskJobExecutor)1 PlanDumpTask (com.cubrid.cubridmanager.core.cubrid.database.task.PlanDumpTask)1