About Dynject
What is it?
Dynject (shortcut for dynamic injection) is a small framework for dynamic validation and assignment of Java POJOs. It is very light, small, has no external dependancies and comes with a big set of validations that work out of the box. Everything is configured using annotations, though an XML configuration is in the works
It serves three main purposes:
- Automatic data conversion from external sources to Java type fields. This funcionality requires zero configuration.
- Data normalization and transformation - Allows data to be transformed before reaching the POJO according to a set of rules that can be expressed either as annotations or as XML options. For example, spaces can be trimmed, whitespaces collapsed, the value may be converted to uppercase, etc. All this is handled declaratively and applied whenever necessary.
- Data validation - Transformed and normalized data can be validated before reaching the POJO. Validation rules are expressed declaratively, and an error message (either literal or located in a resource bundle) can be associated to each error condition. The results of the validation are reported in a format that is convenient for displaying back to the user.
