Files
VisualSapfor/src/SapforTestingSystem/Json/SapforVersion_json.java

32 lines
1.0 KiB
Java
Raw Normal View History

2023-09-21 20:55:14 +03:00
package SapforTestingSystem.Json;
2023-10-30 22:37:03 +03:00
import Common.Global;
import Common.Utils.Utils;
2023-09-17 22:13:42 +03:00
import com.google.gson.annotations.Expose;
2023-10-30 22:37:03 +03:00
import java.io.File;
import java.io.Serializable;
2023-10-30 22:37:03 +03:00
import java.nio.file.Paths;
public class SapforVersion_json implements Serializable {
2023-09-17 22:13:42 +03:00
@Expose
public String version = "";
@Expose
public String description = "";
public SapforVersion_json(String version_in, String description_in) {
version = version_in;
description = description_in;
}
2023-10-29 01:03:37 +03:00
public SapforVersion_json(String root_in, String version_in, String description_in) {
version = version_in.substring(root_in.length() + 1);
description = description_in;
}
2023-10-30 22:37:03 +03:00
@Override
public String toString() {
return Home.getName()+ " : "+ Utils.Brackets(description);
}
public File Home = null;
public void initHome(File configurationRoot) {
String relativePath = Global.isWindows ? Utils.toW(version) : version;
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
}
2023-09-17 22:13:42 +03:00
}