Interface ModuleTypeDetector
- All Known Implementing Classes:
DefaultModuleTypeDetector
public interface ModuleTypeDetector
Interface for detecting the type of eLearning module.
This interface defines the contract for classes that detect the type of eLearning module based on the files present in the file system. Implementations should examine the structure and manifest files of the module to determine its type.
The detection process typically uses a plugin system where each plugin is responsible for detecting a specific module type. Plugins are called in order of priority until one of them successfully detects a module type.
-
Method Summary
Modifier and TypeMethodDescriptionDetects the type of eLearning module based on the files present in the file system.Returns an unmodifiable list of the registered plugins.voidRegisters a module type detector plugin.booleanUnregisters a module type detector plugin.
-
Method Details
-
registerPlugin
Registers a module type detector plugin.- Parameters:
plugin- the plugin to register- Throws:
IllegalArgumentException- if the plugin is null
-
unregisterPlugin
Unregisters a module type detector plugin.- Parameters:
plugin- the plugin to unregister- Returns:
- true if the plugin was unregistered, false if it wasn't registered
- Throws:
IllegalArgumentException- if the plugin is null
-
getPlugins
List<ModuleTypeDetectorPlugin> getPlugins()Returns an unmodifiable list of the registered plugins.- Returns:
- an unmodifiable list of the registered plugins
-
detectModuleType
Detects the type of eLearning module based on the files present in the file system.This method calls each registered plugin in order of priority until one of them successfully detects a module type.
- Returns:
- the detected
ModuleType - Throws:
ModuleDetectionException- if the module type cannot be detected, or if there's an error during the detection process
-