промежуточный. вариант с разбитием конфигурации сапфора и настройки как отдельный объект

This commit is contained in:
2024-09-27 22:50:47 +03:00
parent 30b51180c4
commit 4547fd10bd
27 changed files with 777 additions and 69 deletions

View File

@@ -25,6 +25,8 @@ import TestingSystem.SAPFOR.Json.SapforPackage_json;
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration;
import TestingSystem.SAPFOR.SapforConfigurationCommand.SapforConfigurationCommand;
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import TestingSystem.SAPFOR.SapforSettings.SapforSettings;
import TestingSystem.SAPFOR.SapforSettingsCommand.SapforSettingsCommand;
import TestingSystem.SAPFOR.SapforTestingPlanner;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapforState;
@@ -110,6 +112,16 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
SapforPackage sapforPackage = (SapforPackage) object;
File workspace = sapforPackage.getLocalWorkspace();
Utils.forceDeleteWithCheck(workspace);
} else if (object instanceof SapforSettings) {
SapforSettings sapforSettings = (SapforSettings) object;
Vector<SapforSettingsCommand> commands = new Vector<>();
for (SapforSettingsCommand command : db.sapforSettingsCommands.Data.values()) {
if (command.sapforsettings_id== sapforSettings.id)
commands.add(command);
}
for (SapforSettingsCommand command : commands) {
db.Delete(command);
}
}
}
//-->>>
@@ -641,30 +653,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
afterPublishAction(target);
//--
}
/*
public void PATCH() {
for (DVMPackage testingPackage : db.dvmPackages.Data.values()) {
boolean hasErrors = false;
try {
testingPackage.readJson();
//---------------------------------------------------
for (DVMCompilationTask compilationTask : testingPackage.package_json.compilationTasks) {
if (!compilationTask.state.equals(TaskState.Done))
hasErrors = true;
for (DVMRunTask runTask : compilationTask.runTasks) {
if (!runTask.state.equals(TaskState.Done))
hasErrors = true;
}
}
if (hasErrors)
testingPackage.state = TasksPackageState.DoneWithErrors;
//---------------------------------------------------
db.Update(testingPackage);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
*/
}