fix
v++
This commit is contained in:
@@ -125,4 +125,18 @@ public class GroupsDBTable extends iDBTable<Group> {
|
||||
}
|
||||
};
|
||||
}
|
||||
public boolean containsGroupWithDescription(String description_in) {
|
||||
for (Group group : Data.values()) {
|
||||
if (group.description.equalsIgnoreCase(description_in))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public Group getGroupByDescription(String description_in) {
|
||||
for (Group group : Data.values()) {
|
||||
if (group.description.equalsIgnoreCase(description_in))
|
||||
return group;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,4 +93,18 @@ public class TestDBTable extends iDBTable<Test> {
|
||||
}
|
||||
};
|
||||
}
|
||||
public boolean containsTestWithDescription(String description_in) {
|
||||
for (Test test : Data.values()) {
|
||||
if (test.description.equalsIgnoreCase(description_in))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public Test getTestByDescription(String description_in) {
|
||||
for (Test test : Data.values()) {
|
||||
if (test.description.equalsIgnoreCase(description_in))
|
||||
return test;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,22 @@ import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
/*
|
||||
@Override
|
||||
protected void beforePublishAction(DBObject object) throws Exception {
|
||||
if (object instanceof Group) {
|
||||
Group group = (Group) object;
|
||||
if (db.groups.containsGroupWithDescription(group.description))
|
||||
throw new RepositoryRefuseException("Уже существует группа с описанием " +
|
||||
Utils.Brackets(group.description.toLowerCase()));
|
||||
} else if (object instanceof Test) {
|
||||
Test test = (Test) object;
|
||||
if (db.tests.containsTestWithDescription(test.description))
|
||||
throw new RepositoryRefuseException("Уже существует тест с описанием " +
|
||||
Utils.Brackets(test.description.toLowerCase()));
|
||||
}
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
public void afterPublishAction(DBObject object) throws Exception {
|
||||
if (object instanceof Test) {
|
||||
|
||||
@@ -7,6 +7,7 @@ public class SapforPackagesBar extends DataMenuBar {
|
||||
PassCode_2021.SynchronizeTests,
|
||||
PassCode_2021.AddSapforPackage,
|
||||
PassCode_2021.AddTasksToSapforPackage,
|
||||
PassCode_2021.CloneSapforPackage,
|
||||
PassCode_2021.StartSapforPackage,
|
||||
PassCode_2021.AbortSapforPackage,
|
||||
PassCode_2021.DeleteSapforPackage
|
||||
|
||||
Reference in New Issue
Block a user