no message
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.ServerSapfor;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.util.Date;
|
||||
public class ServerSapfor extends riDBObject {
|
||||
//--------------------------------------------------------------------->>>
|
||||
@Description("IGNORE")
|
||||
public static String version_command = "-ver";//команда запроса версии компилятора.
|
||||
@Description("IGNORE")
|
||||
public static String help_command = "-help";// команда запроса help
|
||||
//--------------------------------------------------------------------->>>
|
||||
public LanguageName languageName = LanguageName.fortran;
|
||||
public String home_path = ""; //домашняя папка.
|
||||
public String call_command = ""; //полная команда вызова.
|
||||
public String version = "?";
|
||||
public long buildDate = 0;
|
||||
@Description("DEFAULT 'Done'")
|
||||
public ServerSapforState state = ServerSapforState.Done;
|
||||
public Date getBuildDate() {
|
||||
return new Date(buildDate);
|
||||
}
|
||||
//--
|
||||
public ServerSapfor() {
|
||||
}
|
||||
public ServerSapfor(ServerSapfor s) {
|
||||
SynchronizeFields(s);
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
ServerSapfor s = (ServerSapfor) src;
|
||||
languageName = s.languageName;
|
||||
home_path = s.home_path;
|
||||
call_command = s.call_command;
|
||||
version = s.version;
|
||||
buildDate = s.buildDate;
|
||||
state = s.state;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return call_command;
|
||||
}
|
||||
public String getVersionCommand() {
|
||||
return CommonUtils.DQuotes(call_command) + " " + version_command;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.ServerSapfor;
|
||||
import Common.Visual.StatusEnum;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
public enum ServerSapforState implements StatusEnum {
|
||||
Queued,
|
||||
DVMRepositorySynchronization,
|
||||
SAPFORRepositorySynchronization,
|
||||
Compilation,
|
||||
Done,
|
||||
DoneWithErrors;
|
||||
@Override
|
||||
public VisualiserFonts getFont() {
|
||||
switch (this){
|
||||
case Queued:
|
||||
return VisualiserFonts.UnknownState;
|
||||
case Done:
|
||||
return VisualiserFonts.GoodState;
|
||||
case DoneWithErrors:
|
||||
return VisualiserFonts.BadState;
|
||||
case Compilation:
|
||||
case DVMRepositorySynchronization:
|
||||
case SAPFORRepositorySynchronization:
|
||||
return VisualiserFonts.ProgressState;
|
||||
default:
|
||||
return VisualiserFonts.UnknownState;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String getDescription() {
|
||||
switch (this) {
|
||||
case Queued:
|
||||
return "в очереди";
|
||||
case DVMRepositorySynchronization:
|
||||
return "синхронизация репозитория DVM";
|
||||
case SAPFORRepositorySynchronization:
|
||||
return "синхронизация репозитория SAPFOR";
|
||||
case Compilation:
|
||||
return "сборка";
|
||||
case Done:
|
||||
return "успешно";
|
||||
case DoneWithErrors:
|
||||
return "с ошибками";
|
||||
default:
|
||||
return StatusEnum.super.getDescription();
|
||||
}
|
||||
}
|
||||
public boolean isActive(){
|
||||
switch (this){
|
||||
case Done:
|
||||
case DoneWithErrors:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.ServerSapfor;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
public class ServerSapforsBar extends DataMenuBar {
|
||||
public ServerSapforsBar() {
|
||||
super("версии SAPFOR",
|
||||
PassCode_2021.CompileServerSapfor,
|
||||
PassCode_2021.ShowSapforCompilationOut,
|
||||
PassCode_2021.ShowSapforCompilationErr,
|
||||
PassCode_2021.DeleteServerSapfor
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.ServerSapfor;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Tables.TableRenderers;
|
||||
import _VisualDVM.Visual.UI;
|
||||
|
||||
import java.util.Comparator;
|
||||
public class ServerSapforsDBTable extends iDBTable<ServerSapfor> {
|
||||
public ServerSapforsDBTable() {
|
||||
super(ServerSapfor.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "SAPFOR";
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.ServerSapfor;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{"версия","автор", "дата сборки", "сборка"};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(ServerSapfor object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return object.version;
|
||||
case 2:
|
||||
return object.sender_name;
|
||||
case 3:
|
||||
return object.getBuildDate();
|
||||
case 4:
|
||||
return object.state;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI() {
|
||||
return new DataSetControlForm(this) {
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
// columns.get(0).setVisible(false);
|
||||
columns.get(3).setRenderer(TableRenderers.RendererDate);
|
||||
columns.get(4).setRenderer(TableRenderers.RendererStatusEnum);
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() throws Exception {
|
||||
super.ShowCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowCurrentServerSapfor();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentObject() throws Exception {
|
||||
super.ShowNoCurrentObject();
|
||||
UI.getMainWindow().getTestingWindow().ShowNoServerSapfor();
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Comparator<ServerSapfor> getComparator() {
|
||||
return new Comparator<ServerSapfor>() {
|
||||
@Override
|
||||
public int compare(ServerSapfor o1, ServerSapfor o2) {
|
||||
return o2.id-o1.id;
|
||||
}
|
||||
};
|
||||
// return Comparator.comparingInt(o -> o.).reversed();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user