use of com.cubrid.cubridmanager.core.logs.task.ResetLogTask in project cubrid-manager by CUBRID.
the class ResetAdminLogAction method run.
/**
* Reset Admin log
*/
public void run() {
if (!CommonUITool.openConfirmBox(Messages.warningResetAdminLog)) {
return;
}
Object[] selected = this.getSelectedObj();
LogInfo logInfo = (LogInfo) ((DefaultCubridNode) selected[0]).getAdapter(LogInfo.class);
ResetLogTask resetLogTask = new ResetLogTask(((DefaultCubridNode) selected[0]).getServer().getServerInfo());
resetLogTask.setPath(logInfo.getPath());
TaskExecutor taskExecutor = new CommonTaskExec(Messages.resetAdminLogTaskName);
taskExecutor.addTask(resetLogTask);
new ExecTaskWithProgress(taskExecutor).exec();
if (taskExecutor.isSuccess()) {
refreshLogEditor((ICubridNode) selected[0]);
CommonUITool.openInformationBox(Messages.msgSuccess, Messages.msgDeleteAllLog);
}
}
Aggregations