рефакторинг взаимодействия с бд сервера. был индийский код при альтернативной базе на сервере компонент
This commit is contained in:
@@ -13,7 +13,7 @@ public class DeleteRemoteWorkspace extends ComponentsServerPass<SubscriberWorksp
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (Global.componentsServer.credentials_db.workspaces.getUI().CheckCurrent(Log)) {
|
||||
target = Global.componentsServer.credentials_db.workspaces.getUI().getCurrent();
|
||||
return SendRequest(ServerCode.DeleteSubscriberWorkspace, "",
|
||||
return SendRequest(ServerCode.DeleteObjectByPK, "credentials",
|
||||
new Pair<>(target.getClass(), target.getPK()));
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -16,8 +16,7 @@ public class DeleteUserAccount extends DeleteServerObject<ComponentsServer, User
|
||||
return server.credentials_db;
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new SafeServerExchangeUnit(ServerCode.DeleteUserAccount, "",
|
||||
new Pair<>(target.getClass(), target.getPK())));
|
||||
protected String getDBName() {
|
||||
return "credentials";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class EditUserAccount extends EditServerObject<ComponentsServer, UserAcco
|
||||
return Global.componentsServer.credentials_db;
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new SafeServerExchangeUnit(ServerCode.EditUserAccount, "", target));
|
||||
protected String getDBName() {
|
||||
return "credentials";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ public class PublishRemoteWorkspace extends ComponentsServerPass<SubscriberWorks
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = (SubscriberWorkspace) args[0];
|
||||
return SendRequest(ServerCode.PublishSubscriberWorkspace, "", target);
|
||||
return SendRequest(ServerCode.PublishObject, "credentials", target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,7 @@ public class PublishUserAccount extends PublishServerObject<ComponentsServer, Us
|
||||
return server.credentials_db;
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new SafeServerExchangeUnit(ServerCode.PublishUserAccount, "", target));
|
||||
pk = server_response.object;
|
||||
protected String getDBName() {
|
||||
return "credentials";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user