Class ScormDetectorPlugin

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

public class ScormDetectorPlugin extends Object implements ModuleTypeDetectorPlugin
Plugin for detecting SCORM modules (both 1.2 and 2004 versions).

This plugin checks for the presence of an imsmanifest.xml file, which is the standard manifest file for SCORM modules. If found, it uses the ScormVersionDetector to determine the specific SCORM version.

  • Constructor Details

    • ScormDetectorPlugin

      public ScormDetectorPlugin()
      Default constructor for the SCORM 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 the SCORM module type by checking for the presence of the SCORM manifest file.
      Specified by:
      detect in interface ModuleTypeDetectorPlugin
      Parameters:
      fileAccess - An instance of FileAccess for reading files in the module package.
      Returns:
      The detected SCORM module type, or null if not a SCORM module.
      Throws:
      ModuleDetectionException - If an error occurs during detection.