package _VisualDVM.Passes.Server; import Common.Database.Objects.DBObject; import Common.Database.Objects.riDBObject; import _VisualDVM.Global; import _VisualDVM.Repository.RepositoryServer; import _VisualDVM.Repository.Server.ServerCode; import _VisualDVM.Repository.Server.ServerExchangeUnit_2021; public class PublishServerObject extends ServerObjectPass { public Object pk = null; public PublishServerObject(S server_in, Class d_in) { super(server_in, d_in); } @Override public String getIconPath() { return "/icons/RedAdd.png"; } //-- @Override protected boolean canStart(Object... args) throws Exception { pk = null; if (Global.mainModule.getAccount().CheckRegistered(Log)) { target = d.newInstance(); if (target instanceof riDBObject) { riDBObject rTarget = (riDBObject) target; rTarget.sender_name = Global.mainModule.getAccount().name; rTarget.sender_address = Global.mainModule.getAccount().email; } return fillObjectFields(); } return false; } protected String getEmail(){return null;} //-- @Override protected void ServerAction() throws Exception { Command(new ServerExchangeUnit_2021(ServerCode.PublishObject, getEmail(), target)); pk = response.object; } @Override protected void showDone() throws Exception { super.showDone(); getDb().tables.get(d).ui_.Show(pk); } }