def register_plugin_class(base_class, file_path, class_name):
    """
    Retrieve a register plugin class from the provided file.

    This method also validates that the class implements all the abstract methods
    from the base plugin class.

    :param base_class: Base plugin class.
    :param base_class: ``class``

    :param file_path: File absolute path to the plugin module file.
    :type file_path: ``str``

    :param class_name: Class name of a plugin.
    :type class_name: ``str``
    """
    plugin_dir = os.path.dirname(os.path.realpath(file_path))
    _register_plugin_path(plugin_dir)
    module_name = _get_plugin_module(file_path)

    if module_name is None:
        return None

    spec = importlib.util.spec_from_file_location(module_name, file_path)
    module = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(module)
    klass = getattr(module, class_name, None)

    if not klass:
        raise Exception(
            'Plugin file "%s" doesn\'t expose class named "%s"'
            % (file_path, class_name)
        )

    _register_plugin(base_class, klass)
    return klass

    Retrieve a register plugin class from the provided file.

    This method also validates that the class implements all the abstract methods
    from the base plugin class.

    :param base_class: Base plugin class.
    :param base_class: ``class``

    :param file_path: File absolute path to the plugin module file.
    :type file_path: ``str``

    :param class_name: Class name of a plugin.
    :type class_name: ``str``
    
st2common/st2common/util/loader.py