2023-09-17 22:13:42 +03:00
|
|
|
package Visual_DVM_2021.Passes.All;
|
|
|
|
|
import Common.Current;
|
|
|
|
|
import Repository.Server.ServerCode;
|
|
|
|
|
import Repository.Server.ServerExchangeUnit_2021;
|
2023-09-21 20:55:14 +03:00
|
|
|
import SapforTestingSystem.SapforConfiguration.SapforConfiguration;
|
2023-09-17 22:13:42 +03:00
|
|
|
import Visual_DVM_2021.Passes.PassCode_2021;
|
2023-11-16 16:20:20 +03:00
|
|
|
import Visual_DVM_2021.Passes.Server.TestingSystemPass;
|
2023-09-17 22:13:42 +03:00
|
|
|
public class PublishSapforConfiguration extends TestingSystemPass<SapforConfiguration> {
|
|
|
|
|
@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 SapforConfiguration();
|
|
|
|
|
target.genName();
|
|
|
|
|
target.sender_name = Current.getAccount().name;
|
|
|
|
|
target.sender_address = Current.getAccount().email;
|
|
|
|
|
return server.db.sapforConfigurations.ShowAddObjectDialog(target);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@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.sapforConfigurations.ui_.Show(target.getPK());
|
|
|
|
|
}
|
|
|
|
|
}
|