@groovy.transform.CompileStatic class SmartViewResolver extends java.lang.Object implements GrailsConfigurationAware
Spring's default view resolving mechanism only accepts the view name and locale, this forces you to code around its limitations when you want to add intelligent features such as version and mime type awareness. This aims to fix that whilst reducing complexity
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
OBJECT_TEMPLATE_NAME |
|
private Config |
configuration |
|
private java.lang.String |
contentType |
|
private LocaleResolver |
localeResolver |
|
private View |
objectView |
|
private java.lang.String |
suffix |
|
private ResolvableGroovyTemplateEngine |
templateEngine |
|
private Cache<java.lang.String, GenericGroovyTemplateView> |
viewCache |
|
private java.lang.Class<? extends GenericGroovyTemplateView> |
viewClass |
Type | Name and description |
---|---|
Config |
configuration |
java.lang.String |
contentType |
LocaleResolver |
localeResolver |
View |
objectView |
java.lang.String |
suffix |
ResolvableGroovyTemplateEngine |
templateEngine |
java.lang.Class<? extends GenericGroovyTemplateView> |
viewClass |
Constructor and description |
---|
SmartViewResolver
(ResolvableGroovyTemplateEngine templateEngine) |
SmartViewResolver
(ResolvableGroovyTemplateEngine templateEngine, java.lang.String suffix, java.lang.String contentType) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected java.util.List |
buildQualifiers(HttpServletRequest request, HttpServletResponse response) |
|
private GenericGroovyTemplateView |
getViewCacheWithDefault(java.lang.String key) |
|
WritableScriptTemplate |
resolveTemplate(java.lang.Class type, java.util.Locale locale, java.lang.String[] qualifiers) |
|
WritableScriptTemplate |
resolveTemplate(java.lang.String path) |
|
WritableScriptTemplate |
resolveTemplate(java.lang.String path, java.util.Locale locale, java.lang.String[] qualifiers) |
|
View |
resolveView(java.lang.String viewName, java.util.Locale locale) |
|
View |
resolveView(java.lang.String viewName, HttpServletRequest request, HttpServletResponse response) |
|
View |
resolveView(java.lang.Class type, HttpServletRequest request, HttpServletResponse response) |
|
View |
resolveView(java.lang.Class type, java.util.Locale locale) |
|
void |
setLinkGenerator(LinkGenerator linkGenerator) |
|
void |
setTemplateResolver(TemplateResolver templateResolver) |
|
private GenericGroovyTemplateView |
viewCacheWithPath(java.lang.String path) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Groovy Documentation