Class Cmi5DetectorPlugin

java.lang.Object
dev.jcputney.elearning.parser.util.detector.Cmi5DetectorPlugin
All Implemented Interfaces:
ModuleTypeDetectorPlugin

public class Cmi5DetectorPlugin extends Object implements ModuleTypeDetectorPlugin
Plugin for detecting cmi5 modules.

This plugin checks for the presence of a cmi5.xml file, which is the standard manifest file for cmi5 modules.

  • Constructor Details

    • Cmi5DetectorPlugin

      public Cmi5DetectorPlugin()
      Default constructor for the cmi5 detector plugin.
  • Method Details

    • getPriority

      public int getPriority()
      Description copied from interface: ModuleTypeDetectorPlugin
      Returns the priority of this plugin.

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

      Specified by:
      getPriority in interface ModuleTypeDetectorPlugin
      Returns:
      the priority of this plugin
    • getName

      public String getName()
      Description copied from interface: ModuleTypeDetectorPlugin
      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").

      Specified by:
      getName in interface ModuleTypeDetectorPlugin
      Returns:
      the name of this plugin
    • detect

      public ModuleType detect(FileAccess fileAccess) throws ModuleDetectionException
      Detects if the provided FileAccess instance contains a cmi5 module.
      Specified by:
      detect in interface ModuleTypeDetectorPlugin
      Parameters:
      fileAccess - The FileAccess instance to check for cmi5 module.
      Returns:
      ModuleType.CMI5 if a cmi5 module is detected, null otherwise.
      Throws:
      ModuleDetectionException - if an error occurs during detection.