Interface ViewableContext
-
@Contract @ConstrainedTo(SERVER) public interface ViewableContext
The context for resolving an instance ofViewableto an instance ofResolvedViewable. 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 foundtemplate processors).- Author:
- Paul Sandoz, Michal Gajdos
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResolvedViewableresolveViewable(Viewable viewable, MediaType mediaType, Class<?> resourceClass, TemplateProcessor templateProcessor)
-
-
-
Method Detail
-
resolveViewable
ResolvedViewable resolveViewable(Viewable viewable, MediaType mediaType, Class<?> resourceClass, TemplateProcessor templateProcessor)
Resolve givenviewableusingmediaType,resourceClassandtemplateProcessor. If the template name of the viewable is not absolute then the givenresourceClassmay be utilized to resolve the relative template name into an absolute template name.
resourceClasscontains 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
nullif the viewable cannot be resolved.
-
-