class BlueprintResourceProvider extends AbstractControllerResourceProvider {

  BlueprintConfigPopulationStrategy decidePopulationStrategy(Map<String, String> configuration) {
    if (configuration != null && !configuration.isEmpty()) {
      String keyEntry = configuration.keySet().iterator().next();
      String[] keyNameTokens = keyEntry.split("/");
      int levels = keyNameTokens.length;
      String propertiesType = keyNameTokens[1];
      if (levels == 2) {
        return new BlueprintConfigPopulationStrategyV1();
      } else if ((levels == 3 && PROPERTIES_PROPERTY_ID.equals(propertiesType))
          || (levels == 4 && PROPERTIES_ATTRIBUTES_PROPERTY_ID.equals(propertiesType))) {
        return new BlueprintConfigPopulationStrategyV2();
      } else {
        throw new IllegalArgumentException(SCHEMA_IS_NOT_SUPPORTED_MESSAGE);
      }
    } else {
      return new BlueprintConfigPopulationStrategyV2();
    }
  }

    BlueprintResourceProvider(AmbariManagementController controller);

}