no message
This commit is contained in:
@@ -5,49 +5,16 @@ import TestingSystem.Common.Group.Group;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
|
||||
import Visual_DVM_2021.Passes.SaveCurrentConfiguration;
|
||||
import Visual_DVM_2021.Passes.Server.EditServerObject;
|
||||
|
||||
import java.util.Vector;
|
||||
public class SaveCurrentDVMConfiguration extends EditServerObject<TestingServer, DVMConfiguration> {
|
||||
Vector<Group> groups;
|
||||
Vector<Test> tests;
|
||||
//--
|
||||
Vector<String> groupsNames;
|
||||
//--
|
||||
public class SaveCurrentDVMConfiguration extends SaveCurrentConfiguration<DVMConfiguration> {
|
||||
public SaveCurrentDVMConfiguration() {
|
||||
super(Global.testingServer, DVMConfiguration.class);
|
||||
super(DVMConfiguration.class);
|
||||
}
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/Save.png";
|
||||
}
|
||||
@Override
|
||||
public String getButtonText() {
|
||||
return "";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!Current.Check(Log, Current.DVMConfiguration)) return false;
|
||||
target = Current.getDVMConfiguration();
|
||||
//--
|
||||
groups = new Vector<>();
|
||||
tests = new Vector<>();
|
||||
//---
|
||||
groupsNames = new Vector<>();
|
||||
for (Group group : Global.testingServer.db.groups.getCheckedItems()) {
|
||||
groups.add(group);
|
||||
groupsNames.add(group.description);
|
||||
Vector<Test> groupTests = Global.testingServer.db.tests.getSelectedGroupTests(group);
|
||||
tests.addAll(groupTests);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
//занесение информации об участвующих группах конфигурациях и тестах
|
||||
target.saveGroupsAsJson(groups);
|
||||
target.saveTestsAsJson(tests);
|
||||
//--
|
||||
super.ServerAction();
|
||||
public Current currentName() {
|
||||
return Current.DVMConfiguration;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user