Add method to include data types in config data
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / quelaton / GetConfigCommandImpl.java
index e35fdec..c2095b3 100644 (file)
@@ -27,6 +27,9 @@ public class GetConfigCommandImpl implements GetConfigCommand {
        private final AtomicBoolean withSortOrder = new AtomicBoolean();
        private final AtomicBoolean withExpertFlag = new AtomicBoolean();
        private final AtomicBoolean withForceWriteFlag = new AtomicBoolean();
+       private final AtomicBoolean withShortDescription = new AtomicBoolean();
+       private final AtomicBoolean withLongDescription = new AtomicBoolean();
+       private final AtomicBoolean withDataTypes = new AtomicBoolean();
 
        public GetConfigCommandImpl(ExecutorService threadPool, ConnectionSupplier connectionSupplier) {
                this.threadPool = MoreExecutors.listeningDecorator(threadPool);
@@ -64,6 +67,24 @@ public class GetConfigCommandImpl implements GetConfigCommand {
        }
 
        @Override
+       public GetConfigCommand withShortDescription() {
+               withShortDescription.set(true);
+               return this;
+       }
+
+       @Override
+       public GetConfigCommand withLongDescription() {
+               withLongDescription.set(true);
+               return this;
+       }
+
+       @Override
+       public GetConfigCommand withDataTypes() {
+               withDataTypes.set(true);
+               return this;
+       }
+
+       @Override
        public ListenableFuture<ConfigData> execute() {
                return threadPool.submit(this::executeDialog);
        }
@@ -75,6 +96,9 @@ public class GetConfigCommandImpl implements GetConfigCommand {
                getConfig.setWithSortOrder(withSortOrder.get());
                getConfig.setWithExpertFlag(withExpertFlag.get());
                getConfig.setWithForceWriteFlag(withForceWriteFlag.get());
+               getConfig.setWithShortDescription(withShortDescription.get());
+               getConfig.setWithLongDescription(withLongDescription.get());
+               getConfig.setWithDataTypes(withDataTypes.get());
                try (GetConfigDialog getConfigDialog = new GetConfigDialog()) {
                        return getConfigDialog.send(getConfig).get();
                }