private final ConnectionSupplier connectionSupplier;
private final AtomicBoolean withCurrent = new AtomicBoolean();
private final AtomicBoolean withDefaults = new AtomicBoolean();
+ private final AtomicBoolean withSortOrder = new AtomicBoolean();
+ private final AtomicBoolean withExpertFlag = new AtomicBoolean();
+ private final AtomicBoolean withForceWriteFlag = new AtomicBoolean();
public GetConfigCommandImpl(ExecutorService threadPool, ConnectionSupplier connectionSupplier) {
this.threadPool = MoreExecutors.listeningDecorator(threadPool);
}
@Override
+ public GetConfigCommand withSortOrder() {
+ withSortOrder.set(true);
+ return this;
+ }
+
+ @Override
+ public GetConfigCommand withExpertFlag() {
+ withExpertFlag.set(true);
+ return this;
+ }
+
+ @Override
+ public GetConfigCommand withForceWriteFlag() {
+ withForceWriteFlag.set(true);
+ return this;
+ }
+
+ @Override
public ListenableFuture<ConfigData> execute() {
return threadPool.submit(this::executeDialog);
}
GetConfig getConfig = new GetConfig(new RandomIdentifierGenerator().generate());
getConfig.setWithCurrent(withCurrent.get());
getConfig.setWithDefaults(withDefaults.get());
+ getConfig.setWithSortOrder(withSortOrder.get());
+ getConfig.setWithExpertFlag(withExpertFlag.get());
+ getConfig.setWithForceWriteFlag(withForceWriteFlag.get());
try (GetConfigDialog getConfigDialog = new GetConfigDialog()) {
return getConfigDialog.send(getConfig).get();
}