T
- the type of the resolved template object.public final class ResolvedViewable<T> extends Viewable
viewable
.
A resolved viewable is obtained from the resolving methods on ViewableContext
and has associated with it a TemplateProcessor
that is capable of processing a template identified by a template
reference.Constructor and Description |
---|
ResolvedViewable(TemplateProcessor<T> viewProcessor,
T templateReference,
Viewable viewable,
Class<?> resolvingClass,
javax.ws.rs.core.MediaType mediaType)
Create a resolved viewable.
|
ResolvedViewable(TemplateProcessor<T> viewProcessor,
T templateReference,
Viewable viewable,
javax.ws.rs.core.MediaType mediaType)
Create a resolved viewable.
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.MediaType |
getMediaType()
Get the media type for which the
view processor resolved the template reference. |
Class<?> |
getResolvingClass()
Get resolving class.
|
void |
writeTo(OutputStream out,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders)
Write the resolved viewable.
|
getModel, getTemplateName, isTemplateNameAbsolute
public ResolvedViewable(TemplateProcessor<T> viewProcessor, T templateReference, Viewable viewable, javax.ws.rs.core.MediaType mediaType)
viewProcessor
- the view processor that resolved a template name to a template reference.templateReference
- the template reference.viewable
- the viewable that is resolved.mediaType
- media type the templateReference
should be transformed into.public ResolvedViewable(TemplateProcessor<T> viewProcessor, T templateReference, Viewable viewable, Class<?> resolvingClass, javax.ws.rs.core.MediaType mediaType)
viewProcessor
- the view processor that resolved a template name to a template reference.templateReference
- the template reference.viewable
- the viewable that is resolved.resolvingClass
- the resolving class that was used to resolve a relative template name into an absolute template name.mediaType
- media type the templateReference
should be transformed into.public void writeTo(OutputStream out, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders) throws IOException
TemplateProcessor.writeTo(Object, org.glassfish.jersey.server.mvc.Viewable, javax.ws.rs.core.MediaType,
javax.ws.rs.core.MultivaluedMap, java.io.OutputStream)
to write the viewable utilizing the template reference.out
- the output stream that the view processor writes to.IOException
- if there was an error processing the template.public javax.ws.rs.core.MediaType getMediaType()
view processor
resolved the template reference.media type
of the resolved viewable.public Class<?> getResolvingClass()
Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.