no message

This commit is contained in:
2024-10-14 12:14:01 +03:00
parent 3a29898d5f
commit 452c4c7268
466 changed files with 1255 additions and 1100 deletions

View File

@@ -0,0 +1,35 @@
package _VisualDVM.Passes.Server;
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;
@Override
public String getIconPath() {
return "/icons/MultiFiles.png";
}
public CloneServerObject(S server_in, Class<D> d_in) {
super(server_in, d_in);
}
protected abstract Current currentName();
@Override
protected boolean canStart(Object... args) throws Exception {
src=null;
if (!Global.mainModule.Check(Log, currentName()))
return false;
//---------
pk = null;
if (Global.mainModule.getAccount().CheckRegistered(Log)) {
target = d.newInstance();
target.SynchronizeFields(src=(D) Global.mainModule.get(currentName()));
//единственное отличие клона - текущий автор
target.description+=" копия";
target.sender_name = Global.mainModule.getAccount().name;
target.sender_address = Global.mainModule.getAccount().email;
return true;
}
return false;
}
}