International Journal of Computer
Trends and Technology

Research Article | Open Access | Download PDF

Volume 67 | Issue 3 | Year 2019 | Article Id. IJCTT-V67I3P121 | DOI : https://doi.org/10.14445/22312803/IJCTT-V67I3P121

Transform Dynamic Validation Metadata to Runtime Java Bean Validation Constraint Annotations


Vijay Kumar Pandey

Citation :

Vijay Kumar Pandey, "Transform Dynamic Validation Metadata to Runtime Java Bean Validation Constraint Annotations," International Journal of Computer Trends and Technology (IJCTT), vol. 67, no. 3, pp. 102-108, 2019. Crossref, https://doi.org/10.14445/22312803/ IJCTT-V67I3P121

Abstract

The paperis intended to provide an in-depth understanding of how to transform dynamic validation metadata to runtime java class(es) with relevant fields annotated with proper bean validation annotations, which is dynamically generated based on the validation metadata. This dynamic class generation is performed through an open source library ByteBuddy (which depends on ASM - ASM is an all-purpose Java bytecode manipulation and analysis framework). This understanding will help developers to build dynamic validation feature in their system, while validating the properties of a dynamic screen that is built with the help of dynamic properties metadata.The intended audience for this article includesapplication architects, software designers and software programmers who participate in the design, architecting and development of robust and complex enterprise-wide applications based on Java and Jakarta EE (or spring) and want to utilize the Java Bean Validation (1.1 or 2) in dynamic scenarios.

Keywords

Java Bean Validation (BV), Byte Buddy, ASM, Jakarta EE.

References

[1] Bean Validation 1.1 JSR 349 - https://beanvalidation.org/1.1/
[2] Bean Validation 2.0 JSR 380- https://beanvalidation.org/2.0/
[3] Byte Buddy - https://bytebuddy.net
[4] ASM - https://asm.ow2.io/
[5] Jakarta Enterprise Edition (JEE) - https://jakarta.ee/
[6] JEE 7 Specification - https://jcp.org/en/jsr/detail?id=342
[7] JEE 8 Specification - https://jcp.org/en/jsr/detail?id=366