package Visual_DVM_2021.Passes.Server; import Common.Current; import Common.Database.riDBObject; import Repository.RepositoryServer; public class PublishServerObject extends ServerObjectPass { protected 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 (Current.getAccount().CheckRegistered(Log)) { target = d.newInstance(); target.sender_name = Current.getAccount().name; target.sender_address = Current.getAccount().email; return fillObjectFields(); } return false; } //-- @Override protected void ServerAction() throws Exception { PublishObject(target); pk = response.object; } @Override protected void showDone() throws Exception { super.showDone(); getDb().tables.get(d).ui_.Show(pk); } }