[AB-82] adding feature mode to make it configurable whether or not the youtube video will show details or not

adding convenience method to config service
This commit is contained in:
Sheldan
2021-03-29 03:02:46 +02:00
parent 8a8e6b2347
commit 8c026d3547
7 changed files with 51 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import dev.sheldan.abstracto.core.models.database.AConfig;
import dev.sheldan.abstracto.core.models.property.SystemConfigProperty;
import dev.sheldan.abstracto.core.service.management.ConfigManagementService;
import dev.sheldan.abstracto.core.service.management.DefaultConfigManagementService;
import org.apache.commons.lang3.BooleanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -73,6 +74,11 @@ public class ConfigServiceBean implements ConfigService {
return config.getLongValue();
}
@Override
public Boolean getBooleanValueOrConfigDefault(String name, Long serverId) {
return BooleanUtils.toBoolean(getStringValueOrConfigDefault(name, serverId));
}
@Override
public void setDoubleValue(String name, Long serverId, Double value) {
if(configManagementService.configExists(serverId, name)) {