class AmbariServerConfigurationHandler extends RootServiceComponentConfigurationHandler {

  @Override
  public Map<String, RootServiceComponentConfiguration> getComponentConfigurations(String categoryName) {
    Map<String, RootServiceComponentConfiguration> configurations = null;

    List<AmbariConfigurationEntity> entities = (categoryName == null)
        ? ambariConfigurationDAO.findAll()
        : ambariConfigurationDAO.findByCategory(categoryName);

    if (entities != null) {
      configurations = new HashMap<>();
      for (AmbariConfigurationEntity entity : entities) {
        String category = entity.getCategoryName();
        RootServiceComponentConfiguration configuration = configurations.get(category);
        if (configuration == null) {
          configuration = new RootServiceComponentConfiguration();
          configurations.put(category, configuration);
        }

        configuration.addProperty(entity.getPropertyName(), entity.getPropertyValue());
        if (categoryName != null) {
          configuration.addPropertyType(entity.getPropertyName(), AmbariServerConfigurationUtils.getConfigurationPropertyTypeName(categoryName, entity.getPropertyName()));
        }
      }
    }

    return configurations;
  }

  @Inject  AmbariServerConfigurationHandler(AmbariConfigurationDAO ambariConfigurationDAO, AmbariEventPublisher publisher, Configuration ambariConfiguration);

}