перенос метода получающего поле объекта для отображения
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforConfiguration;
|
||||
import Common.Utils.TextLog;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.ServerObjectsCache.ConfigurationCache;
|
||||
import _VisualDVM.ServerObjectsCache.SapforConfigurationCache;
|
||||
import _VisualDVM.ServerObjectsCache.VisualCaches;
|
||||
import _VisualDVM.TestingSystem.Common.Configuration.Configuration;
|
||||
@@ -41,4 +42,26 @@ public class SapforConfiguration extends Configuration {
|
||||
//-
|
||||
return Log.isEmpty();
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(this);
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return description;
|
||||
case 3:
|
||||
return sender_name;
|
||||
case 4:
|
||||
return printAuto();
|
||||
case 5:
|
||||
return kernels;
|
||||
case 6:
|
||||
return cache.settingsSummary;
|
||||
case 7:
|
||||
return cache.groupsSummary;
|
||||
case 8:
|
||||
return cache.getTestsCount();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,28 +73,7 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforConfiguration object, int columnIndex) {
|
||||
ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(object);
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return object.description;
|
||||
case 3:
|
||||
return object.sender_name;
|
||||
case 4:
|
||||
return object.printAuto();
|
||||
case 5:
|
||||
return object.kernels;
|
||||
case 6:
|
||||
return cache.settingsSummary;
|
||||
case 7:
|
||||
return cache.groupsSummary;
|
||||
case 8:
|
||||
return cache.getTestsCount();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//--
|
||||
@Override
|
||||
public DBObjectDialog<SapforConfiguration, SapforConfigurationFields> getDialog() {
|
||||
|
||||
@@ -7,6 +7,7 @@ import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Account.Account;
|
||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||
import _VisualDVM.ServerObjectsCache.ConfigurationCache;
|
||||
import _VisualDVM.ServerObjectsCache.PackageCache;
|
||||
import _VisualDVM.ServerObjectsCache.VisualCaches;
|
||||
import _VisualDVM.TestingSystem.Common.TasksPackageState;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
@@ -17,6 +18,7 @@ import _VisualDVM.TestingSystem.SAPFOR.SapforTask.SapforTask;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class SapforPackage extends TestingPackage<SapforPackage_json> {
|
||||
@@ -118,4 +120,30 @@ public class SapforPackage extends TestingPackage<SapforPackage_json> {
|
||||
description = "Выполнено на " + ((int) percent) + "%\n" +
|
||||
"Всего задач: " + tasksCount + ", из них с ошибками " + bad;
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
PackageCache cache = (PackageCache) VisualCaches.GetCache(this);
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return sender_name;
|
||||
case 3:
|
||||
return version;
|
||||
case 4:
|
||||
return cache.getConfigurationsDescriptions();
|
||||
case 5:
|
||||
return tasksCount;
|
||||
case 6:
|
||||
return kernels;
|
||||
case 7:
|
||||
return progress;
|
||||
case 8:
|
||||
return new Date(StartDate);
|
||||
case 9:
|
||||
return new Date(ChangeDate);
|
||||
case 10:
|
||||
return state;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,32 +115,7 @@ public class SapforPackageDBTable extends iDBTable<SapforPackage> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforPackage object, int columnIndex) {
|
||||
PackageCache cache = (PackageCache) VisualCaches.GetCache(object);
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return object.sender_name;
|
||||
case 3:
|
||||
return object.version;
|
||||
case 4:
|
||||
return cache.getConfigurationsDescriptions();
|
||||
case 5:
|
||||
return object.tasksCount;
|
||||
case 6:
|
||||
return object.kernels;
|
||||
case 7:
|
||||
return object.progress;
|
||||
case 8:
|
||||
return new Date(object.StartDate);
|
||||
case 9:
|
||||
return new Date(object.ChangeDate);
|
||||
case 10:
|
||||
return object.state;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Comparator<SapforPackage> getComparator() {
|
||||
return new Comparator<SapforPackage>() {
|
||||
|
||||
@@ -102,4 +102,17 @@ public class SapforSettings extends Settings {
|
||||
//-
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return description;
|
||||
case 3:
|
||||
return sender_name;
|
||||
case 4:
|
||||
return flags;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,19 +57,6 @@ public class SapforSettingsDBTable extends iDBTable<SapforSettings> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforSettings object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return object.description;
|
||||
case 3:
|
||||
return object.sender_name;
|
||||
case 4:
|
||||
return object.flags;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
public DBObjectDialog<SapforSettings, SapforSettingsFields> getDialog() {
|
||||
|
||||
@@ -26,4 +26,13 @@ public class SapforSettingsCommand extends riDBObject {
|
||||
sapforsettings_id = c.sapforsettings_id;
|
||||
passCode = c.passCode;
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return passCode.getDescription();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,15 +25,7 @@ public class SapforSettingsCommandsDBTable extends iDBTable<SapforSettingsComman
|
||||
public String getPluralDescription() {
|
||||
return "команды";
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforSettingsCommand object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return object.passCode.getDescription();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforSettingsCommand;
|
||||
|
||||
@@ -47,4 +47,18 @@ public class ServerSapfor extends riDBObject {
|
||||
public String getVersionCommand() {
|
||||
return Utils_.DQuotes(call_command) + " " + version_command;
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt( int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return version;
|
||||
case 3:
|
||||
return sender_name;
|
||||
case 4:
|
||||
return getBuildDate();
|
||||
case 5:
|
||||
return state;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,20 +27,7 @@ public class ServerSapforsDBTable extends iDBTable<ServerSapfor> {
|
||||
public Current CurrentName() {
|
||||
return Current.ServerSapfor;
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(ServerSapfor object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 2:
|
||||
return object.version;
|
||||
case 3:
|
||||
return object.sender_name;
|
||||
case 4:
|
||||
return object.getBuildDate();
|
||||
case 5:
|
||||
return object.state;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DataSetControlForm(this, mountPanel) {
|
||||
|
||||
Reference in New Issue
Block a user