каскадное удаление информации о тестах вконфигурации при удалении теста
This commit is contained in:
@@ -118,7 +118,8 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
db.Update(sapforConfiguration);
|
||||
}
|
||||
}
|
||||
} else if (object instanceof DVMSettings) {
|
||||
}
|
||||
else if (object instanceof DVMSettings) {
|
||||
DVMSettings dvmSettings = (DVMSettings) object;
|
||||
//-
|
||||
for (DVMConfiguration dvmConfiguration : db.dvmConfigurations.Data.values()) {
|
||||
@@ -126,7 +127,8 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
db.Update(dvmConfiguration);
|
||||
}
|
||||
}
|
||||
} else if (object instanceof SapforSettings) {
|
||||
}
|
||||
else if (object instanceof SapforSettings) {
|
||||
SapforSettings sapforSettings = (SapforSettings) object;
|
||||
for (SapforConfiguration sapforConfiguration : db.sapforConfigurations.Data.values()) {
|
||||
if (sapforConfiguration.tryUpdateSettings(sapforSettings)) {
|
||||
@@ -141,6 +143,19 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
Test test = (Test) object;
|
||||
Utils_.forceDeleteWithCheck(test.getArchive());
|
||||
Utils_.forceDeleteWithCheck(test.getServerPath());
|
||||
//--
|
||||
//-
|
||||
for (DVMConfiguration dvmConfiguration : db.dvmConfigurations.Data.values()) {
|
||||
if (dvmConfiguration.tryDeleteTest(test)) {
|
||||
db.Update(dvmConfiguration);
|
||||
}
|
||||
}
|
||||
for (SapforConfiguration sapforConfiguration : db.sapforConfigurations.Data.values()) {
|
||||
if (sapforConfiguration.tryDeleteTest(test)) {
|
||||
db.Update(sapforConfiguration);
|
||||
}
|
||||
}
|
||||
//--
|
||||
} else if (object instanceof Group) {
|
||||
Group group = (Group) object;
|
||||
Vector<Test> tests = new Vector<>();
|
||||
@@ -156,11 +171,13 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//--
|
||||
for (DVMConfiguration dvmConfiguration : db.dvmConfigurations.Data.values()) {
|
||||
if (dvmConfiguration.tryDeleteGroup(group)) {
|
||||
//todo удалить все тесты связанные с группой из конфигурации
|
||||
db.Update(dvmConfiguration);
|
||||
}
|
||||
}
|
||||
for (SapforConfiguration sapforConfiguration : db.sapforConfigurations.Data.values()) {
|
||||
if (sapforConfiguration.tryDeleteGroup(group)) {
|
||||
//todo удалить все тесты связанные с группой из конфигурации
|
||||
db.Update(sapforConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user