public class DefaultNuxeoExceptionHandler extends Object implements NuxeoExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected NuxeoExceptionHandlerParameters |
parameters |
EXCEPTION_HANDLER_MARKER
Constructor and Description |
---|
DefaultNuxeoExceptionHandler() |
Modifier and Type | Method and Description |
---|---|
protected ErrorHandler |
getHandler(Throwable t) |
String |
getLoginURL(javax.servlet.http.HttpServletRequest request)
Gets the URL to redirect to when a login is needed for an Anonymous user.
|
protected Principal |
getPrincipal(javax.servlet.http.HttpServletRequest request) |
protected Object |
getUserMessage(String messageKey,
Locale locale) |
boolean |
handleAnonymousException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the Security Error when the user is anonymous.
|
void |
handleException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Throwable t) |
void |
setParameters(NuxeoExceptionHandlerParameters parameters) |
protected void |
startHandlingException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Throwable t)
Puts a marker in request to avoid looping over the exception handling mechanism
|
protected NuxeoExceptionHandlerParameters parameters
public DefaultNuxeoExceptionHandler()
public void setParameters(NuxeoExceptionHandlerParameters parameters)
setParameters
in interface NuxeoExceptionHandler
protected void startHandlingException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Throwable t) throws javax.servlet.ServletException
javax.servlet.ServletException
- if request has already been marked as handled. The initial exception is then wrapped.public void handleException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Throwable t) throws IOException, javax.servlet.ServletException
handleException
in interface NuxeoExceptionHandler
IOException
javax.servlet.ServletException
public boolean handleAnonymousException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
NuxeoExceptionHandler
handleAnonymousException
in interface NuxeoExceptionHandler
true
if the Security Error is handled so that the calling method won't fallback on the default
handler, false
otherwise.IOException
javax.servlet.ServletException
public String getLoginURL(javax.servlet.http.HttpServletRequest request)
NuxeoExceptionHandler
getLoginURL
in interface NuxeoExceptionHandler
protected ErrorHandler getHandler(Throwable t)
protected Object getUserMessage(String messageKey, Locale locale)
protected Principal getPrincipal(javax.servlet.http.HttpServletRequest request)
Copyright © 2017 Nuxeo. All rights reserved.