mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-156 Connection state function implementation
This commit is contained in:
+3
@@ -66,6 +66,9 @@ public interface DBWServiceCore extends DBWService {
|
||||
///////////////////////////////////////////
|
||||
// Connections
|
||||
|
||||
@WebAction
|
||||
WebConnectionInfo getConnectionState(WebSession webSession, String connectionId) throws DBWebException;
|
||||
|
||||
@WebAction
|
||||
WebConnectionInfo openConnection(WebSession webSession, WebConnectionConfig connectionConfig) throws DBWebException;
|
||||
|
||||
|
||||
+1
@@ -62,6 +62,7 @@ public class WebServiceBindingCore extends WebServiceBindingBase<DBWServiceCore>
|
||||
.dataFetcher("touchSession", env -> getService(env).touchSession(GraphQLEndpoint.getServletRequest(env)))
|
||||
.dataFetcher("changeSessionLanguage", env -> getService(env).changeSessionLanguage(getWebSession(env), env.getArgument("locale")))
|
||||
|
||||
.dataFetcher("connectionState", env -> getService(env).getConnectionState(getWebSession(env), env.getArgument("id")))
|
||||
.dataFetcher("openConnection", env -> getService(env).openConnection(getWebSession(env), getConnectionConfig(env)))
|
||||
.dataFetcher("createConnection", env -> getService(env).createConnection(getWebSession(env), getConnectionConfig(env)))
|
||||
.dataFetcher("testConnection", env -> getService(env).testConnection(getWebSession(env), getConnectionConfig(env)))
|
||||
|
||||
+5
@@ -123,6 +123,11 @@ public class WebServiceCore implements DBWServiceCore {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebConnectionInfo getConnectionState(WebSession webSession, String connectionId) throws DBWebException {
|
||||
return webSession.getWebConnectionInfo(connectionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebConnectionInfo openConnection(WebSession webSession, WebConnectionConfig config) throws DBWebException {
|
||||
String dataSourceId = config.getDataSourceId();
|
||||
|
||||
Reference in New Issue
Block a user