org.codehaus.groovy.grails.web.servlet.view
Class GrailsViewResolver

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.InternalResourceViewResolver
                      extended by org.codehaus.groovy.grails.web.servlet.view.GrailsViewResolver
All Implemented Interfaces:
org.codehaus.groovy.grails.plugins.PluginManagerAware, org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.ViewResolver

public class GrailsViewResolver
extends org.springframework.web.servlet.view.InternalResourceViewResolver
implements org.codehaus.groovy.grails.plugins.PluginManagerAware, org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware

Evaluates the existance of a view for different extensions choosing which one to delegate to.

Since:
0.1

Field Summary
protected  GrailsConventionGroovyPageLocator groovyPageLocator
           
static java.lang.String GSP_SUFFIX
           
static java.lang.String JSP_SUFFIX
           
protected  GroovyPagesTemplateEngine templateEngine
           
 
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
GrailsViewResolver()
          Constructor.
 
Method Summary
 long getCacheTimeout()
           
protected  org.springframework.web.servlet.View loadView(java.lang.String viewName, java.util.Locale locale)
           
 void setCacheTimeout(long cacheTimeout)
           
 void setGrailsApplication(org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication)
           
 void setGroovyPageLocator(GrailsConventionGroovyPageLocator groovyPageLocator)
           
 void setPluginManager(org.codehaus.groovy.grails.plugins.GrailsPluginManager pluginManager)
           
 void setTemplateEngine(GroovyPagesTemplateEngine templateEngine)
           
 
Methods inherited from class org.springframework.web.servlet.view.InternalResourceViewResolver
buildView, requiredViewClass, setAlwaysInclude, setExposeContextBeansAsAttributes, setExposedContextBeanNames
 
Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
canHandle, createView, getAttributesMap, getCacheKey, getContentType, getOrder, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, setAttributes, setAttributesMap, setContentType, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames
 
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
clearCache, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheUnresolved
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, 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
 

Field Detail

GSP_SUFFIX

public static final java.lang.String GSP_SUFFIX
See Also:
Constant Field Values

JSP_SUFFIX

public static final java.lang.String JSP_SUFFIX
See Also:
Constant Field Values

templateEngine

protected GroovyPagesTemplateEngine templateEngine

groovyPageLocator

protected GrailsConventionGroovyPageLocator groovyPageLocator
Constructor Detail

GrailsViewResolver

public GrailsViewResolver()
Constructor.

Method Detail

setGroovyPageLocator

public void setGroovyPageLocator(GrailsConventionGroovyPageLocator groovyPageLocator)

loadView

protected org.springframework.web.servlet.View loadView(java.lang.String viewName,
                                                        java.util.Locale locale)
                                                 throws java.lang.Exception
Overrides:
loadView in class org.springframework.web.servlet.view.UrlBasedViewResolver
Throws:
java.lang.Exception

setPluginManager

public void setPluginManager(org.codehaus.groovy.grails.plugins.GrailsPluginManager pluginManager)
Specified by:
setPluginManager in interface org.codehaus.groovy.grails.plugins.PluginManagerAware

setTemplateEngine

public void setTemplateEngine(GroovyPagesTemplateEngine templateEngine)

setGrailsApplication

public void setGrailsApplication(org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication)
Specified by:
setGrailsApplication in interface org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware

getCacheTimeout

public long getCacheTimeout()

setCacheTimeout

public void setCacheTimeout(long cacheTimeout)