Envali

Annotation-driven entity validation for Java

A Java framework that validates an entity's fields from annotations declared on them. Envali.validate reflects over the fields and reports recoverable and unrecoverable errors.

ArchivedPersonalOpen source

Record

Kind
Package
Role
Author
Started
October 2020
Ended
January 2021
Licence
Apache-2.0

Technology1

Evidence11 sources

The GitHub repository is archivedrepogithub.com The LICENSE file is the unmodified text of the Apache License 2.0licencegithub.com Envali.validate is a static method that walks the entity's declared fields by reflection, reads the annotations on each one and builds a validation per annotation type, returning a ValidationResult rather than throwing on the first failuresourcegithub.com An entity opts in by implementing ValidatableEntity, which is what validate takes as its argument type; it declares nothing the implementer must write, only two default methods that report whether the class carries a ParameterMapping annotationsourcegithub.com Each BusinessError the result carries answers isRecoverable and isUnrecoverable, so the caller sorts the failures rather than catching the firstsourcegithub.com Thirteen annotation types ship with the framework, from RequireNonNull and RequirePositive to RequireRangeFromTo, RequireMatch and NestedEntitysourcegithub.com The annotations that need an expected value read it from an external content file named by the entity's ParameterMapping annotation, loaded through Content Framework's ContentLoadersourcegithub.com build.gradle declares content-framework v1.1.0, catalog-api v1.0.2 and precondition-validator v1.1.0 among its implementation dependencies, and publishes to GitHub Packages rather than to a public repositorysourcegithub.com The framework's own enums are built on Catalog API — ErrorType is declared as an enum implementing Catalogsourcegithub.com Five releases were published, v1.0.0 on 4 November 2020 through v1.0.4 on 11 January 2021repogithub.com The README states the copyright as Kato Shinya, 2020, and its install section directs the reader to contact the author for a token to download the packagedocsgithub.com

Links2

Relations4 edges

Catalog APIDepends onCommon lookup behaviour for Java enums Content FrameworkDepends onExternalised values and rules for Java Precondition ValidatorDepends onJava argument checks that throw EpitaphDepends onNamed presets for Java regular expressions