Package org.apache.juneau.rest.server.view
Hosts the View interface — the stable contract
that per-engine bridge modules (juneau-rest-server-view-jsp,
-thymeleaf, -mustache, -freemarker) implement and pair with a
ViewRenderer that detects their own
View subtype on @RestOp-method return values and dispatches to the underlying
templating engine.
Keeping the interface in juneau-rest-server's core (rather than in any one engine
bridge) lets a @RestOp method declare a View return type without forcing a
compile-time dependency on a specific engine, and lets host code interoperate with multiple
bridge modules in the same application.
Renderer auto-prepend
Any ResponseProcessor implementing
ViewRenderer is automatically repositioned to run before the first
CatchAllResponseProcessor
(i.e. SerializedPojoProcessor)
during ResponseProcessorList
construction. This ensures that a @RestOp method returning a typed View
subclass (JspView,
ThymeleafView, etc.) reaches the
matching renderer without the user having to enumerate a full custom processor chain.
Third-party renderers gain the same ordering guarantee by implementing ViewRenderer.
- Since:
- 10.0.0
-
ClassDescriptionEngine-agnostic raw-template-dispatch contract shared by the view mixin resources and their standalone servlet companions.Engine-agnostic contract for a server-side-rendered template return value from an
@RestOp-annotated method.ViewMixinBuilder<B extends ViewMixinBuilder<B>>Minimal shared contract implemented by the builder of every view-engine mixin (JspMixin.Builder,ThymeleafMixin.Builder,MustacheMixin.Builder,FreemarkerMixin.Builder).Marker interface for response processors that handleView-typed return values.Abstract base for the child-resource flavors of the view mixin resources.Abstract base for the standalone view-servlet companions of the view mixin resources.