private ConfigurationItem constructConfigurationOptions() {
    String[] categoryHierarchy = new String[1];
    categoryHierarchy[0] = this.translatorCategory;
    List<ConfigurationItem> configItems = null;
    try {
      configItems = configurationManager.getConfiguration(categoryHierarchy, true);
    } catch (ConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    logger.debug("Size of configItem = " + (configItems != null ? configItems.size() : 0));
    if (config == null) {
      return null;
    }

    ConfigurationItem configItem;
    if (configItems != null) {
      configItem = configItems.get(0);
    } else {
      configItem = new ConfigurationItem(categoryHierarchy);
    }
    configItem.clearNameValuePairs();
    for (Map.Entry<String, ConfigurationOption> entry : config.entrySet()) {
      String key = entry.getKey();
      ConfigurationOption option = entry.getValue();
      if (key.equalsIgnoreCase("builtin")) {
        continue;
      }
      String optionName = option.getName();
      Object optionValue = option.getValue();
      if (optionValue.getClass().getName().equalsIgnoreCase("java.lang.String")) {
        optionValue = this.rcps.getString(key);
      } else if (optionValue.getClass().getName().equalsIgnoreCase("java.lang.Double")) {
        optionValue = this.rcps.getDouble(key);
      } else if (optionValue.getClass().getName().equalsIgnoreCase("java.lang.Integer")) {
        optionValue = this.rcps.getInt(key);
      } else if (optionValue.getClass().getName().equalsIgnoreCase("java.lang.Boolean")) {
        optionValue = this.rcps.getBoolean(key);
      } else {
        logger.debug(
            "Error saving configuration option, "
                + optionName
                + ", of type "
                + optionValue.getClass().getName());
      }
      logger.debug("Setting " + optionName + " to " + optionValue.toString());
      ConfigurationItem.NameValuePair nv = configItem.new NameValuePair(optionName, optionValue);
      nv.setConfigType(ConfigurationItem.ConfigurationType.SingleValue);
      configItem.addNameValuePair(nv);
    }
    return configItem;
  }