Search in sources :

Example 1 with ConfigKey

use of com.cloud.framework.config.ConfigKey in project cosmic by MissionCriticalCloud.

the class ConfigurationServerImpl method getConfigListByScope.

@Override
public List<ConfigurationVO> getConfigListByScope(final String scope, final Long resourceId) {
    // Getting the list of parameters defined at the scope
    final Set<ConfigKey<?>> configList = _configDepot.getConfigListByScope(scope);
    final List<ConfigurationVO> configVOList = new ArrayList<>();
    for (final ConfigKey<?> param : configList) {
        final ConfigurationVO configVo = _configDao.findByName(param.toString());
        configVo.setValue(_configDepot.get(param.toString()).valueIn(resourceId).toString());
        configVOList.add(configVo);
    }
    return configVOList;
}
Also used : ConfigKey(com.cloud.framework.config.ConfigKey) ConfigurationVO(com.cloud.framework.config.impl.ConfigurationVO) ArrayList(java.util.ArrayList)

Aggregations

ConfigKey (com.cloud.framework.config.ConfigKey)1 ConfigurationVO (com.cloud.framework.config.impl.ConfigurationVO)1 ArrayList (java.util.ArrayList)1