Удаление пакета задач( неактивного)

This commit is contained in:
2023-12-04 23:13:19 +03:00
parent c21c7c2e10
commit c1d3d9208e
4 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
package Visual_DVM_2021.Passes.All;
import Common.UI.UI;
import TestingSystem.DVM.TasksPackage.TasksPackage;
import TestingSystem.DVM.TasksPackage.TasksPackageState;
import Visual_DVM_2021.Passes.Server.DeleteServerAccountObject;
public class DeleteTasksPackage extends DeleteServerAccountObject<TasksPackage> {
public DeleteTasksPackage() {
super(TasksPackage.class);
}
public boolean checkActivity() {
if (!target.state.equals(TasksPackageState.Done) && !target.state.equals(TasksPackageState.Aborted)) {
Log.Writeln_("Нельзя удалить активный пакет!");
return false;
}
return true;
}
@Override
protected boolean canStart(Object... args) throws Exception {
return super.canStart(args) && checkActivity();
}
@Override
protected void showPreparation() throws Exception {
UI.getMainWindow().getTestingWindow().DropTestRunTasksComparison();
}
}