Interface ModuleTypeDetectorPlugin

All Known Implementing Classes:
AiccDetectorPlugin, Cmi5DetectorPlugin, ScormDetectorPlugin, XapiDetectorPlugin

public interface ModuleTypeDetectorPlugin
Interface for plugins that detect specific types of eLearning modules.

Implementations of this interface are responsible for detecting a specific type of eLearning module (e.g., SCORM 1.2, SCORM 2004, AICC, cmi5) by examining the structure and manifest files of the module.

Plugins are registered with the ModuleTypeDetector and are called in order of priority until one of them successfully detects a module type.

  • Method Summary

    Modifier and Type
    Method
    Description
    detect(FileAccess fileAccess)
    Attempts to detect if the module is of the type handled by this plugin.
    Returns the name of this plugin.
    int
    Returns the priority of this plugin.
  • Method Details

    • getPriority

      int getPriority()
      Returns the priority of this plugin.

      Plugins with higher priority values are called before plugins with lower priority values.

      Returns:
      the priority of this plugin
    • getName

      String getName()
      Returns the name of this plugin.

      The name should be a descriptive identifier for the plugin, typically indicating the module type it detects (e.g., "SCORM 1.2 Detector", "AICC Detector").

      Returns:
      the name of this plugin
    • detect

      ModuleType detect(FileAccess fileAccess) throws ModuleDetectionException
      Attempts to detect if the module is of the type handled by this plugin.

      This method examines the structure and manifest files of the module to determine if it matches the module type handled by this plugin.

      Parameters:
      fileAccess - the FileAccess implementation to use for accessing module files
      Returns:
      the detected ModuleType if this plugin can detect the module type, or null if this plugin cannot detect the module type
      Throws:
      ModuleDetectionException - if there's an error during the detection process