public void setValueFor(AmbariServerConfigurationKey ambariServerConfigurationKey, String value) {
    if (ambariServerConfigurationKey.getConfigurationCategory() != getCategory()) {
      throw new IllegalArgumentException(ambariServerConfigurationKey.key() + " is not a valid " + getCategory().getCategoryName());
    }
    configurationMap.put(ambariServerConfigurationKey.key(), value);
  }
Sets the given value for the given configuration

@param ambariServerConfigurationKey
         the configuration key to set the value for
@param value
         the new value

@throws IllegalArgumentException
          in case the supplied configuration does not belong to the
          configuration category of this instance
ambari-server/src/main/java/org/apache/ambari/server/configuration/AmbariServerConfiguration.java