private ConfigurationStrategy decidePopulationStrategy(Map<String, String> configuration) {
    if (configuration != null && !configuration.isEmpty()) {
      String keyEntry = configuration.keySet().iterator().next();
      List<String> keyNameTokens = splitConfigurationKey(keyEntry);

      if (isKeyInLegacyFormat(keyNameTokens)) {
        return new ConfigurationStrategyV1();
      }
      else if (isKeyInNewFormat(keyNameTokens)) {
        return new ConfigurationStrategyV2();
      }
      else {
        throw new IllegalArgumentException(SCHEMA_IS_NOT_SUPPORTED_MESSAGE);
      }
    }
    else {
      return new ConfigurationStrategyV2();
    }
  }
Creates a configuration instance from user provided properties.
Supports both forms of configuration syntax.
todo: document both forms here
ambari-server/src/main/java/org/apache/ambari/server/topology/ConfigurationFactory.java