промежуточный. часть большого рефакторинга, касательно проходов связанных с сервером. Обновлена публикация групп.

This commit is contained in:
2023-11-16 16:20:20 +03:00
parent 3f00d0f300
commit 4545cf2d26
80 changed files with 346 additions and 254 deletions

View File

@@ -1,45 +1,10 @@
package Visual_DVM_2021.Passes.All;
import Common.Current;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
import Common.Global;
import TestingSystem.Group.Group;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.TestingSystemPass;
public class PublishGroup extends TestingSystemPass<Group> {
@Override
public String getIconPath() {
return "/icons/RedAdd.png";
}
@Override
public String getButtonText() {
return "";
}
@Override
protected boolean canStart(Object... args) throws Exception {
if (Current.getAccount().CheckRegistered(Log)) {
target = new Group();
target.genName();
target.sender_name = Current.getAccount().name;
target.sender_address = Current.getAccount().email;
return fillObjectFields();
}
return false;
}
protected boolean fillObjectFields() throws Exception {
return server.db.groups.ShowAddObjectDialog(target);
}
@Override
protected void ServerAction() throws Exception {
Command(new ServerExchangeUnit_2021(ServerCode.PublishObject, "", target));
}
@Override
protected void performFinish() throws Exception {
super.performFinish();
passes.get(PassCode_2021.SynchronizeTests).Do();
}
@Override
protected void showDone() throws Exception {
super.showDone();
server.db.groups.ui_.Show(target.getPK());
import TestingSystem.TestingServer;
import Visual_DVM_2021.Passes.Server.PublishServerObject;
public class PublishGroup extends PublishServerObject<TestingServer, Group> {
public PublishGroup() {
super(Global.testingServer, Group.class);
}
}