рефакторинг серверной части сапфора.

This commit is contained in:
2023-12-16 03:57:01 +03:00
parent b7b41ae59c
commit 34c08e7d44
32 changed files with 942 additions and 355 deletions

View File

@@ -5,37 +5,15 @@ import Repository.Server.ServerExchangeUnit_2021;
import TestingSystem.Common.TasksPackageToKill.TasksPackageToKill;
import TestingSystem.Common.TestingPackageToKill.TestingPackageToKill;
import TestingSystem.DVM.DVMPackage.DVMPackage;
import Visual_DVM_2021.Passes.AbortTestingPackage;
import Visual_DVM_2021.Passes.Server.TestingSystemPass;
public class AbortDVMPackage extends TestingSystemPass<DVMPackage> {
TestingPackageToKill packageToKill = null;
public class AbortDVMPackage extends AbortTestingPackage {
@Override
public String getIconPath() {
return "/icons/Ban.PNG";
public Current currentName() {
return Current.DVMPackage;
}
@Override
public String getButtonText() {
return "";
}
@Override
protected boolean canStart(Object... args) throws Exception {
packageToKill = null;
if (Current.Check(Log, Current.DVMPackage)) {
target = Current.getDVMPackage();
switch (target.state) {
case Done:
case Aborted:
Log.Writeln_("Пакет уже завершен.");
break;
default:
packageToKill = new TestingPackageToKill(target);
return true;
}
}
;
return false;
}
@Override
protected void ServerAction() throws Exception {
Command(new ServerExchangeUnit_2021(ServerCode.PublishObject, null, packageToKill));
public int getAbortType() {
return 0;
}
}