каскадное изменение информации о группе в конфигурациях в случае ее редактирования

This commit is contained in:
2024-11-15 00:44:23 +03:00
parent 901eb0f623
commit e0fa7abeb4
9 changed files with 109 additions and 38 deletions

View File

@@ -22,6 +22,7 @@ import _VisualDVM.TestingSystem.Common.MachineProcess.MachineProcessSet;
import _VisualDVM.TestingSystem.Common.Test.Test;
import _VisualDVM.TestingSystem.Common.Test.TestType;
import _VisualDVM.TestingSystem.Common.TestingPackageToKill.TestingPackageToKill;
import _VisualDVM.TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage_json;
import _VisualDVM.TestingSystem.DVM.DVMTestingChecker;
@@ -102,6 +103,23 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
}
}
@Override
protected void afterEditAction(DBObject object) throws Exception {
if (object instanceof Group) {
Group group = (Group) object;
//-
for (DVMConfiguration dvmConfiguration : db.dvmConfigurations.Data.values()) {
if (dvmConfiguration.tryUpdateGroup(group)){
db.Update(dvmConfiguration);
}
}
for (SapforConfiguration sapforConfiguration : db.sapforConfigurations.Data.values()) {
if (sapforConfiguration.tryUpdateGroup(group)){
db.Update(sapforConfiguration);
}
}
}
}
@Override
public void afterDeleteAction(DBObject object) throws Exception {
if (object instanceof Test) {
Test test = (Test) object;