no message
This commit is contained in:
@@ -4,6 +4,7 @@ import Common.Passes.Pass;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Passes.Server.TestingServerPass;
|
||||
import _VisualDVM.Passes.Server.TestingSystemPass_OLD;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -13,14 +14,10 @@ import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
public class DownloadSapforPackage extends Pass<SapforPackage> {
|
||||
public class DownloadSapforPackage extends TestingServerPass<SapforPackage> {
|
||||
File loaded;
|
||||
byte[] packed;
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = (SapforPackage) args[0];
|
||||
if (!target.state.isDone()) {
|
||||
@@ -29,25 +26,11 @@ public class DownloadSapforPackage extends Pass<SapforPackage> {
|
||||
}
|
||||
int id = target.id;
|
||||
loaded = new File(target.getLocalWorkspace(), CommonConstants.LOADED);
|
||||
if (!loaded.exists()) {
|
||||
Pass pass = new TestingSystemPass_OLD() {
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Скачивание";
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.DownloadSapforPackage, "", id));
|
||||
packed = (byte[]) server_response.object;
|
||||
}
|
||||
};
|
||||
return pass.Do();
|
||||
}
|
||||
;
|
||||
return false;
|
||||
return !loaded.exists()&&SendRequest(ServerCode.DownloadSapforPackage, "", id);
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
packed = (byte[]) request.server_response.object;
|
||||
File workspace = target.getLocalWorkspace();
|
||||
Utils_.forceDeleteWithCheck(workspace);
|
||||
File archive = Utils.getTempFileName(String.valueOf(target.id));
|
||||
|
||||
Reference in New Issue
Block a user