@Transactional
  ServiceConfigVersionResponse applyConfigs(Set<Config> configs, String user, String serviceConfigVersionNote) throws AmbariException{

    List<ClusterConfigEntity> appliedConfigs = new ArrayList<>();
    String serviceName = getServiceForConfigTypes(configs.stream().map(Config::getType).collect(toList()));
    // update the selected flag for every config type
    ClusterEntity clusterEntity = getClusterEntity();
    Collection<ClusterConfigEntity> clusterConfigs = clusterEntity.getClusterConfigEntities();
    for (Config config: configs) {
      for (ClusterConfigEntity clusterConfigEntity : clusterConfigs) {
        // unset for this config type
        if (StringUtils.equals(clusterConfigEntity.getType(), config.getType())) {
          clusterConfigEntity.setSelected(false);

          // unless both the tag and type match, then enable it
          if (StringUtils.equals(clusterConfigEntity.getTag(), config.getTag())) {
            appliedConfigs.add(clusterConfigEntity);
            clusterConfigEntity.setSelected(true);
          }
        }
      }
    }

    clusterDAO.merge(clusterConfigs);

    if (serviceName == null) {
      ArrayList<String> configTypes = new ArrayList<>();
      for (Config config: configs) {
        configTypes.add(config.getType());
      }

      STOMPUpdatePublisher.publish(new ConfigsUpdateEvent(this, appliedConfigs));
      LOG.error("No service found for config types '{}', service config version not created", configTypes);
      return null;
    } else {
      return createServiceConfigVersion(serviceName, user, serviceConfigVersionNote);
    }

  }
Adds Configuration data to the serviceConfigVersionResponse
@param serviceConfigVersionResponse
@param serviceConfigEntity
@return serviceConfigVersionResponse
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java