org.glassfish.jersey.server.mvc.spi
Interface ViewableContext
@Contract
@ConstrainedTo(value=SERVER)
public interface ViewableContext
The context for resolving an instance of 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).
- Author:
- Paul Sandoz (paul.sandoz at oracle.com), Michal Gajdos (michal.gajdos at oracle.com)
resolveViewable
ResolvedViewable resolveViewable(Viewable viewable,
MediaType mediaType,
java.lang.Class<?> resolvingClass,
TemplateProcessor templateProcessor)
- Resolve given
viewable using mediaType,
resolvingClass and templateProcessor.
If the template name of the viewable is not absolute then the given resolvingClass may be utilized to resolve
the relative template name into an absolute template name.
resolvingClass contains one of these values (ordered by priority):
- Parameters:
viewable - viewable to be resolved.mediaType - media type the viewable may be transformed into.resolvingClass - actual resolving class.templateProcessor - template processor to be used.
- Returns:
- resolved viewable or
null if the viewable cannot be resolved.
Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.