2024-10-14 12:14:01 +03:00
|
|
|
package _VisualDVM.Passes.All;
|
2024-10-13 23:55:03 +03:00
|
|
|
import _VisualDVM.Global;
|
2024-10-14 15:19:13 +03:00
|
|
|
import _VisualDVM.Passes.PassCode;
|
|
|
|
|
import _VisualDVM.Passes.Server.ComponentsRepositoryPass;
|
2024-10-09 22:21:57 +03:00
|
|
|
import _VisualDVM.Repository.Server.ServerCode;
|
|
|
|
|
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
|
|
|
|
import _VisualDVM.Repository.Subscribes.Subscriber;
|
2023-09-17 22:13:42 +03:00
|
|
|
public class AddSubscriber extends ComponentsRepositoryPass<Subscriber> {
|
|
|
|
|
@Override
|
|
|
|
|
public String getIconPath() {
|
2024-10-15 16:58:20 +03:00
|
|
|
return "/Common/icons/RedAdd.png";
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String getButtonText() {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean canStart(Object... args) throws Exception {
|
|
|
|
|
target = new Subscriber();
|
|
|
|
|
return fillObjectFields();
|
|
|
|
|
}
|
|
|
|
|
protected boolean fillObjectFields() throws Exception {
|
|
|
|
|
return server.db.subscribers.ShowAddObjectDialog(target);
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void ServerAction() throws Exception {
|
|
|
|
|
Command(new ServerExchangeUnit_2021(ServerCode.PublishObject, "", target));
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void performFinish() throws Exception {
|
|
|
|
|
super.performFinish();
|
2024-10-13 23:55:03 +03:00
|
|
|
Global.mainModule.getPass(PassCode.SynchronizeBugReports).Do();
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void showDone() throws Exception {
|
|
|
|
|
super.showDone();
|
|
|
|
|
server.db.subscribers.ui_.Show(target.getPK());
|
|
|
|
|
}
|
|
|
|
|
}
|