Type: New Feature
Affects Version/s: None
Fix Version/s: 2.3.0
With bindy, jaxb and probably other binding frameworks, it would be interesting to have a validate option in camel that we can use in combination with by example unmarshall
.unmarshall(bindy or jaxb or ArtixDS or ...)
The purpose of this feature will be to :
- verify mandatory fields/properties of POJO,
- apply business rules on the data received,
Ex, in an csv record, the order n° field is mandatory and the order type must be equal to N for new order, C for cancel or U for update.
- One parameter that we can provide to the validation method could be "block or non block" to generate an array list of errors without creating an error in the application. This option is interesting because it allows to keep the POJO and save though Hibernate/Ibatis the data in the database and to send a report to the issuer to inform it about the errors found in the CSV, fixedlength, ... files received
- Spring 3 who will provide validation support through annotation could be a good candidate.