public class RestControllerBase extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MESSAGE_MODEL_ATTRIBUTE_NAME |
static String |
REST_BASE_URI |
| Constructor and Description |
|---|
RestControllerBase() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
createMessageModel(String attributeName,
Object attributeValue) |
Map<String,Object> |
handleAuthenticationException(javax.servlet.http.HttpServletRequest request,
AuthenticationException e) |
Map<String,Object> |
handleException(javax.servlet.http.HttpServletRequest request,
Exception e) |
Map<String,Object> |
handleForbiddenPathException(javax.servlet.http.HttpServletRequest request,
ForbiddenPathException e) |
Map<String,Object> |
handleInvalidContextException(javax.servlet.http.HttpServletRequest request,
InvalidContextException e) |
Map<String,Object> |
handlePathNotFoundException(javax.servlet.http.HttpServletRequest request,
PathNotFoundException e) |
org.craftercms.commons.validation.ValidationResult |
handleValidationException(javax.servlet.http.HttpServletRequest request,
org.craftercms.commons.validation.ValidationException e) |
org.craftercms.commons.validation.ValidationResult |
handleValidationRuntimeException(javax.servlet.http.HttpServletRequest request,
org.craftercms.commons.validation.ValidationRuntimeException e) |
public static final String REST_BASE_URI
public static final String MESSAGE_MODEL_ATTRIBUTE_NAME
@ExceptionHandler(value=InvalidContextException.class) @ResponseStatus(value=BAD_REQUEST) @ResponseBody public Map<String,Object> handleInvalidContextException(javax.servlet.http.HttpServletRequest request, InvalidContextException e)
@ExceptionHandler(value=AuthenticationException.class) @ResponseStatus(value=UNAUTHORIZED) @ResponseBody public Map<String,Object> handleAuthenticationException(javax.servlet.http.HttpServletRequest request, AuthenticationException e)
@ExceptionHandler(value=PathNotFoundException.class) @ResponseStatus(value=NOT_FOUND) @ResponseBody public Map<String,Object> handlePathNotFoundException(javax.servlet.http.HttpServletRequest request, PathNotFoundException e)
@ExceptionHandler(value=ForbiddenPathException.class) @ResponseStatus(value=FORBIDDEN) @ResponseBody public Map<String,Object> handleForbiddenPathException(javax.servlet.http.HttpServletRequest request, ForbiddenPathException e)
@ExceptionHandler(value=org.craftercms.commons.validation.ValidationException.class)
@ResponseStatus(value=BAD_REQUEST)
@ResponseBody
public org.craftercms.commons.validation.ValidationResult handleValidationException(javax.servlet.http.HttpServletRequest request,
org.craftercms.commons.validation.ValidationException e)
@ExceptionHandler(value=org.craftercms.commons.validation.ValidationRuntimeException.class)
@ResponseStatus(value=BAD_REQUEST)
@ResponseBody
public org.craftercms.commons.validation.ValidationResult handleValidationRuntimeException(javax.servlet.http.HttpServletRequest request,
org.craftercms.commons.validation.ValidationRuntimeException e)
@ExceptionHandler(value=java.lang.Exception.class) @ResponseStatus(value=INTERNAL_SERVER_ERROR) @ResponseBody public Map<String,Object> handleException(javax.servlet.http.HttpServletRequest request, Exception e)
Copyright © 2018 CrafterCMS. All rights reserved.