net.sf.sfac.editor
Interface Validator
- All Known Implementing Classes:
- ValidatorImpl
public interface Validator
An interface to be implemented by objects wanting to provide validation of an edited object.
The validation can happen at two stages:
- Continuous validation: this validation is triggered at any modification event coming from the editor. you will get each time
the modification event and you are supposed to validate only the modified field. This validation uses a single validation report
that must be updated at each event.
- Before-commit validation: Should be a throughout validation verifying everything.
- Author:
- Olivier Berlanger
supportsContinuousValidation
boolean supportsContinuousValidation()
initContinuousValidationReport
void initContinuousValidationReport(Object editedObject,
ValidationReport report)
validateModification
void validateModification(Object editedObject,
String fieldPath,
Object oldValue,
Object newValue,
ValidationReport report)
validateBeforeCommit
void validateBeforeCommit(Object editedObject,
ValidationReport report)
Copyright © 2012. All Rights Reserved.