com.sun.jersey.spi.template
Class ResolvedViewable

java.lang.Object
  extended by com.sun.jersey.api.view.Viewable
      extended by com.sun.jersey.spi.template.ResolvedViewable

public class ResolvedViewable
extends Viewable

A resolved Viewable.

A resolved viewable is obtained from the resolving methods on TemplateContext and has associated with it a TemplateProcessor that is capable of processing the template, referenced by the template name, that is a fully qualified name as produced from TemplateProcessor.resolve(java.lang.String).

Author:
[email protected]

Constructor Summary
ResolvedViewable(TemplateProcessor t, java.lang.String fullyQualifiedName, java.lang.Object model)
          Create a resolved viewable.
ResolvedViewable(TemplateProcessor t, java.lang.String fullyQualifiedName, java.lang.Object model, java.lang.Class<?> resolvingClass)
          Create a resolved viewable.
 
Method Summary
 void writeTo(java.io.OutputStream out)
          Write to the template, that is referenced by the fully qualified template name.
 
Methods inherited from class com.sun.jersey.api.view.Viewable
getModel, getResolvingClass, getTemplateName, isTemplateNameAbsolute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResolvedViewable

public ResolvedViewable(TemplateProcessor t,
                        java.lang.String fullyQualifiedName,
                        java.lang.Object model)
Create a resolved viewable.

Parameters:
t - the template processor.
fullyQualifiedName - the fully qualified template name identifying a template.
model - the model.

ResolvedViewable

public ResolvedViewable(TemplateProcessor t,
                        java.lang.String fullyQualifiedName,
                        java.lang.Object model,
                        java.lang.Class<?> resolvingClass)
Create a resolved viewable.

Parameters:
t - the template processor.
fullyQualifiedName - the fully qualified template name identifying a template.
model - the model.
resolvingClass - the resolving class that was used to resolve a relative template name into an absolute template name.
Method Detail

writeTo

public void writeTo(java.io.OutputStream out)
             throws java.io.IOException
Write to the template, that is referenced by the fully qualified template name.

The model of the resolved viewable is passed to the template.

This method defers to TemplateProcessor.writeTo(java.lang.String, java.lang.Object, java.io.OutputStream).

Parameters:
out - the output stream that the template processor writes the processing of the template referenced by the fully qualified template name.
Throws:
java.io.IOException


Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved.