Skip to content

Commit eb0f3db

Browse files
committed
dbeaver/pro#6759 CLI model
1 parent 3babafa commit eb0f3db

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/model/app/BaseServletApplication.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public static void patchConfigurationWithProperties(
198198
}
199199
}
200200

201+
@NotNull
201202
@Override
202203
public Object start(IApplicationContext context) {
203204
initializeApplicationServices();
@@ -210,8 +211,9 @@ public Object start(IApplicationContext context) {
210211
startServer();
211212
} catch (Exception e) {
212213
log.error(e.getMessage(), e);
214+
return EXIT_ERROR_UNSPECIFIED;
213215
}
214-
return null;
216+
return EXIT_OK;
215217
}
216218

217219
protected abstract void startServer() throws DBException;

server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/server/CBConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,5 @@ public class CBConstants {
9898

9999
public static final String BIND_SESSION_ENABLE = "enable";
100100
public static final String BIND_SESSION_DISABLE = "disable";
101+
public static final String DEFAULT_CLOUD_PROJECT_NAME = "GlobalConfiguration";
101102
}

server/bundles/io.cloudbeaver.server.ce/src/io/cloudbeaver/server/CBApplication.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,10 @@ public String getInfoDetails(DBRProgressMonitor monitor) {
505505
return "";
506506
}
507507

508+
@Nullable
508509
@Override
509510
public String getDefaultProjectName() {
510-
return "GlobalConfiguration";
511+
return CBConstants.DEFAULT_CLOUD_PROJECT_NAME;
511512
}
512513

513514
public boolean isDevelMode() {

0 commit comments

Comments
 (0)