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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
|
||||
import Visual_DVM_2021.Passes.SaveCurrentConfiguration;
|
||||
public class SaveCurrentSAPFORConfiguration extends SaveCurrentConfiguration<DVMConfiguration> {
|
||||
public SaveCurrentSAPFORConfiguration() {
|
||||
super(DVMConfiguration.class);
|
||||
}
|
||||
@Override
|
||||
public Current currentName() {
|
||||
return Current.SapforConfiguration;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +1,9 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.UI.VisualCache.ConfigurationCache;
|
||||
import Common.UI.VisualCache.VisualCaches;
|
||||
import TestingSystem.Common.Group.Group;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import java.util.Vector;
|
||||
public class ShowCurrentDVMConfigurationTests extends Pass_2021<DVMConfiguration> {
|
||||
import Visual_DVM_2021.Passes.ShowCurrentConfigurationTests;
|
||||
public class ShowCurrentDVMConfigurationTests extends ShowCurrentConfigurationTests {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/ShowPassword.png";
|
||||
}
|
||||
@Override
|
||||
public String getButtonText() {
|
||||
return "";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = null;
|
||||
if (Current.Check(Log, Current.DVMConfiguration)) {
|
||||
target = Current.getDVMConfiguration();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
Global.testingServer.db.UnselectAllGTC();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
System.out.println("package="+target.id);
|
||||
ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(target);
|
||||
Vector<Group> groups = cache.getGroups();
|
||||
Vector<Test> tests = cache.getTests();
|
||||
//-----
|
||||
//--
|
||||
for (Group group: groups)
|
||||
group.Select(true);
|
||||
for (Test test: tests)
|
||||
test.Select(true);
|
||||
//--
|
||||
|
||||
if (!groups.isEmpty()){
|
||||
Global.testingServer.db.groups.ShowUI(groups.lastElement().id);
|
||||
}
|
||||
if (!tests.isEmpty()){
|
||||
Global.testingServer.db.tests.ShowUI(tests.lastElement().id);
|
||||
}
|
||||
|
||||
public Current currentName() {
|
||||
return Current.DVMConfiguration;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Visual_DVM_2021.Passes.ShowCurrentConfigurationTests;
|
||||
public class ShowCurrentSAPFORConfigurationTests extends ShowCurrentConfigurationTests {
|
||||
@Override
|
||||
public Current currentName() {
|
||||
return Current.SapforConfiguration;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user