Interface:
org.netbeans.modules.xml.xam.spi.Validator { {
/**
* Returns name of this validation service.
* @return Name of the validator.
*/
String getName();
/**
* Validates given model.
* @return ValidationResult.
* @param validationType Type of validation. Complete(slow) or partial(fast).
* @param model model to validate.
* @param validation reference to the validation context.
*/
ValidationResult validate(Model model, Validation validation, ValidationType validationType);
enum ResultType {
ADVICE, WARNING, ERROR
}
}
For example look at C:\nb_all\wsdlextensions.file\src\META-INF\services\org.netbeans.modules.xml.xam.spi.Validator and org.netbeans.modules.wsdlextensions.file.validator.FileComponentValidator
Make sure that the implementation of the Validator is thread safe. The validators are cached.