рефакторинг серверной части сапфора.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user