code: public Field createField(String name, String content) {
  
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(content)) {
              content = getDefaultValue();
          }
          if (content != null) {
              final FieldType ft = new FieldType();
              if (isIndexed()) {
                  if (isTokenizedAndIndexed()) {
                      ft.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
                      ft.setTokenized(true);
                  } else {
                      ft.setIndexOptions(IndexOptions.DOCS);
                      ft.setTokenized(false);
                  }
              }
              ft.setStored(isStored() || isCompressed());
              Field result = new Field(name, content, ft);
              return result;
          }
          return null;
      }
docs: Creates a field with the given name from the configuration and the provided content.<p>
  
  If no valid content is provided (that is the content is either <code>null</code> or
  only whitespace), then no field is created and <code>null</code> is returned.<p>
  
  @param name the name of the field to create
  @param content the content to create the field with
  
  @return a field with the given name from the configuration and the provided content