List<Map<String, Map<String, Object>>> populateConfigurationList(
      Collection<? extends BlueprintConfiguration> configurations) throws NoSuchResourceException {

    List<Map<String, Map<String, Object>>> listConfigurations = new ArrayList<>();
    for (BlueprintConfiguration config : configurations) {
      Map<String, Map<String, Object>> mapConfigurations = new HashMap<>();
      Map<String, Object> configTypeDefinition = new HashMap<>();
      String type = config.getType();

      if(config instanceof BlueprintConfigEntity) {
        Map<String, String> properties = jsonSerializer.<Map<String, String>>fromJson(
            config.getConfigData(), Map.class);

        StackEntity stack = ((BlueprintConfigEntity)config).getBlueprintEntity().getStack();
        StackInfo metaInfoStack;

        try {
          metaInfoStack = ambariMetaInfo.getStack(stack.getStackName(), stack.getStackVersion());
        } catch (AmbariException e) {
          throw new NoSuchResourceException(e.getMessage());
        }

        Map<org.apache.ambari.server.state.PropertyInfo.PropertyType, Set<String>> propertiesTypes =
            metaInfoStack.getConfigPropertiesTypes(type);

        SecretReference.replacePasswordsWithReferences(propertiesTypes, properties, type, -1l);

        configTypeDefinition.put(PROPERTIES_PROPERTY_ID, properties);
      } else {
        Map<String, Object> properties = jsonSerializer.<Map<String, Object>>fromJson(
            config.getConfigData(), Map.class);
        configTypeDefinition.put(PROPERTIES_PROPERTY_ID, properties);
      }

      Map<String, Map<String, String>> attributes = jsonSerializer.<Map<String, Map<String, String>>>fromJson(
          config.getConfigAttributes(), Map.class);
      if (attributes != null && !attributes.isEmpty()) {
        configTypeDefinition.put(PROPERTIES_ATTRIBUTES_PROPERTY_ID, attributes);
      }
      mapConfigurations.put(type, configTypeDefinition);
      listConfigurations.add(mapConfigurations);
    }

    return listConfigurations;
  }
Populate a list of configuration property maps from a collection of configuration entities.

@param configurations  collection of configuration entities

@return list of configuration property maps
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java