Class DefaultNuxeoExceptionHandler
java.lang.Object
org.nuxeo.ecm.platform.web.common.exceptionhandling.DefaultNuxeoExceptionHandler
- All Implemented Interfaces:
 NuxeoExceptionHandler
- Direct Known Subclasses:
 SecurityExceptionHandler,ShibbolethSecurityExceptionHandler
- Author:
 - arussel
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.databind.ObjectMapperprotected NuxeoExceptionHandlerParametersFields inherited from interface org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionHandler
EXCEPTION_HANDLER_MARKER - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetExceptionMessage(String message, int status) protected ErrorHandlergetLoginURL(jakarta.servlet.http.HttpServletRequest request) Gets the URL to redirect to when a login is needed for an Anonymous user.protected PrincipalgetPrincipal(jakarta.servlet.http.HttpServletRequest request) booleanhandleAnonymousException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handles the Security Error when the user is anonymous.voidhandleException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Throwable t) voidsetParameters(NuxeoExceptionHandlerParameters parameters) protected voidstartHandlingException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Throwable t) Puts a marker in request to avoid looping over the exception handling mechanismprotected voidwriteExceptionAsJson(jakarta.servlet.http.HttpServletResponse response, int status, Throwable e)  
- 
Field Details
- 
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER - 
parameters
 
 - 
 - 
Constructor Details
- 
DefaultNuxeoExceptionHandler
public DefaultNuxeoExceptionHandler() 
 - 
 - 
Method Details
- 
setParameters
- Specified by:
 setParametersin interfaceNuxeoExceptionHandler
 - 
startHandlingException
protected void startHandlingException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Throwable t) throws jakarta.servlet.ServletException Puts a marker in request to avoid looping over the exception handling mechanism- Throws:
 jakarta.servlet.ServletException- if request has already been marked as handled. The initial exception is then wrapped.
 - 
handleException
public void handleException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Throwable t) throws IOException, jakarta.servlet.ServletException - Specified by:
 handleExceptionin interfaceNuxeoExceptionHandler- Throws:
 IOExceptionjakarta.servlet.ServletException
 - 
handleAnonymousException
public boolean handleAnonymousException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException Description copied from interface:NuxeoExceptionHandlerHandles the Security Error when the user is anonymous.- Specified by:
 handleAnonymousExceptionin interfaceNuxeoExceptionHandler- Returns:
 trueif the Security Error is handled so that the calling method won't fallback on the default handler,falseotherwise.- Throws:
 IOExceptionjakarta.servlet.ServletException
 - 
getLoginURL
Description copied from interface:NuxeoExceptionHandlerGets the URL to redirect to when a login is needed for an Anonymous user.- Specified by:
 getLoginURLin interfaceNuxeoExceptionHandler
 - 
getHandler
 - 
getPrincipal
 - 
writeExceptionAsJson
protected void writeExceptionAsJson(jakarta.servlet.http.HttpServletResponse response, int status, Throwable e) throws IOException - Throws:
 IOException
 - 
getExceptionMessage
 
 -