2023-12-11 01:24:30 +03:00
|
|
|
package TestingSystem.DVM.DVMPackage;
|
|
|
|
|
import Common.Database.DBObject;
|
2023-12-12 01:01:36 +03:00
|
|
|
import Common.Global;
|
2023-12-12 16:09:14 +03:00
|
|
|
import Common.Utils.Utils;
|
2023-12-11 01:24:30 +03:00
|
|
|
import TestingSystem.Common.TestingPackage.TestingPackage;
|
2023-12-12 16:09:14 +03:00
|
|
|
import com.sun.org.glassfish.gmbal.Description;
|
2023-12-12 01:01:36 +03:00
|
|
|
|
|
|
|
|
import java.io.File;
|
2023-12-11 01:24:30 +03:00
|
|
|
public class DVMPackage extends TestingPackage {
|
2023-12-11 01:38:44 +03:00
|
|
|
public String PID = ""; //сишная часть.
|
2023-12-11 01:24:30 +03:00
|
|
|
//---
|
|
|
|
|
public String machine_name = "";
|
|
|
|
|
public String machine_address = "";
|
|
|
|
|
public int machine_port = 22;
|
|
|
|
|
//---
|
|
|
|
|
public String user_name = "";
|
|
|
|
|
public String user_password;
|
|
|
|
|
public String user_workspace;
|
|
|
|
|
//---
|
2023-12-12 16:09:14 +03:00
|
|
|
@Description("IGNORE")
|
|
|
|
|
public DVMPackage_json package_json = null;
|
|
|
|
|
//---
|
2023-12-11 01:24:30 +03:00
|
|
|
@Override
|
|
|
|
|
public void SynchronizeFields(DBObject src) {
|
|
|
|
|
super.SynchronizeFields(src);
|
|
|
|
|
DVMPackage tasksPackage = (DVMPackage) src;
|
|
|
|
|
PID = tasksPackage.PID;
|
|
|
|
|
machine_name = tasksPackage.machine_name;
|
|
|
|
|
machine_address = tasksPackage.machine_address;
|
|
|
|
|
machine_port = tasksPackage.machine_port;
|
|
|
|
|
user_name = tasksPackage.user_name;
|
|
|
|
|
user_workspace = tasksPackage.user_workspace;
|
|
|
|
|
user_password = tasksPackage.user_password;
|
|
|
|
|
}
|
2023-12-12 16:09:14 +03:00
|
|
|
public File getLocalWorkspace() {
|
2023-12-12 01:01:36 +03:00
|
|
|
return new File(Global.PackagesDirectory, id);
|
|
|
|
|
}
|
2023-12-12 16:09:14 +03:00
|
|
|
public File getJsonFile() {
|
|
|
|
|
return new File(getLocalWorkspace(), "package_json");
|
|
|
|
|
}
|
|
|
|
|
public void saveJson() throws Exception {
|
|
|
|
|
Utils.jsonToFile(package_json, getJsonFile());
|
|
|
|
|
}
|
2023-12-11 01:24:30 +03:00
|
|
|
}
|