прмежуточный. в процесе рефакторина лишних джсон. частично в разобранном виде поэтому не сливать!
This commit is contained in:
@@ -154,20 +154,7 @@ 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);
|
||||
}
|
||||
}
|
||||
} else if (object instanceof DVMSettings) {
|
||||
if (object instanceof DVMSettings) {
|
||||
DVMSettings dvmSettings = (DVMSettings) object;
|
||||
//-
|
||||
for (DVMConfiguration dvmConfiguration : db.dvmConfigurations.Data.values()) {
|
||||
@@ -182,6 +169,12 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
db.Update(sapforConfiguration);
|
||||
}
|
||||
}
|
||||
} else if (object instanceof DVMConfiguration){
|
||||
DVMConfiguration dvmConfiguration = (DVMConfiguration) object;
|
||||
db.RefreshDVMConfigurationGroups(dvmConfiguration);
|
||||
}else if (object instanceof SapforConfiguration){
|
||||
SapforConfiguration sapforConfiguration = (SapforConfiguration) object;
|
||||
db.RefreshSapforConfigurationGroups(sapforConfiguration);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@@ -190,34 +183,10 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
Test test = (Test) object;
|
||||
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;
|
||||
LinkedHashMap<Integer, Test> groupTests = db.getMapByFKi(group, Test.class);
|
||||
//--
|
||||
for (DVMConfiguration dvmConfiguration : db.dvmConfigurations.Data.values()) {
|
||||
if (dvmConfiguration.tryDeleteGroup(group)) {
|
||||
dvmConfiguration.tryDeleteTests(groupTests);
|
||||
db.Update(dvmConfiguration);
|
||||
}
|
||||
}
|
||||
for (SapforConfiguration sapforConfiguration : db.sapforConfigurations.Data.values()) {
|
||||
if (sapforConfiguration.tryDeleteGroup(group)) {
|
||||
sapforConfiguration.tryDeleteTests(groupTests);
|
||||
db.Update(sapforConfiguration);
|
||||
}
|
||||
}
|
||||
//--
|
||||
for (Test group_test : groupTests.values()) {
|
||||
Utils_.forceDeleteWithCheck(group_test.getServerPath());
|
||||
db.DeleteDependencies(group_test);
|
||||
|
||||
Reference in New Issue
Block a user