при удалении пакета все ссылки на то где он был эталоном обнуляются
This commit is contained in:
@@ -87,7 +87,6 @@ public class Configuration extends riDBObject {
|
||||
public String getDialogName() {
|
||||
return description;
|
||||
}
|
||||
//--
|
||||
//работает со стороны сервера.
|
||||
public boolean tryUpdateGroup(Group group) {
|
||||
ConfigurationCache unpacked = new ConfigurationCache(this);
|
||||
@@ -157,7 +156,6 @@ public class Configuration extends riDBObject {
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
public boolean tryDeleteTests(LinkedHashMap<Integer, Test> tests) {
|
||||
boolean flag = false;
|
||||
ConfigurationCache unpacked = new ConfigurationCache(this);
|
||||
@@ -173,27 +171,4 @@ public class Configuration extends riDBObject {
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/*
|
||||
public void updateTest(Test test){
|
||||
ConfigurationCache unpacked = new ConfigurationCache(this);
|
||||
for (TestJson testJson : unpacked.testsJson.array) {
|
||||
if (testJson.id == test.id) {
|
||||
testJson.description = test.description;
|
||||
testJson.language = String.valueOf(group.language);
|
||||
}
|
||||
}
|
||||
packedGroupsJson = Utils_.gson.toJson(unpacked);
|
||||
}
|
||||
|
||||
public boolean containsTest(int test_id) {
|
||||
ConfigurationCache unpacked = new ConfigurationCache(this);
|
||||
for (TestJson testJson : unpacked.testsJson.array) {
|
||||
if (testJson.id == test_id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -192,6 +192,14 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
Utils_.forceDeleteWithCheck(workspace);
|
||||
} else if (object instanceof SapforPackage) {
|
||||
SapforPackage sapforPackage = (SapforPackage) object;
|
||||
//--
|
||||
for (SapforConfiguration sapforConfiguration: db.sapforConfigurations.Data.values()){
|
||||
if (sapforConfiguration.ethalon_id==sapforPackage.id){
|
||||
sapforConfiguration.ethalon_id= CommonConstants.Nan;
|
||||
db.Update(sapforConfiguration);
|
||||
}
|
||||
}
|
||||
//--
|
||||
File workspace = sapforPackage.getLocalWorkspace();
|
||||
Utils_.forceDeleteWithCheck(workspace);
|
||||
} else if (object instanceof DVMSettings) {
|
||||
|
||||
Reference in New Issue
Block a user