no message
This commit is contained in:
@@ -3,19 +3,11 @@ import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
|
||||
public class ShowSapforCompilationErr extends ShowTestingServerFile {
|
||||
@Override
|
||||
protected int getTimeout() {
|
||||
return super.getTimeout();
|
||||
}
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/CompilationErrors.png";
|
||||
}
|
||||
@Override
|
||||
public String getButtonText() {
|
||||
return "";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!Global.testingServer.db.serverSapfors.getUI().CheckCurrent(Log)) {
|
||||
return false;
|
||||
|
||||
@@ -3,19 +3,11 @@ import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
|
||||
public class ShowSapforCompilationOut extends ShowTestingServerFile {
|
||||
@Override
|
||||
protected int getTimeout() {
|
||||
return super.getTimeout();
|
||||
}
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/CompilationOutput.png";
|
||||
}
|
||||
@Override
|
||||
public String getButtonText() {
|
||||
return "";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!Global.testingServer.db.serverSapfors.getUI().CheckCurrent(Log)) {
|
||||
return false;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.PassException;
|
||||
import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
|
||||
import _VisualDVM.Passes.Server.TestingServerPass;
|
||||
import _VisualDVM.Passes.Server.TestingSystemPass_OLD;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -11,21 +12,20 @@ import org.apache.commons.io.FileUtils;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
public class ShowTestingServerFile extends TestingSystemPass_OLD<RemoteFile> {
|
||||
public class ShowTestingServerFile extends TestingServerPass<RemoteFile> {
|
||||
String title;
|
||||
File localFile;
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
title = (String) args[0];
|
||||
target = (RemoteFile) args[1];
|
||||
return true;
|
||||
return SendRequest(ServerCode.ReceiveFile, target.full_name);
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.ReceiveFile, target.full_name));
|
||||
protected void body() throws Exception {
|
||||
localFile = Utils.getTempFileName(target.name);
|
||||
if (server_response.object != null)
|
||||
server_response.Unpack(localFile);
|
||||
if (request.server_response != null)
|
||||
request.server_response.Unpack(localFile);
|
||||
else throw new PassException("Файл не найден");
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -43,6 +43,9 @@ public abstract class ClientPass <S extends RepositoryServer,T> extends Pass<T>
|
||||
protected boolean SendRequest(ServerCode code_in,String arg_in, Serializable object_in){
|
||||
return SendRequest(code_in,arg_in, object_in, Global.properties.SocketTimeout);
|
||||
}
|
||||
protected boolean SendRequest(ServerCode code_in, String arg_in){
|
||||
return SendRequest(code_in,arg_in,null);
|
||||
}
|
||||
protected boolean SendRequest(ServerCode code_in){
|
||||
return SendRequest(code_in, "", null);
|
||||
}
|
||||
|
||||
@@ -105,6 +105,8 @@ public enum ServerCode {
|
||||
return "Скачивание базы данных отчетов об ошибках с сервера";
|
||||
case ReceiveTestsDatabase:
|
||||
return "Скачивание базы тестирования с сервера";
|
||||
case ReceiveFile:
|
||||
return "Скачивание файла с сервера";
|
||||
default:
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user