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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user