Class ParallelValidator
java.lang.Object
com.csse3200.game.cutscene.validators.actionvalidators.ParallelValidator
- All Implemented Interfaces:
ActionValidator
Implements the
ActionValidator
interface for concrete implementation of the
validate
method.
Validates parallel events against the following conditions:
action.actions
must be a non-null list ofActionDTO
- Every child action must pass its own validator via
ActionValidatorRegistry.validate(ActionDTO, String, ValidationCtx)
await
is valid usingValidatorUtils.validateAwait(String, ActionDTO)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidate
(String beatId, ActionDTO action, ValidationCtx context) Validate an action against a set of rules defined for each type of action.
-
Constructor Details
-
ParallelValidator
public ParallelValidator()
-
-
Method Details
-
validate
Description copied from interface:ActionValidator
Validate an action against a set of rules defined for each type of action.- Specified by:
validate
in interfaceActionValidator
- Parameters:
beatId
- The id of the beat having one of its actions validatedaction
- TheActionDTO
being validatedcontext
- TheValidationCtx
with the document context- Returns:
- A list of
AuthoringError
for each rule infraction
-