parameters: (module_name, class_name)
docstring: register a class in document_class_registry without overwriting
    existing records
docstring_summary: register a class in document_class_registry without overwriting
    existing records
docstring_tokens: register a class in document_class_registry without overwriting existing records
function: def registerDocumentClass(module_name, class_name):
    """
    register a class in document_class_registry without overwriting
    existing records
    """
    old_value = document_class_registry.get(class_name)
    new_value = "%s.%s" % (module_name, class_name)
  
    if old_value:
      if class_name == 'CategoryTool':
        if module_name == 'Products.CMFCategory.CategoryTool':
          LOG('Utils', WARNING,
              "Ignoring replacement of %s by %s" % (old_value, new_value))
          return
        assert module_name == 'Products.ERP5.Tool.CategoryTool', module_name
        LOG('Utils', WARNING, "Replacing %s by %s" % (old_value, new_value))
      else:
        raise Exception("Class %s and %s from different products have the "
                        "same name" % (old_value, new_value))
    document_class_registry[class_name] = new_value
function_tokens: def registerDocumentClass ( module_name , class_name ) : old_value = document_class_registry . get ( class_name ) new_value = "%s.%s" % ( module_name , class_name ) if old_value : if class_name == 'CategoryTool' : if module_name == 'Products.CMFCategory.CategoryTool' : LOG ( 'Utils' , WARNING , "Ignoring replacement of %s by %s" % ( old_value , new_value ) ) return assert module_name == 'Products.ERP5.Tool.CategoryTool' , module_name LOG ( 'Utils' , WARNING , "Replacing %s by %s" % ( old_value , new_value ) ) else : raise Exception ( "Class %s and %s from different products have the " "same name" % ( old_value , new_value ) ) document_class_registry [ class_name ] = new_value