Interface Widget
- All Known Implementing Classes:
BarSlot,CalendarDef,FormDef,ModalDef,ServerValues
Each concrete type owns a public static final String CONTRACT_VERSION (starting at "1") and
implements validate() as a fail-closed bean-level check. Serving-path call sites (for example a
table emitter) must invoke validate() rather than treating it as documentation-only.
The REST serving path now enforces this independently of any one call site: every classpath that carries this
module registers a ResponseProcessor (see
WidgetsMixin.WidgetValidationProcessor) that calls validate() on any REST response content
that is a Widget, fail-closed with a 500 on failure. That closes the gap for the two implementations
that ride the wire as a JSON response body (ModalDef/FormDef) rather than being consumed by a
server-side emitter that already validates on the way in; a non-REST producer (a direct Json.of(...)
serialization, for example) is untouched by construction and still relies on an explicit validate() /
checked() call.
- Since:
- 10.0.0
-
Method Summary
-
Method Details
-
validate
void validate()Fail-closed bean validation.- Throws:
IllegalArgumentException- If this widget is not well-formed.
-