code: public void addPreference(
          String name,
          String value,
          String widget,
          String widgetConfig,
          String niceName,
          String description,
          String ruleRegex,
          String error,
          String tab) {
  
          CmsXmlContentProperty prop = new CmsXmlContentProperty(
              name,
              "string",
              widget,
              widgetConfig,
              ruleRegex,
              null,
              null,
              niceName,
              description,
              error,
              null);
          CmsPreferenceData pref = new CmsPreferenceData(name, value, prop, tab);
          m_preferenceData.add(pref);
      }
docs: Adds a preference.<p>
  
  @param name the name of the preference
  @param value the default value
  @param widget the widget to use for the preference
  @param widgetConfig the widget configuration
  @param niceName the nice name of the preference
  @param description the description of the preference
  @param ruleRegex the regex used for validation
  @param error the validation error message
  @param tab the tab to display the preference on