The Spring Framework

org.springframework.web.servlet.view.xslt
Class XsltViewResolver

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.view.AbstractCachingViewResolver
              extended by org.springframework.web.servlet.view.UrlBasedViewResolver
                  extended by org.springframework.web.servlet.view.xslt.XsltViewResolver
All Implemented Interfaces:
ApplicationContextAware, Ordered, ServletContextAware, ViewResolver

public class XsltViewResolver
extends UrlBasedViewResolver

ViewResolver implementation that resolves instances of XsltView by translating the supplied view name into the URL of the XSLT stylesheet.

Since:
2.0
Author:
Rob Harrop

Field Summary
 
Fields inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
XsltViewResolver()
           
 
Method Summary
protected  AbstractUrlBasedView buildView(String viewName)
          Creates a new View instance of the specified view class and configures it.
protected  Class requiredViewClass()
          Return the required type of view for this resolver.
 void setCacheTemplates(boolean cacheTemplates)
           
 void setErrorListener(ErrorListener errorListener)
           
 void setIndent(boolean indent)
           
 void setOutputProperties(Properties outputProperties)
           
 void setSourceKey(String sourceKey)
           
 void setUriResolver(URIResolver uriResolver)
           
 
Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
canHandle, createView, getAttributesMap, getCacheKey, getContentType, getOrder, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setOrder, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames
 
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
clearCache, isCache, removeFromCache, resolveViewName, setCache
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsltViewResolver

public XsltViewResolver()
Method Detail

setCacheTemplates

public void setCacheTemplates(boolean cacheTemplates)
See Also:
XsltView.setCacheTemplates(boolean)

setUriResolver

public void setUriResolver(URIResolver uriResolver)
See Also:
XsltView.setUriResolver(javax.xml.transform.URIResolver)

setErrorListener

public void setErrorListener(ErrorListener errorListener)
See Also:
XsltView.setErrorListener(javax.xml.transform.ErrorListener)

setSourceKey

public void setSourceKey(String sourceKey)
See Also:
XsltView.setSourceKey(java.lang.String)

setOutputProperties

public void setOutputProperties(Properties outputProperties)
See Also:
XsltView.setOutputProperties(java.util.Properties)

setIndent

public void setIndent(boolean indent)
See Also:
XsltView.setIndent(boolean)

requiredViewClass

protected Class requiredViewClass()
Description copied from class: UrlBasedViewResolver
Return the required type of view for this resolver. This implementation returns AbstractUrlBasedView.

Overrides:
requiredViewClass in class UrlBasedViewResolver
See Also:
AbstractUrlBasedView

buildView

protected AbstractUrlBasedView buildView(String viewName)
                                  throws Exception
Description copied from class: UrlBasedViewResolver
Creates a new View instance of the specified view class and configures it. Does not perform any lookup for pre-defined View instances.

Spring lifecycle methods as defined by the bean container do not have to be called here; those will be applied by the loadView method after this method returns.

Subclasses will typically call super.buildView(viewName) first, before setting further properties themselves. loadView will then apply Spring lifecycle methods at the end of this process.

Overrides:
buildView in class UrlBasedViewResolver
Throws:
Exception
See Also:
UrlBasedViewResolver.loadView(String, java.util.Locale)

The Spring Framework

Copyright © 2002-2006 The Spring Framework.