Class LaunchUrlRequiredRule

java.lang.Object
dev.jcputney.elearning.parser.validators.rules.cmi5.LaunchUrlRequiredRule
All Implemented Interfaces:
ValidationRule<Cmi5Manifest>

public class LaunchUrlRequiredRule extends Object implements ValidationRule<Cmi5Manifest>
Validates that a cmi5 course has at least one AU with a launch URL.

According to cmi5 specification, at least one assignable unit (AU) must have a url attribute that serves as the entry point for the course.

See Also:
  • Constructor Details

    • LaunchUrlRequiredRule

      public LaunchUrlRequiredRule()
  • Method Details

    • validate

      public ValidationResult validate(Cmi5Manifest manifest)
      Validates that the course has at least one AU with a non-empty launch URL.
      Specified by:
      validate in interface ValidationRule<Cmi5Manifest>
      Parameters:
      manifest - The cmi5 manifest to validate (must not be null)
      Returns:
      ValidationResult containing any issues found
      Throws:
      IllegalArgumentException - if manifest is null
    • getRuleName

      public String getRuleName()
      Description copied from interface: ValidationRule
      Human-readable name of this rule for logging and debugging.
      Specified by:
      getRuleName in interface ValidationRule<Cmi5Manifest>
      Returns:
      Rule name (e.g., "Resource Reference Validation")
    • getSpecReference

      public String getSpecReference()
      Description copied from interface: ValidationRule
      Specification reference for traceability and documentation. Used to trace validation back to spec requirements.
      Specified by:
      getSpecReference in interface ValidationRule<Cmi5Manifest>
      Returns:
      Spec reference (e.g., "SCORM 1.2 CAM Section 2.3.4")