Skip navigation links

Package net.sf.gridarta.model.validation.checks

This package contains the checks for validating maps.

See: Description

Package net.sf.gridarta.model.validation.checks Description

This package contains the checks for validating maps.

How to create your own checks

The easiest way to create your own checks is this:

  1. Extend AbstractValidator by a class named like net.sf.gridarta.map.validation.checks.MyMapChecker that additionally implements one of the Validator sub-interfaces
  2. Extend ValidationError or one of its subclasses by a class named like net.sf.gridarta.map.model.validation.checks.MyError.

Note: to use the automatic localization feature, the error class and validator class must match name like the existing checkers.

Caveats

If you extend AbstractValidator without actually really implementing one of the Validator, your validator will be a valid and compilable validator but also a dysfunctional stub. So don't forget to extend the corresponding sub-interface.

FAQ

Do I really have to always extend ValidationError for my validator's errors?
Well not really. But the automatic localization of ValidationErrors depends on separate error class names. Also, CorrectableError depends on separate error classes.
Skip navigation links