загрузка пакета на локальную машиину.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -39,6 +39,7 @@ Archives/*
|
|||||||
Temp/*
|
Temp/*
|
||||||
Projects/*
|
Projects/*
|
||||||
CompilationTasks/*
|
CompilationTasks/*
|
||||||
|
SapforPackages/*
|
||||||
User/*
|
User/*
|
||||||
RunTasks/*
|
RunTasks/*
|
||||||
Makefiles/*
|
Makefiles/*
|
||||||
|
|||||||
5550
.idea/workspace.xml
generated
5550
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,25 @@
|
|||||||
package Visual_DVM_2021.Passes.All;
|
package Visual_DVM_2021.Passes.All;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
|
import Common.Global;
|
||||||
import Common.Utils.Utils;
|
import Common.Utils.Utils;
|
||||||
import Repository.Server.ServerCode;
|
import Repository.Server.ServerCode;
|
||||||
import Repository.Server.ServerExchangeUnit_2021;
|
import Repository.Server.ServerExchangeUnit_2021;
|
||||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
|
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
|
||||||
import TestingSystem.TasksPackage.TasksPackageState;
|
import TestingSystem.TasksPackage.TasksPackageState;
|
||||||
|
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||||
import Visual_DVM_2021.Passes.TestingSystemPass;
|
import Visual_DVM_2021.Passes.TestingSystemPass;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPackage> {
|
public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPackage> {
|
||||||
@Override
|
@Override
|
||||||
public String getIconPath() {
|
public String getIconPath() {
|
||||||
return "/icons/DownloadAll.png";
|
return "/icons/DownloadBugReport.png";
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String getButtonText() {
|
public String getButtonText() {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
File dst = null;
|
File packageArchive = null;
|
||||||
@Override
|
@Override
|
||||||
protected boolean canStart(Object... args) throws Exception {
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
if (Current.Check(Log, Current.SapforTasksPackage)) {
|
if (Current.Check(Log, Current.SapforTasksPackage)) {
|
||||||
@@ -30,11 +32,21 @@ public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPac
|
|||||||
@Override
|
@Override
|
||||||
protected void ServerAction() throws Exception {
|
protected void ServerAction() throws Exception {
|
||||||
Command(new ServerExchangeUnit_2021(ServerCode.DownloadSapforTasksPackage, Current.getAccount().email, target.id));
|
Command(new ServerExchangeUnit_2021(ServerCode.DownloadSapforTasksPackage, Current.getAccount().email, target.id));
|
||||||
response.Unpack(dst = Utils.getTempFileName(target.id));
|
response.Unpack(packageArchive = Utils.getTempFileName(target.id));
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected boolean validate() {
|
protected boolean validate() {
|
||||||
return dst!=null&&dst.exists();
|
return packageArchive !=null&& packageArchive.exists();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void performDone() throws Exception {
|
||||||
|
super.performDone();
|
||||||
|
File packageWorkspace = new File(Global.SapforPackagesDirectory, target.id);
|
||||||
|
Utils.forceDeleteWithCheck(packageWorkspace);
|
||||||
|
if (passes.get(PassCode_2021.UnzipFolderPass).Do(
|
||||||
|
packageArchive.getAbsolutePath(),
|
||||||
|
Global.SapforPackagesDirectory.getAbsolutePath(), false
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user