Class ScormDetectorPlugin

java.lang.Object
dev.jcputney.elearning.parser.impl.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()
      Retrieves the priority of this detector plugin.
      Specified by:
      getPriority in interface ModuleTypeDetectorPlugin
      Returns:
      the priority value as an integer, where a higher value indicates a higher priority.
    • getName

      public String getName()
      Retrieves the name of this detector plugin.
      Specified by:
      getName in interface ModuleTypeDetectorPlugin
      Returns:
      the name of the detector plugin as a String.
    • 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.