public void applyConfiguration(Map<String, String> configuration, BlueprintConfiguration blueprintConfiguration) {
      Map<String, String> configData = new HashMap<>();
      Map<String, Map<String, String>> configAttributes = new HashMap<>();

      if (configuration != null) {
        for (Map.Entry<String, String> entry : configuration.entrySet()) {
          String absolutePropName = entry.getKey();
          String propertyValue = entry.getValue();
          String[] propertyNameTokens = absolutePropName.split("/");

          if (blueprintConfiguration.getType() == null) {
            blueprintConfiguration.setType(propertyNameTokens[0]);
          }

          addProperty(configData, configAttributes, propertyNameTokens, propertyValue);
        }
      }

      blueprintConfiguration.setConfigData(jsonSerializer.toJson(configData));
      blueprintConfiguration.setConfigAttributes(jsonSerializer.toJson(configAttributes));
    }
The structure of blueprints is evolving where multiple resource
structures are to be supported. This class abstracts the population
of configurations which have changed from a map of key-value strings,
to an map containing 'properties' and 'properties_attributes' maps.

Extending classes can determine how they want to populate the
configuration maps depending on input.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java