eu.etaxonomy.cdm.remote.view
Class PatternViewResolver

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.XmlViewResolver
                  extended by eu.etaxonomy.cdm.remote.view.PatternViewResolver
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.ViewResolver

public class PatternViewResolver
extends org.springframework.web.servlet.view.XmlViewResolver

Resolves views by using a PathMatcher to match the view name to the bean names. Dy default the AntPathMatcher is used which supports Ant-style path patterns. The mapping matches views using the following rules:

Author:
ben.clark

Field Summary
 
Fields inherited from class org.springframework.web.servlet.view.XmlViewResolver
DEFAULT_LOCATION
 
Fields inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
DEFAULT_CACHE_LIMIT
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
PatternViewResolver()
           
 
Method Summary
 org.springframework.util.PathMatcher getPathMatcher()
           
protected  org.springframework.beans.factory.BeanFactory initFactory()
           
 org.springframework.web.servlet.View resolveViewName(String viewName, Locale locale)
           
 void setPathMatcher(org.springframework.util.PathMatcher pathMatcher)
           
 
Methods inherited from class org.springframework.web.servlet.view.XmlViewResolver
afterPropertiesSet, destroy, getCacheKey, getOrder, loadView, setLocation, setOrder
 
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
clearCache, createView, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, setCache, setCacheLimit, 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, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternViewResolver

public PatternViewResolver()
Method Detail

setPathMatcher

public void setPathMatcher(org.springframework.util.PathMatcher pathMatcher)

getPathMatcher

public org.springframework.util.PathMatcher getPathMatcher()

resolveViewName

public org.springframework.web.servlet.View resolveViewName(String viewName,
                                                            Locale locale)
                                                     throws Exception
Specified by:
resolveViewName in interface org.springframework.web.servlet.ViewResolver
Overrides:
resolveViewName in class org.springframework.web.servlet.view.AbstractCachingViewResolver
Throws:
Exception

initFactory

protected org.springframework.beans.factory.BeanFactory initFactory()
                                                             throws org.springframework.beans.BeansException
Overrides:
initFactory in class org.springframework.web.servlet.view.XmlViewResolver
Throws:
org.springframework.beans.BeansException


Copyright © 2007-2013 EDIT. All Rights Reserved.