Module net.shibboleth.ext.spring
Package net.shibboleth.ext.spring.error
Class ExtendedMappingExceptionResolver
- java.lang.Object
-
- org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
-
- org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
-
- net.shibboleth.ext.spring.error.ExtendedMappingExceptionResolver
-
- All Implemented Interfaces:
Ordered,HandlerExceptionResolver
public class ExtendedMappingExceptionResolver extends SimpleMappingExceptionResolver
Custom Spring exception to view mapper that populates the view model with data obtained via an extension function.As a default, the view model will include a reference to the active
HttpServletRequestand theHTMLEncoderclass.
-
-
Field Summary
Fields Modifier and Type Field Description private static StringMODEL_ATTR_ENCODERModel attribute carrying theHTMLEncoderclass.private static StringMODEL_ATTR_REQUESTModel attribute carryingHttpServletRequest.private static StringMODEL_ATTR_SPRINGCONTEXTModel attribute carryingWebApplicationContext.private Function<javax.servlet.http.HttpServletRequest,Map<String,Object>>viewModelExtenderFunctionFunction to obtain extensions to view model.-
Fields inherited from class org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
DEFAULT_EXCEPTION_ATTRIBUTE
-
Fields inherited from class org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
logger
-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description ExtendedMappingExceptionResolver()Constructor.ExtendedMappingExceptionResolver(Function<javax.servlet.http.HttpServletRequest,Map<String,Object>> extender)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ModelAndViewgetModelAndView(String viewName, Exception ex, javax.servlet.http.HttpServletRequest request)-
Methods inherited from class org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
addStatusCode, applyStatusCodeIfPossible, determineStatusCode, determineViewName, doResolveException, findMatchingViewName, getDepth, getModelAndView, getModelAndView, getStatusCodesAsMap, setDefaultErrorView, setDefaultStatusCode, setExceptionAttribute, setExceptionMappings, setExcludedExceptions, setStatusCodes
-
Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
buildLogMessage, getOrder, logException, prepareResponse, preventCaching, resolveException, setMappedHandlerClasses, setMappedHandlers, setOrder, setPreventResponseCaching, setWarnLogCategory, shouldApplyTo
-
-
-
-
Field Detail
-
MODEL_ATTR_REQUEST
@Nonnull private static final String MODEL_ATTR_REQUEST
Model attribute carryingHttpServletRequest.- See Also:
- Constant Field Values
-
MODEL_ATTR_SPRINGCONTEXT
@Nonnull private static final String MODEL_ATTR_SPRINGCONTEXT
Model attribute carryingWebApplicationContext.- See Also:
- Constant Field Values
-
MODEL_ATTR_ENCODER
@Nonnull private static final String MODEL_ATTR_ENCODER
Model attribute carrying theHTMLEncoderclass.- See Also:
- Constant Field Values
-
-
Method Detail
-
getModelAndView
protected ModelAndView getModelAndView(String viewName, Exception ex, javax.servlet.http.HttpServletRequest request)
-
-