no message

This commit is contained in:
2023-11-17 00:04:21 +03:00
parent 1ff88fc5fb
commit beb1359544
132 changed files with 617 additions and 591 deletions

View File

@@ -1,23 +1,18 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.UI.UI;
import Common.Utils.Utils;
import ProjectData.Project.db_project_info;
import TestingSystem.Test.Test;
import TestingSystem.TestingServer;
import TestingSystem.Common.Test.Test;
import TestingSystem.Common.TestingServer;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.Server.PublishServerObject;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.nio.file.Paths;
public class PublishTest extends PublishServerObject<TestingServer, Test> {
public PublishTest() {
super(Global.testingServer, Test.class);
}
protected db_project_info project = null;
db_project_info project = null;
protected boolean setProject() {
if (Current.Check(Log, Current.Group, Current.Project)
&& UI.Question("Добавить текущий проект в глобальную базу тестов")) {
@@ -42,21 +37,29 @@ public class PublishTest extends PublishServerObject<TestingServer, Test> {
target.description = project.getLocalName() + " " + project.description;
target.dim = project.testMaxDim;
target.group_id = Current.getGroup().id;
if (super.fillObjectFields()) {
File src = Utils.getTempFileName("test");
return super.fillObjectFields();
}
return false;
}
@Override
protected void performDone() throws Exception {
super.performDone();
// passes.get()
}
//--
/*
if (super.fillObjectFields()) {
File src = Utils.getTempFileName("test"); //id самого теста неизвестен.
Utils.CheckAndCleanDirectory(src);
project.Clone(src, false);
FileUtils.copyFile(project.db.getFile(),
Paths.get(src.getAbsolutePath(),Constants.data, project.db.getFile().getName()).toFile());
//архивация.
File archive = Utils.getTempFileName("test_archive");
File archive = Utils.getTempFileName("test");
if (passes.get(PassCode_2021.ZipFolderPass).Do(src.getAbsolutePath(), archive.getAbsolutePath())) {
target.project_archive_bytes = Utils.packFile(archive);
return true;
}
}
}
return false;
}
//--
*/
}