GroovyPageViewResolver (Grails 3.2.3)
Date: 2016-11-10

Package: org.grails.web.servlet.view

## [Java] Class GroovyPageViewResolver

- org.grails.web.servlet.view.GroovyPageViewResolver

- All Implemented Interfaces and Traits:
    GrailsViewResolver

      public class GroovyPageViewResolver
      extends org.springframework.web.servlet.view.InternalResourceViewResolver

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

  Authors:
    Graeme Rocher
  Since:
    0.1

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `GSP_SUFFIX` |
    `static java.lang.String` | `JSP_SUFFIX` |
    `protected GrailsConventionGroovyPageLocator` | `groovyPageLocator` |
    `protected GroovyPagesTemplateEngine` | `templateEngine` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class org.springframework.web.servlet.view.InternalResourceViewResolver` | `REDIRECT_URL_PREFIX, FORWARD_URL_PREFIX, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE, DEFAULT_CACHE_LIMIT`
    `class org.springframework.web.servlet.view.UrlBasedViewResolver` | `REDIRECT_URL_PREFIX, FORWARD_URL_PREFIX, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE, DEFAULT_CACHE_LIMIT`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovyPageViewResolver ()` Constructor.
    `GroovyPageViewResolver (GroovyPagesTemplateEngine templateEngine, GrailsConventionGroovyPageLocator groovyPageLocator)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `clearCache()`
    `protected org.springframework.web.servlet.View` | `createFallbackView(java.lang.String viewName)`
    `protected org.springframework.web.servlet.View` | `createGrailsView(java.lang.String viewName)`
    `protected org.springframework.web.servlet.View` | `createJstlView(java.lang.String viewName)`
    `long` | `getCacheTimeout()`
    `boolean` | `isAllowGrailsViewCaching()`
    `protected org.springframework.web.servlet.View` | `loadView(java.lang.String viewName, java.util.Locale locale)`
    `protected java.lang.String` | `resolveCurrentControllerKeyPrefixes()` @return prefix for cache key that contains current controller's context (currently plugin and namespace)
    `org.springframework.web.servlet.View` | `resolveViewName(java.lang.String viewName, java.util.Locale locale)`
    `void` | `setAllowGrailsViewCaching(boolean allowGrailsViewCaching)`
    `void` | `setCacheTimeout(long cacheTimeout)`
    `void` | `setGroovyPageLocator(GrailsConventionGroovyPageLocator groovyPageLocator)`
    `void` | `setResolveJspView(boolean resolveJspView)`
    `void` | `setTemplateEngine(GroovyPagesTemplateEngine templateEngine)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class org.springframework.web.servlet.view.InternalResourceViewResolver` | `org.springframework.web.servlet.view.InternalResourceViewResolver#setAlwaysInclude(boolean), org.springframework.web.servlet.view.InternalResourceViewResolver#setContentType(java.lang.String), org.springframework.web.servlet.view.InternalResourceViewResolver#setPrefix(java.lang.String), org.springframework.web.servlet.view.InternalResourceViewResolver#getOrder(), org.springframework.web.servlet.view.InternalResourceViewResolver#setViewClass(java.lang.Class), org.springframework.web.servlet.view.InternalResourceViewResolver#setSuffix(java.lang.String), org.springframework.web.servlet.view.InternalResourceViewResolver#setRedirectContextRelative(boolean), org.springframework.web.servlet.view.InternalResourceViewResolver#setRedirectHttp10Compatible(boolean), org.springframework.web.servlet.view.InternalResourceViewResolver#setRedirectHosts([Ljava.lang.String;), org.springframework.web.servlet.view.InternalResourceViewResolver#getRedirectHosts(), org.springframework.web.servlet.view.InternalResourceViewResolver#setRequestContextAttribute(java.lang.String), org.springframework.web.servlet.view.InternalResourceViewResolver#setAttributes(java.util.Properties), org.springframework.web.servlet.view.InternalResourceViewResolver#setAttributesMap(java.util.Map), org.springframework.web.servlet.view.InternalResourceViewResolver#getAttributesMap(), org.springframework.web.servlet.view.InternalResourceViewResolver#setExposePathVariables(java.lang.Boolean), org.springframework.web.servlet.view.InternalResourceViewResolver#setExposeContextBeansAsAttributes(boolean), org.springframework.web.servlet.view.InternalResourceViewResolver#setExposedContextBeanNames([Ljava.lang.String;), org.springframework.web.servlet.view.InternalResourceViewResolver#setViewNames([Ljava.lang.String;), org.springframework.web.servlet.view.InternalResourceViewResolver#setOrder(int), org.springframework.web.servlet.view.InternalResourceViewResolver#setCache(boolean), org.springframework.web.servlet.view.InternalResourceViewResolver#clearCache(), org.springframework.web.servlet.view.InternalResourceViewResolver#setCacheLimit(int), org.springframework.web.servlet.view.InternalResourceViewResolver#getCacheLimit(), org.springframework.web.servlet.view.InternalResourceViewResolver#isCache(), org.springframework.web.servlet.view.InternalResourceViewResolver#setCacheUnresolved(boolean), org.springframework.web.servlet.view.InternalResourceViewResolver#isCacheUnresolved(), org.springframework.web.servlet.view.InternalResourceViewResolver#resolveViewName(java.lang.String, java.util.Locale), org.springframework.web.servlet.view.InternalResourceViewResolver#removeFromCache(java.lang.String, java.util.Locale), org.springframework.web.servlet.view.InternalResourceViewResolver#setServletContext(javax.servlet.ServletContext), org.springframework.web.servlet.view.InternalResourceViewResolver#getApplicationContext(), org.springframework.web.servlet.view.InternalResourceViewResolver#setApplicationContext(org.springframework.context.ApplicationContext), org.springframework.web.servlet.view.InternalResourceViewResolver#wait(long, int), org.springframework.web.servlet.view.InternalResourceViewResolver#wait(long), org.springframework.web.servlet.view.InternalResourceViewResolver#wait(), org.springframework.web.servlet.view.InternalResourceViewResolver#equals(java.lang.Object), org.springframework.web.servlet.view.InternalResourceViewResolver#toString(), org.springframework.web.servlet.view.InternalResourceViewResolver#hashCode(), org.springframework.web.servlet.view.InternalResourceViewResolver#getClass(), org.springframework.web.servlet.view.InternalResourceViewResolver#notify(), org.springframework.web.servlet.view.InternalResourceViewResolver#notifyAll()`
    `class org.springframework.web.servlet.view.UrlBasedViewResolver` | `org.springframework.web.servlet.view.UrlBasedViewResolver#setContentType(java.lang.String), org.springframework.web.servlet.view.UrlBasedViewResolver#setPrefix(java.lang.String), org.springframework.web.servlet.view.UrlBasedViewResolver#getOrder(), org.springframework.web.servlet.view.UrlBasedViewResolver#setViewClass(java.lang.Class), org.springframework.web.servlet.view.UrlBasedViewResolver#setSuffix(java.lang.String), org.springframework.web.servlet.view.UrlBasedViewResolver#setRedirectContextRelative(boolean), org.springframework.web.servlet.view.UrlBasedViewResolver#setRedirectHttp10Compatible(boolean), org.springframework.web.servlet.view.UrlBasedViewResolver#setRedirectHosts([Ljava.lang.String;), org.springframework.web.servlet.view.UrlBasedViewResolver#getRedirectHosts(), org.springframework.web.servlet.view.UrlBasedViewResolver#setRequestContextAttribute(java.lang.String), org.springframework.web.servlet.view.UrlBasedViewResolver#setAttributes(java.util.Properties), org.springframework.web.servlet.view.UrlBasedViewResolver#setAttributesMap(java.util.Map), org.springframework.web.servlet.view.UrlBasedViewResolver#getAttributesMap(), org.springframework.web.servlet.view.UrlBasedViewResolver#setExposePathVariables(java.lang.Boolean), org.springframework.web.servlet.view.UrlBasedViewResolver#setExposeContextBeansAsAttributes(boolean), org.springframework.web.servlet.view.UrlBasedViewResolver#setExposedContextBeanNames([Ljava.lang.String;), org.springframework.web.servlet.view.UrlBasedViewResolver#setViewNames([Ljava.lang.String;), org.springframework.web.servlet.view.UrlBasedViewResolver#setOrder(int), org.springframework.web.servlet.view.UrlBasedViewResolver#setCache(boolean), org.springframework.web.servlet.view.UrlBasedViewResolver#clearCache(), org.springframework.web.servlet.view.UrlBasedViewResolver#setCacheLimit(int), org.springframework.web.servlet.view.UrlBasedViewResolver#getCacheLimit(), org.springframework.web.servlet.view.UrlBasedViewResolver#isCache(), org.springframework.web.servlet.view.UrlBasedViewResolver#setCacheUnresolved(boolean), org.springframework.web.servlet.view.UrlBasedViewResolver#isCacheUnresolved(), org.springframework.web.servlet.view.UrlBasedViewResolver#resolveViewName(java.lang.String, java.util.Locale), org.springframework.web.servlet.view.UrlBasedViewResolver#removeFromCache(java.lang.String, java.util.Locale), org.springframework.web.servlet.view.UrlBasedViewResolver#setServletContext(javax.servlet.ServletContext), org.springframework.web.servlet.view.UrlBasedViewResolver#getApplicationContext(), org.springframework.web.servlet.view.UrlBasedViewResolver#setApplicationContext(org.springframework.context.ApplicationContext), org.springframework.web.servlet.view.UrlBasedViewResolver#wait(long, int), org.springframework.web.servlet.view.UrlBasedViewResolver#wait(long), org.springframework.web.servlet.view.UrlBasedViewResolver#wait(), org.springframework.web.servlet.view.UrlBasedViewResolver#equals(java.lang.Object), org.springframework.web.servlet.view.UrlBasedViewResolver#toString(), org.springframework.web.servlet.view.UrlBasedViewResolver#hashCode(), org.springframework.web.servlet.view.UrlBasedViewResolver#getClass(), org.springframework.web.servlet.view.UrlBasedViewResolver#notify(), org.springframework.web.servlet.view.UrlBasedViewResolver#notifyAll()`

- - ### Field Detail

    - #### public static final java.lang.String GSP_SUFFIX

    - #### public static final java.lang.String JSP_SUFFIX

    - #### protected GrailsConventionGroovyPageLocator groovyPageLocator

    - #### protected GroovyPagesTemplateEngine templateEngine

  - ### Constructor Detail

    - #### public GroovyPageViewResolver()

      Constructor.

    - #### public GroovyPageViewResolver(GroovyPagesTemplateEngine templateEngine, GrailsConventionGroovyPageLocator groovyPageLocator)

  - ### Method Detail

    - #### @java.lang.Override public void clearCache()

    - #### protected org.springframework.web.servlet.View createFallbackView(java.lang.String viewName)

    - #### protected org.springframework.web.servlet.View createGrailsView(java.lang.String viewName)

    - #### protected org.springframework.web.servlet.View createJstlView(java.lang.String viewName)

    - #### public long getCacheTimeout()

    - #### public boolean isAllowGrailsViewCaching()

    - #### @java.lang.Override protected org.springframework.web.servlet.View loadView(java.lang.String viewName, java.util.Locale locale)

    - #### protected java.lang.String resolveCurrentControllerKeyPrefixes()

      Returns:
        prefix for cache key that contains current controller's context (currently plugin and namespace)

    - #### @java.lang.Override public org.springframework.web.servlet.View resolveViewName(java.lang.String viewName, java.util.Locale locale)

    - #### public void setAllowGrailsViewCaching(boolean allowGrailsViewCaching)

    - #### public void setCacheTimeout(long cacheTimeout)

    - #### public void setGroovyPageLocator(GrailsConventionGroovyPageLocator groovyPageLocator)

    - #### public void setResolveJspView(boolean resolveJspView)

    - #### @org.springframework.beans.factory.annotation.Autowired(required=true) @org.springframework.beans.factory.annotation.Qualifier(GroovyPagesTemplateEngine.BEAN_ID) public void setTemplateEngine(GroovyPagesTemplateEngine templateEngine)