@Contract @ConstrainedTo(value=SERVER) public interface ViewableContext
Viewable
to an instance of ResolvedViewable
.
Note:
resolveViewable(org.glassfish.jersey.server.mvc.Viewable, javax.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
).Modifier and Type | Method and Description |
---|---|
ResolvedViewable |
resolveViewable(Viewable viewable,
javax.ws.rs.core.MediaType mediaType,
Class<?> resourceClass,
TemplateProcessor templateProcessor)
|
ResolvedViewable resolveViewable(Viewable viewable, javax.ws.rs.core.MediaType mediaType, Class<?> resourceClass, TemplateProcessor templateProcessor)
viewable
using mediaType
,
resourceClass
and templateProcessor
.
If the template name of the viewable is not absolute then the given resourceClass
may be utilized to resolve
the relative template name into an absolute template name.
resourceClass
contains class of the matched resource.
viewable
- viewable to be resolved.mediaType
- media type the viewable may be transformed into.resourceClass
- resource class.templateProcessor
- template processor to be used.null
if the viewable cannot be resolved.Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.