code: private List<CmsSearchDocumentType> documentTypes() {
  
          CmsSearchManager manager = OpenCms.getSearchManager();
          CmsSearchIndexSource indexsource = manager.getIndexSource(getParamIndexsource());
          List<CmsSearchDocumentType> result;
          if (indexsource != null) {
              List<String> systemDoctypeNames = new ArrayList<String>();
              Iterator<CmsSearchDocumentType> itDocTypes = manager.getDocumentTypeConfigs().iterator();
              while (itDocTypes.hasNext()) {
                  CmsSearchDocumentType docType = itDocTypes.next();
                  systemDoctypeNames.add(docType.getName());
              }
              // accept only the complement of system doctypes to the indexsources doctypes:
              systemDoctypeNames.removeAll(indexsource.getDocumentTypes());
  
              // transform these mere names to real document types...
              result = new ArrayList<CmsSearchDocumentType>(systemDoctypeNames.size());
              Iterator<String> it = systemDoctypeNames.iterator();
              String doctypename = "";
              CmsSearchDocumentType doctype;
              while (it.hasNext()) {
                  doctypename = it.next();
                  if (doctypename != null) {
                      doctype = manager.getDocumentTypeConfig(doctypename);
                      if (doctype != null) {
                          result.add(doctype);
                      }
                  }
              }
          } else {
              result = Collections.emptyList();
              if (LOG.isErrorEnabled()) {
                  LOG.error(Messages.get().getBundle().key(Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, "indexsource"));
              }
          }
          return result;
      }
docs: Returns the systems configured document types that are not assigned
  to the current indexsource (those that may be added).<p>
  
  @return the systems configured document types that are not assigned
  to the current indexsource (those that may be added)