no message
This commit is contained in:
@@ -6,6 +6,7 @@ import Common.Database.iDBObject;
|
||||
import Common.Global;
|
||||
import Common.GlobalProperties;
|
||||
import Common.Utils.Utils;
|
||||
import TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -32,6 +33,14 @@ public class MachineProcess extends iDBObject {
|
||||
public MachineProcess(MachineProcess p) {
|
||||
SynchronizeFields(p);
|
||||
}
|
||||
public MachineProcess(DVMPackage p) {
|
||||
machineAddress = p.machine_address;
|
||||
machinePort = p.machine_port;
|
||||
userName = p.user_name;
|
||||
userPassword = p.user_password;
|
||||
userWorkspace = p.user_workspace;
|
||||
testingSystemRoot = Global.Home;
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
@@ -43,9 +52,18 @@ public class MachineProcess extends iDBObject {
|
||||
userWorkspace = p.userWorkspace;
|
||||
testingSystemRoot = p.testingSystemRoot;
|
||||
}
|
||||
public String getUniqueKey(){
|
||||
Vector<String> res = new Vector<>();
|
||||
res.add(machineAddress);
|
||||
res.add(String.valueOf(machinePort));
|
||||
res.add(userName);
|
||||
res.add(userWorkspace);
|
||||
return String.join("_", res);
|
||||
}
|
||||
public File getWorkspace() {
|
||||
return new File(Global.MachinesDirectory, String.valueOf(id));
|
||||
}
|
||||
|
||||
public File getAbortedFile() {
|
||||
return new File(getWorkspace(), Constants.ABORTED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user