mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-04 15:35:43 +00:00
[AB-xxx] adding command to view system configuration per server
adding auto complete to setConfig command key parameter
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package dev.sheldan.abstracto.core.models.template.commands;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
public class GetConfigModel {
|
||||
private List<ConfigValue> values;
|
||||
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
public static class ConfigValue {
|
||||
private String key;
|
||||
@Builder.Default
|
||||
private Boolean hasConcreateValue = false;
|
||||
private Long longValue;
|
||||
private String stringValue;
|
||||
private Double doubleValue;
|
||||
private ConfigValue defaultValue;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package dev.sheldan.abstracto.core.service.management;
|
||||
|
||||
import dev.sheldan.abstracto.core.models.database.AConfig;
|
||||
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||
import java.util.List;
|
||||
|
||||
public interface ConfigManagementService {
|
||||
AConfig setOrCreateStringValue(Long serverId, String name, String value);
|
||||
@@ -11,6 +12,7 @@ public interface ConfigManagementService {
|
||||
AConfig createConfig(Long serverId, String name, Double value);
|
||||
AConfig createConfig(Long serverId, String name, Long value);
|
||||
AConfig loadOrCreateIfNotExists(Long serverId, String name, String value);
|
||||
List<AConfig> loadForServer(Long serverId);
|
||||
AConfig loadOrCreateIfNotExists(Long serverId, String name, Long value);
|
||||
AConfig loadOrCreateIfNotExists(Long serverId, String name, Double value);
|
||||
AConfig loadConfig(Long serverId, String name);
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package dev.sheldan.abstracto.core.service.management;
|
||||
|
||||
import dev.sheldan.abstracto.core.models.property.SystemConfigProperty;
|
||||
import java.util.List;
|
||||
|
||||
public interface DefaultConfigManagementService {
|
||||
SystemConfigProperty getDefaultConfig(String key);
|
||||
boolean configKeyExists(String key);
|
||||
|
||||
List<String> getConfigKeys();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user