no message
This commit is contained in:
56
src/TestingSystem/Common/Test/Test.java
Normal file
56
src/TestingSystem/Common/Test/Test.java
Normal file
@@ -0,0 +1,56 @@
|
||||
package TestingSystem.Common.Test;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.riDBObject;
|
||||
import Common.Global;
|
||||
import Common.UI.UI;
|
||||
import GlobalData.User.UserState;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.io.File;
|
||||
public class Test extends riDBObject {
|
||||
@Description("DEFAULT 1")
|
||||
public int dim = 1; //размерность теста. для удобства пусть будет и внешним полем.
|
||||
@Description("DEFAULT ''")
|
||||
public String args = ""; //аргументы командной строки. на всякий случай поле зарезервирую. пусть будут.
|
||||
@Description("DEFAULT -1")
|
||||
public int group_id = Constants.Nan;
|
||||
@Description("DEFAULT 'initial'")
|
||||
public UserState state = UserState.initial; //загружен ли тестовый проект.
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
Test t = (Test) src;
|
||||
dim = t.dim;
|
||||
args = t.args;
|
||||
group_id = t.group_id;
|
||||
}
|
||||
public Test(Test test) {
|
||||
this.SynchronizeFields(test);
|
||||
}
|
||||
public Test() {
|
||||
}
|
||||
@Override
|
||||
public void select(boolean flag) {
|
||||
super.select(flag);
|
||||
if (Current.hasUI())
|
||||
UI.getMainWindow().ShowCheckedTestsCount();
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Current.HasGroup() && (Current.getGroup().id == group_id);
|
||||
}
|
||||
//-
|
||||
public File getArchive() {
|
||||
return new File(Global.TestsDirectory, id + ".zip");
|
||||
}
|
||||
//-
|
||||
public File getServerPath() {
|
||||
return new File(Global.TestsDirectory, String.valueOf(id));
|
||||
}
|
||||
public File getHomePath() {
|
||||
return new File(Global.visualiser.getWorkspace(), String.valueOf(id));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user