Interface ViewableContext
The context for resolving an instance of
Viewable
to an instance of ResolvedViewable
.
Note:
resolveViewable(org.glassfish.jersey.server.mvc.Viewable, jakarta.ws.rs.core.MediaType, Class, TemplateProcessor)
method may be called multiple times (combination of all the calculated possible media types of the response with all found
template processors
).- Author:
- Paul Sandoz, Michal Gajdos
-
Method Summary
Modifier and TypeMethodDescriptionresolveViewable
(Viewable viewable, MediaType mediaType, Class<?> resourceClass, TemplateProcessor templateProcessor)
-
Method Details
-
resolveViewable
ResolvedViewable resolveViewable(Viewable viewable, MediaType mediaType, Class<?> resourceClass, TemplateProcessor templateProcessor) Resolve givenviewable
usingmediaType
,resourceClass
andtemplateProcessor
. If the template name of the viewable is not absolute then the givenresourceClass
may be utilized to resolve the relative template name into an absolute template name.
resourceClass
contains class of the matched resource.- Parameters:
viewable
- viewable to be resolved.mediaType
- media type the viewable may be transformed into.resourceClass
- resource class.templateProcessor
- template processor to be used.- Returns:
- resolved viewable or
null
if the viewable cannot be resolved.
-