рефакторинг. переносил текущие объекты в другое место

This commit is contained in:
2024-10-13 22:08:13 +03:00
parent 09b64218bd
commit 6afa2dc892
240 changed files with 1472 additions and 1518 deletions

View File

@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.Server;
import Common.Current_;
import _VisualDVM.Current;
import Common.Database.Objects.riDBObject;
import _VisualDVM.Global;
import _VisualDVM.Repository.RepositoryServer;
public abstract class CloneServerObject<S extends RepositoryServer, D extends riDBObject> extends PublishServerObject<S, D> {
public D src;
@@ -16,18 +17,18 @@ public abstract class CloneServerObject<S extends RepositoryServer, D extends ri
@Override
protected boolean canStart(Object... args) throws Exception {
src=null;
if (!Current_.Check(Log, currentName()))
if (!Global.mainModule.Check(Log, currentName()))
return false;
//---------
pk = null;
if (Current.getAccount().CheckRegistered(Log)) {
if (Global.mainModule.getAccount().CheckRegistered(Log)) {
target = d.newInstance();
target.SynchronizeFields(src=(D) Current_.get(currentName()));
target.SynchronizeFields(src=(D) Global.mainModule.get(currentName()));
//единственное отличие клона - текущий автор
target.description+=" копия";
target.sender_name = Current.getAccount().name;
target.sender_address = Current.getAccount().email;
target.sender_name = Global.mainModule.getAccount().name;
target.sender_address = Global.mainModule.getAccount().email;
return true;
}
return false;