Files
VisualSapfor/src/Visual_DVM_2021/Passes/All/DeleteDVMPackage.java

37 lines
1.3 KiB
Java
Raw Normal View History

package Visual_DVM_2021.Passes.All;
import Common.Global;
import Common.UI.UI;
import TestingSystem.Common.TestingServer;
import TestingSystem.DVM.DVMPackage.DVMPackage;
import TestingSystem.DVM.TasksPackage.TasksPackageState;
import Visual_DVM_2021.Passes.DeleteServerObjects;
public class DeleteDVMPackage extends DeleteServerObjects<TestingServer, DVMPackage> {
public DeleteDVMPackage() {
super(Global.testingServer, DVMPackage.class);
}
//---
public boolean checkActivity() {
/*
for (Object key : target) {
DVMPackage tasksPackage = server.db.dvmPackages.get(key);
if (!tasksPackage.state.equals(TasksPackageState.Done) &&
!tasksPackage.state.equals(TasksPackageState.Aborted)
) {
Log.Writeln_("Нельзя удалить активный пакет " + key + " !");
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();
}
}