Class ExceptionHandlers
- java.lang.Object
-
- org.craftercms.studio.controller.rest.v2.ExceptionHandlers
-
@Order(-2147483648) @RestControllerAdvice("org.craftercms.studio.controller.rest.v2") public class ExceptionHandlers extends Object
Controller advice that handles exceptions thrown by API 2 REST controllers.- Author:
- avasquez
-
-
Constructor Summary
Constructors Constructor Description ExceptionHandlers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseBody
handleActionDeniedException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.security.exception.ActionDeniedException e)
ResponseBody
handleAuthenticationException(javax.servlet.http.HttpServletRequest request, AuthenticationException e)
ResponseBody
handleBeanPropertyBindingResult(javax.servlet.http.HttpServletRequest request, org.springframework.validation.BindException e)
ResponseBody
handleClusterMemberAlreadyExistsException(javax.servlet.http.HttpServletRequest request, ClusterMemberAlreadyExistsException e)
ResponseBody
handleClusterMemberNotFoundException(javax.servlet.http.HttpServletRequest request, ClusterMemberNotFoundException e)
ResponseBody
handleCmisPathNotFoundException(javax.servlet.http.HttpServletRequest request, CmisPathNotFoundException e)
ResponseBody
handleCmisRepositoryNotFoundException(javax.servlet.http.HttpServletRequest request, CmisRepositoryNotFoundException e)
ResponseBody
handleCmisTimeoutException(javax.servlet.http.HttpServletRequest request, CmisTimeoutException e)
ResponseBody
handleCmisUnavailableException(javax.servlet.http.HttpServletRequest request, CmisUnavailableException e)
ResponseBody
handleContentNotFoundException(javax.servlet.http.HttpServletRequest request, ContentNotFoundException e)
ResponseBody
handleException(javax.servlet.http.HttpServletRequest request, Exception e)
ResponseBody
handleException(javax.servlet.http.HttpServletRequest request, org.craftercms.core.exception.PathNotFoundException e)
ResponseBody
handleException(javax.servlet.http.HttpServletRequest request, ContentAlreadyUnlockedException e)
ResponseBody
handleException(javax.servlet.http.HttpServletRequest request, ContentLockedByAnotherUserException e)
protected ResponseBody
handleExceptionInternal(javax.servlet.http.HttpServletRequest request, Exception e, ApiResponse response)
protected ResponseBody
handleExceptionInternal(javax.servlet.http.HttpServletRequest request, Exception e, ApiResponse response, String logLevel)
ResponseBody
handleGroupAlreadyExistsException(javax.servlet.http.HttpServletRequest request, GroupAlreadyExistsException e)
ResponseBody
handleGroupNotFoundException(javax.servlet.http.HttpServletRequest request, GroupNotFoundException e)
ResponseBody
handleHttpMessageNotReadableException(javax.servlet.http.HttpServletRequest request, org.springframework.http.converter.HttpMessageNotReadableException e)
ResponseBody
handleInvalidConfigurationException(javax.servlet.http.HttpServletRequest request, InvalidConfigurationException e)
ResponseBody
handleInvalidManagementTokenException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.exceptions.InvalidManagementTokenException e)
ResponseBody
handleInvalidParametersException(javax.servlet.http.HttpServletRequest request, InvalidParametersException e)
ResponseBody
handleInvalidRemoteRepositoryCredentialsException(javax.servlet.http.HttpServletRequest request, InvalidRemoteRepositoryCredentialsException e)
ResponseBody
handleInvalidRemoteUrlException(javax.servlet.http.HttpServletRequest request, InvalidRemoteUrlException e)
ResponseBody
handleMarketplaceNotInitializedException(javax.servlet.http.HttpServletRequest request, MarketplaceNotInitializedException e)
ResponseBody
handleMarketplaceUnreachableException(javax.servlet.http.HttpServletRequest request, MarketplaceUnreachableException e)
ResponseBody
handleMethodArgumentTypeMismatchException(javax.servlet.http.HttpServletRequest request, org.springframework.web.method.annotation.MethodArgumentTypeMismatchException e)
ResponseBody
handleMissingPluginParameterException(javax.servlet.http.HttpServletRequest request, MissingPluginParameterException e)
ResponseBody
handleMissingServletRequestParameterException(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.MethodArgumentNotValidException e)
ResponseBody
handleMissingServletRequestParameterException(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.MissingServletRequestParameterException e)
ResponseBody
handleOrganizationNotFoundException(javax.servlet.http.HttpServletRequest request, OrganizationNotFoundException e)
ResponseBody
handlePasswordDoesNotMatchException(javax.servlet.http.HttpServletRequest request, PasswordDoesNotMatchException e)
ResponseBody
handlePasswordRequirementsFailedException(javax.servlet.http.HttpServletRequest request, PasswordRequirementsFailedException e)
ResponseBody
handlePluginAlreadyInstalledException(javax.servlet.http.HttpServletRequest request, PluginAlreadyInstalledException e)
ResponseBody
handlePluginInstallationException(javax.servlet.http.HttpServletRequest request, PluginInstallationException e)
ResponseBody
handlePullFromRemoteConflictException(javax.servlet.http.HttpServletRequest request, PullFromRemoteConflictException e)
ResponseBody
handleRemoteAlreadyExistsException(javax.servlet.http.HttpServletRequest request, RemoteAlreadyExistsException e)
ResponseBody
handleRemoteNotRemovableException(javax.servlet.http.HttpServletRequest request, RemoteNotRemovableException e)
ResponseBody
handleRemoteRepositoryNotFoundException(javax.servlet.http.HttpServletRequest request, RemoteRepositoryNotFoundException e)
ResponseBody
handleServiceException(javax.servlet.http.HttpServletRequest request, ServiceLayerException e)
ResponseBody
handleSiteAlreadyExistsException(javax.servlet.http.HttpServletRequest request, SiteAlreadyExistsException e)
ResponseBody
handleSiteNotFoundException(javax.servlet.http.HttpServletRequest request, SiteNotFoundException e)
ResponseBody
handleStudioPathNotFoundException(javax.servlet.http.HttpServletRequest request, StudioPathNotFoundException e)
ResponseBody
handleSystemToolException(javax.servlet.http.HttpServletRequest request, SystemToolException e)
ResponseBody
handleUnrecognizedPropertyException(javax.servlet.http.HttpServletRequest request, com.fasterxml.jackson.core.JsonProcessingException e)
ResponseBody
handleUserAlreadyExistsException(javax.servlet.http.HttpServletRequest request, UserAlreadyExistsException e)
ResponseBody
handleUserNotFoundException(javax.servlet.http.HttpServletRequest request, UserNotFoundException e)
ResponseBody
handleValidationRuntimeException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.validation.ValidationRuntimeException e)
-
-
-
Method Detail
-
handleAuthenticationException
@ExceptionHandler(AuthenticationException.class) @ResponseStatus(UNAUTHORIZED) public ResponseBody handleAuthenticationException(javax.servlet.http.HttpServletRequest request, AuthenticationException e)
-
handleActionDeniedException
@ExceptionHandler(org.craftercms.commons.security.exception.ActionDeniedException.class) @ResponseStatus(FORBIDDEN) public ResponseBody handleActionDeniedException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.security.exception.ActionDeniedException e)
-
handleUserAlreadyExistsException
@ExceptionHandler(UserAlreadyExistsException.class) @ResponseStatus(CONFLICT) public ResponseBody handleUserAlreadyExistsException(javax.servlet.http.HttpServletRequest request, UserAlreadyExistsException e)
-
handleUserNotFoundException
@ExceptionHandler(UserNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleUserNotFoundException(javax.servlet.http.HttpServletRequest request, UserNotFoundException e)
-
handleGroupAlreadyExistsException
@ExceptionHandler(GroupAlreadyExistsException.class) @ResponseStatus(CONFLICT) public ResponseBody handleGroupAlreadyExistsException(javax.servlet.http.HttpServletRequest request, GroupAlreadyExistsException e)
-
handleInvalidParametersException
@ExceptionHandler(InvalidParametersException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleInvalidParametersException(javax.servlet.http.HttpServletRequest request, InvalidParametersException e)
-
handleMarketplaceNotInitializedException
@ExceptionHandler(MarketplaceNotInitializedException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public ResponseBody handleMarketplaceNotInitializedException(javax.servlet.http.HttpServletRequest request, MarketplaceNotInitializedException e)
-
handleMarketplaceUnreachableException
@ExceptionHandler(MarketplaceUnreachableException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public ResponseBody handleMarketplaceUnreachableException(javax.servlet.http.HttpServletRequest request, MarketplaceUnreachableException e)
-
handlePluginAlreadyInstalledException
@ExceptionHandler(PluginAlreadyInstalledException.class) @ResponseStatus(CONFLICT) public ResponseBody handlePluginAlreadyInstalledException(javax.servlet.http.HttpServletRequest request, PluginAlreadyInstalledException e)
-
handleMissingPluginParameterException
@ExceptionHandler(MissingPluginParameterException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleMissingPluginParameterException(javax.servlet.http.HttpServletRequest request, MissingPluginParameterException e)
-
handlePluginInstallationException
@ExceptionHandler(PluginInstallationException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public ResponseBody handlePluginInstallationException(javax.servlet.http.HttpServletRequest request, PluginInstallationException e)
-
handleServiceException
@ExceptionHandler(ServiceLayerException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public ResponseBody handleServiceException(javax.servlet.http.HttpServletRequest request, ServiceLayerException e)
-
handleOrganizationNotFoundException
@ExceptionHandler(OrganizationNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleOrganizationNotFoundException(javax.servlet.http.HttpServletRequest request, OrganizationNotFoundException e)
-
handleGroupNotFoundException
@ExceptionHandler(GroupNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleGroupNotFoundException(javax.servlet.http.HttpServletRequest request, GroupNotFoundException e)
-
handleUnrecognizedPropertyException
@ExceptionHandler(com.fasterxml.jackson.core.JsonProcessingException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleUnrecognizedPropertyException(javax.servlet.http.HttpServletRequest request, com.fasterxml.jackson.core.JsonProcessingException e)
-
handleClusterMemberNotFoundException
@ExceptionHandler(ClusterMemberNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleClusterMemberNotFoundException(javax.servlet.http.HttpServletRequest request, ClusterMemberNotFoundException e)
-
handleClusterMemberAlreadyExistsException
@ExceptionHandler(ClusterMemberAlreadyExistsException.class) @ResponseStatus(CONFLICT) public ResponseBody handleClusterMemberAlreadyExistsException(javax.servlet.http.HttpServletRequest request, ClusterMemberAlreadyExistsException e)
-
handleSiteAlreadyExistsException
@ExceptionHandler(SiteAlreadyExistsException.class) @ResponseStatus(CONFLICT) public ResponseBody handleSiteAlreadyExistsException(javax.servlet.http.HttpServletRequest request, SiteAlreadyExistsException e)
-
handleSiteNotFoundException
@ExceptionHandler(SiteNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleSiteNotFoundException(javax.servlet.http.HttpServletRequest request, SiteNotFoundException e)
-
handleRemoteAlreadyExistsException
@ExceptionHandler(RemoteAlreadyExistsException.class) @ResponseStatus(CONFLICT) public ResponseBody handleRemoteAlreadyExistsException(javax.servlet.http.HttpServletRequest request, RemoteAlreadyExistsException e)
-
handleInvalidRemoteUrlException
@ExceptionHandler(InvalidRemoteUrlException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleInvalidRemoteUrlException(javax.servlet.http.HttpServletRequest request, InvalidRemoteUrlException e)
-
handleCmisRepositoryNotFoundException
@ExceptionHandler(CmisRepositoryNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleCmisRepositoryNotFoundException(javax.servlet.http.HttpServletRequest request, CmisRepositoryNotFoundException e)
-
handleCmisTimeoutException
@ExceptionHandler(CmisTimeoutException.class) @ResponseStatus(REQUEST_TIMEOUT) public ResponseBody handleCmisTimeoutException(javax.servlet.http.HttpServletRequest request, CmisTimeoutException e)
-
handleCmisUnavailableException
@ExceptionHandler(CmisUnavailableException.class) @ResponseStatus(SERVICE_UNAVAILABLE) public ResponseBody handleCmisUnavailableException(javax.servlet.http.HttpServletRequest request, CmisUnavailableException e)
-
handleStudioPathNotFoundException
@ExceptionHandler(StudioPathNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleStudioPathNotFoundException(javax.servlet.http.HttpServletRequest request, StudioPathNotFoundException e)
-
handleCmisPathNotFoundException
@ExceptionHandler(CmisPathNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleCmisPathNotFoundException(javax.servlet.http.HttpServletRequest request, CmisPathNotFoundException e)
-
handlePasswordRequirementsFailedException
@ExceptionHandler(PasswordRequirementsFailedException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handlePasswordRequirementsFailedException(javax.servlet.http.HttpServletRequest request, PasswordRequirementsFailedException e)
-
handlePasswordDoesNotMatchException
@ExceptionHandler(PasswordDoesNotMatchException.class) @ResponseStatus(UNAUTHORIZED) public ResponseBody handlePasswordDoesNotMatchException(javax.servlet.http.HttpServletRequest request, PasswordDoesNotMatchException e)
-
handlePullFromRemoteConflictException
@ExceptionHandler(PullFromRemoteConflictException.class) @ResponseStatus(CONFLICT) public ResponseBody handlePullFromRemoteConflictException(javax.servlet.http.HttpServletRequest request, PullFromRemoteConflictException e)
-
handleContentNotFoundException
@ExceptionHandler(ContentNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleContentNotFoundException(javax.servlet.http.HttpServletRequest request, ContentNotFoundException e)
-
handleMissingServletRequestParameterException
@ExceptionHandler(org.springframework.web.bind.MissingServletRequestParameterException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleMissingServletRequestParameterException(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.MissingServletRequestParameterException e)
-
handleMissingServletRequestParameterException
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleMissingServletRequestParameterException(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.MethodArgumentNotValidException e)
-
handleHttpMessageNotReadableException
@ExceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleHttpMessageNotReadableException(javax.servlet.http.HttpServletRequest request, org.springframework.http.converter.HttpMessageNotReadableException e)
-
handleMethodArgumentTypeMismatchException
@ExceptionHandler(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleMethodArgumentTypeMismatchException(javax.servlet.http.HttpServletRequest request, org.springframework.web.method.annotation.MethodArgumentTypeMismatchException e)
-
handleInvalidManagementTokenException
@ExceptionHandler(org.craftercms.commons.exceptions.InvalidManagementTokenException.class) @ResponseStatus(UNAUTHORIZED) public ResponseBody handleInvalidManagementTokenException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.exceptions.InvalidManagementTokenException e)
-
handleBeanPropertyBindingResult
@ExceptionHandler(org.springframework.validation.BindException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleBeanPropertyBindingResult(javax.servlet.http.HttpServletRequest request, org.springframework.validation.BindException e)
-
handleRemoteNotRemovableException
@ExceptionHandler(RemoteNotRemovableException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleRemoteNotRemovableException(javax.servlet.http.HttpServletRequest request, RemoteNotRemovableException e)
-
handleException
@ExceptionHandler(org.craftercms.core.exception.PathNotFoundException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleException(javax.servlet.http.HttpServletRequest request, org.craftercms.core.exception.PathNotFoundException e)
-
handleSystemToolException
@ExceptionHandler(SystemToolException.class) @ResponseStatus(NOT_FOUND) public ResponseBody handleSystemToolException(javax.servlet.http.HttpServletRequest request, SystemToolException e)
-
handleInvalidConfigurationException
@ExceptionHandler(InvalidConfigurationException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleInvalidConfigurationException(javax.servlet.http.HttpServletRequest request, InvalidConfigurationException e)
-
handleValidationRuntimeException
@ExceptionHandler(org.craftercms.commons.validation.ValidationRuntimeException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleValidationRuntimeException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.validation.ValidationRuntimeException e)
-
handleInvalidRemoteRepositoryCredentialsException
@ExceptionHandler(InvalidRemoteRepositoryCredentialsException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleInvalidRemoteRepositoryCredentialsException(javax.servlet.http.HttpServletRequest request, InvalidRemoteRepositoryCredentialsException e)
-
handleRemoteRepositoryNotFoundException
@ExceptionHandler(RemoteRepositoryNotFoundException.class) @ResponseStatus(BAD_REQUEST) public ResponseBody handleRemoteRepositoryNotFoundException(javax.servlet.http.HttpServletRequest request, RemoteRepositoryNotFoundException e)
-
handleException
@ExceptionHandler(ContentLockedByAnotherUserException.class) @ResponseStatus(CONFLICT) public ResponseBody handleException(javax.servlet.http.HttpServletRequest request, ContentLockedByAnotherUserException e)
-
handleException
@ExceptionHandler(ContentAlreadyUnlockedException.class) @ResponseStatus(CONFLICT) public ResponseBody handleException(javax.servlet.http.HttpServletRequest request, ContentAlreadyUnlockedException e)
-
handleException
@ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public ResponseBody handleException(javax.servlet.http.HttpServletRequest request, Exception e)
-
handleExceptionInternal
protected ResponseBody handleExceptionInternal(javax.servlet.http.HttpServletRequest request, Exception e, ApiResponse response)
-
handleExceptionInternal
protected ResponseBody handleExceptionInternal(javax.servlet.http.HttpServletRequest request, Exception e, ApiResponse response, String logLevel)
-
-