Class TitleRequiredRule
java.lang.Object
dev.jcputney.elearning.parser.validators.rules.cmi5.TitleRequiredRule
- All Implemented Interfaces:
ValidationRule<Cmi5Manifest>
Validates that a cmi5 course has a title.
According to cmi5 specification, the title element in the course is required and must not be empty.
This rule defers validation when the course is null, as that is handled by
CourseRequiredRule.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionHuman-readable name of this rule for logging and debugging.Specification reference for traceability and documentation.validate(Cmi5Manifest manifest) Validates that the course has a non-empty title.
-
Constructor Details
-
TitleRequiredRule
public TitleRequiredRule()
-
-
Method Details
-
validate
Validates that the course has a non-empty title.- Specified by:
validatein interfaceValidationRule<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
Description copied from interface:ValidationRuleHuman-readable name of this rule for logging and debugging.- Specified by:
getRuleNamein interfaceValidationRule<Cmi5Manifest>- Returns:
- Rule name (e.g., "Resource Reference Validation")
-
getSpecReference
Description copied from interface:ValidationRuleSpecification reference for traceability and documentation. Used to trace validation back to spec requirements.- Specified by:
getSpecReferencein interfaceValidationRule<Cmi5Manifest>- Returns:
- Spec reference (e.g., "SCORM 1.2 CAM Section 2.3.4")
-