class CloudAppConfigurationService {

    public Collection<CloudAppConfiguration> loadAll() {
        if (!regCenter.isExisted(CloudAppConfigurationNode.ROOT)) {
            return Collections.emptyList();
        }
        List<String> appNames = regCenter.getChildrenKeys(CloudAppConfigurationNode.ROOT);
        Collection<CloudAppConfiguration> result = new ArrayList<>(appNames.size());
        for (String each : appNames) {
            Optional<CloudAppConfiguration> config = load(each);
            if (config.isPresent()) {
                result.add(config.get());
            }
        }
        return result;
    }

}