Class AbstractUrlMethodNameResolver
- java.lang.Object
- org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
- All Implemented Interfaces:
MethodNameResolver
- Direct Known Subclasses:
InternalPathMethodNameResolver
,PropertiesMethodNameResolver
@Deprecated public abstract class AbstractUrlMethodNameResolver extends Object implements MethodNameResolver
Deprecated.as of 4.3, in favor of annotation-driven handler methodsAbstract base class for URL-basedMethodNameResolver
implementations.Provides infrastructure for mapping handlers to URLs and configurable URL lookup. For information on the latter, see the
setAlwaysUseFullPath(boolean)
"alwaysUseFullPath"} and"urlDecode"
properties.- Since:
- 14.01.2004
- Author:
- Juergen Hoeller
Constructor Summary
Constructors Constructor Description AbstractUrlMethodNameResolver()
Deprecated.
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getHandlerMethodName(HttpServletRequest request)
Deprecated.Retrieves the URL path to use for lookup and delegates togetHandlerMethodNameForUrlPath
.protected abstract String
getHandlerMethodNameForUrlPath(String urlPath)
Deprecated.Return a method name that can handle this request, based on the given lookup path.void
setAlwaysUseFullPath(boolean alwaysUseFullPath)
Deprecated.Set if URL lookup should always use full path within current servlet context.void
setUrlDecode(boolean urlDecode)
Deprecated.Set if context path and request URI should be URL-decoded.void
setUrlPathHelper(UrlPathHelper urlPathHelper)
Deprecated.Set the UrlPathHelper to use for resolution of lookup paths.
Constructor Detail
AbstractUrlMethodNameResolver
public AbstractUrlMethodNameResolver()
Deprecated.
Method Detail
setAlwaysUseFullPath
public void setAlwaysUseFullPath(boolean alwaysUseFullPath)
Deprecated.Set if URL lookup should always use full path within current servlet context. Else, the path within the current servlet mapping is used if applicable (i.e. in the case of a ".../*" servlet mapping in web.xml). Default is "false".
setUrlDecode
public void setUrlDecode(boolean urlDecode)
Deprecated.Set if context path and request URI should be URL-decoded. Both are returned undecoded by the Servlet API, in contrast to the servlet path.Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).
- See Also:
UrlPathHelper.setUrlDecode(boolean)
setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
Deprecated.Set the UrlPathHelper to use for resolution of lookup paths.Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple MethodNameResolvers and HandlerMappings.
getHandlerMethodName
public final String getHandlerMethodName(HttpServletRequest request) throws NoSuchRequestHandlingMethodException
Deprecated.Retrieves the URL path to use for lookup and delegates togetHandlerMethodNameForUrlPath
. Convertsnull
values to NoSuchRequestHandlingMethodExceptions.- Specified by:
getHandlerMethodName
in interfaceMethodNameResolver
- Parameters:
request
- current HTTP request- Returns:
- a method name that can handle this request. Never returns
null
; throws exception if not resolvable. - Throws:
NoSuchRequestHandlingMethodException
- if no handler method can be found for the given request- See Also:
getHandlerMethodNameForUrlPath(java.lang.String)
getHandlerMethodNameForUrlPath
protected abstract String getHandlerMethodNameForUrlPath(String urlPath)
Deprecated.Return a method name that can handle this request, based on the given lookup path. Called bygetHandlerMethodName
.- Parameters:
urlPath
- the URL path to use for lookup, according to the settings in this class- Returns:
- a method name that can handle this request. Should return null if no matching method found.
- See Also:
getHandlerMethodName(javax.servlet.http.HttpServletRequest)
,setAlwaysUseFullPath(boolean)
,setUrlDecode(boolean)