no message
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Common.Utils.Utils;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
|
||||
import TestingSystem.TasksPackage.TasksPackageState;
|
||||
import Visual_DVM_2021.Passes.TestingSystemPass;
|
||||
|
||||
import java.io.File;
|
||||
public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPackage> {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/DownloadAll.png";
|
||||
}
|
||||
@Override
|
||||
public String getButtonText() {
|
||||
return "";
|
||||
}
|
||||
File dst = null;
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (Current.Check(Log, Current.SapforTasksPackage)) {
|
||||
target = Current.getSapforTasksPackage();
|
||||
if (target.state.equals(TasksPackageState.Done)) return true;
|
||||
else Log.Writeln_("Пакет не завершен.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.DownloadSapforTasksPackage, Current.getAccount().email, target.id));
|
||||
response.Unpack(dst = Utils.getTempFileName(target.id));
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
return dst!=null&&dst.exists();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user