no message
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
package TestingSystem.Common.TestingPackage;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.riDBObject;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import TestingSystem.DVM.DVMPackage.DVMPackage_json;
|
||||
import TestingSystem.DVM.TasksPackage.TasksPackageState;
|
||||
public class TestingPackage extends riDBObject {
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.io.File;
|
||||
public abstract class TestingPackage<J> extends riDBObject {
|
||||
public String PID = "";
|
||||
public int tasksCount = 0; //Общее число задач
|
||||
//--
|
||||
public int kernels = 1;
|
||||
@@ -19,23 +26,42 @@ public class TestingPackage extends riDBObject {
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
TestingPackage tasksPackage = (TestingPackage) src;
|
||||
TestingPackage tp = (TestingPackage) src;
|
||||
//--
|
||||
tasksCount = tasksPackage.tasksCount;
|
||||
needsEmail = tasksPackage.needsEmail;
|
||||
version = tasksPackage.version;
|
||||
drv = tasksPackage.drv;
|
||||
kernels = tasksPackage.kernels;
|
||||
progress = tasksPackage.progress;
|
||||
StartDate = tasksPackage.StartDate;
|
||||
ChangeDate = tasksPackage.ChangeDate;
|
||||
state = tasksPackage.state;
|
||||
tasksCount = tp.tasksCount;
|
||||
needsEmail = tp.needsEmail;
|
||||
version = tp.version;
|
||||
drv = tp.drv;
|
||||
PID = tp.PID;
|
||||
kernels = tp.kernels;
|
||||
progress = tp.progress;
|
||||
StartDate = tp.StartDate;
|
||||
ChangeDate = tp.ChangeDate;
|
||||
state = tp.state;
|
||||
}
|
||||
public TestingPackage(TestingPackage p) {
|
||||
SynchronizeFields(p);
|
||||
}
|
||||
public TestingPackage() {
|
||||
}
|
||||
public File getLocalWorkspace() {
|
||||
return new File(Global.PackagesDirectory, String.valueOf(id));
|
||||
}
|
||||
//------------------------
|
||||
@Description("IGNORED")
|
||||
public J package_json=null;
|
||||
public abstract Class getJsonClass();
|
||||
|
||||
public File getJsonFile() {
|
||||
return new File(getLocalWorkspace(), "package_json");
|
||||
}
|
||||
public void saveJson() throws Exception {
|
||||
Utils.jsonToFile(package_json, getJsonFile());
|
||||
}
|
||||
public void readJson() throws Exception {
|
||||
package_json = (J) Utils.jsonFromFile(getJsonFile(), getJsonClass());
|
||||
}
|
||||
public void destructor() {
|
||||
package_json = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
package TestingSystem.DVM.DVMPackage;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Machine.Machine;
|
||||
import GlobalData.Machine.MachineType;
|
||||
import GlobalData.User.User;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.io.File;
|
||||
public class DVMPackage extends TestingPackage {
|
||||
public String PID = ""; //сишная часть.
|
||||
public class DVMPackage extends TestingPackage<DVMPackage_json> {
|
||||
//---
|
||||
public String machine_name = "";
|
||||
public String machine_address = "";
|
||||
@@ -20,23 +14,21 @@ public class DVMPackage extends TestingPackage {
|
||||
public String user_password;
|
||||
public String user_workspace;
|
||||
//---
|
||||
@Description("IGNORE")
|
||||
public DVMPackage_json package_json = null;
|
||||
public DVMPackage(){}
|
||||
public DVMPackage() {
|
||||
}
|
||||
@Override
|
||||
public Class getJsonClass() {
|
||||
return DVMPackage_json.class;
|
||||
}
|
||||
public DVMPackage(DVMPackage p) {
|
||||
super(p);
|
||||
this.SynchronizeFields(p);
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
public void destructor() {
|
||||
package_json = null;
|
||||
}
|
||||
@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;
|
||||
@@ -44,22 +36,10 @@ public class DVMPackage extends TestingPackage {
|
||||
user_workspace = tasksPackage.user_workspace;
|
||||
user_password = tasksPackage.user_password;
|
||||
}
|
||||
public File getLocalWorkspace() {
|
||||
return new File(Global.PackagesDirectory, String.valueOf(id));
|
||||
public Machine getMachine() {
|
||||
return new Machine(machine_name, machine_address, machine_port, MachineType.Server);
|
||||
}
|
||||
public File getJsonFile() {
|
||||
return new File(getLocalWorkspace(), "package_json");
|
||||
}
|
||||
public void saveJson() throws Exception {
|
||||
Utils.jsonToFile(package_json, getJsonFile());
|
||||
}
|
||||
public void readJson() throws Exception {
|
||||
package_json = (DVMPackage_json) Utils.jsonFromFile(getJsonFile(), DVMPackage_json.class);
|
||||
}
|
||||
public Machine getMachine(){
|
||||
return new Machine(machine_name,machine_address,machine_port,MachineType.Server);
|
||||
}
|
||||
public User getUser(){
|
||||
public User getUser() {
|
||||
return new User(user_name, user_password, user_workspace);
|
||||
}
|
||||
}
|
||||
|
||||
20
src/TestingSystem/SAPFOR/SAPFORPackage/SapforPackage.java
Normal file
20
src/TestingSystem/SAPFOR/SAPFORPackage/SapforPackage.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package TestingSystem.SAPFOR.SAPFORPackage;
|
||||
import Common.Constants;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import TestingSystem.DVM.TasksPackage.TasksPackageState;
|
||||
import TestingSystem.SAPFOR.Json.SapforTasksResults_json;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
public class SapforPackage extends TestingPackage {
|
||||
@Description("DEFAULT ''")
|
||||
public String testsNames = "";//имена тестов через ; для отображения
|
||||
//---
|
||||
public int sapforId = Constants.Nan; // так как сапфор на машине.
|
||||
@Description("DEFAULT ''")
|
||||
public String testsIds = "";
|
||||
@Description("DEFAULT ''")
|
||||
public String configurationsIds = "";
|
||||
@Override
|
||||
public Class getJsonClass() {
|
||||
return SapforTasksResults_json.class;
|
||||
}
|
||||
}
|
||||
3
src/TestingSystem/SAPFOR/SapforTestingPlanner.java
Normal file
3
src/TestingSystem/SAPFOR/SapforTestingPlanner.java
Normal file
@@ -0,0 +1,3 @@
|
||||
package TestingSystem.SAPFOR;
|
||||
public class SapforTestingPlanner {
|
||||
}
|
||||
Reference in New Issue
Block a user