Class RestFsmResponseEntityExceptionHandler

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
overit.geocall.rs.utils.RestResponseEntityExceptionHandler
overit.geocallapp.utilities.rs.RestFsmResponseEntityExceptionHandler
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware

@ControllerAdvice @Order(1) public class RestFsmResponseEntityExceptionHandler extends overit.geocall.rs.utils.RestResponseEntityExceptionHandler
Specialized exception handler for REST services that extends RestResponseEntityExceptionHandler.
Provides custom handling for DAValidateException with enhanced message translation and formatting capabilities.
This handler takes precedence over other exception handlers due to its Order annotation with value 1.
Since:
1.0
  • Field Summary

    Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<Object>
    handleDAValidateException(DAValidateException ex, org.springframework.web.context.request.WebRequest request)
    Handles DAValidateException instances with custom message translation and formatting.

    Methods inherited from class overit.geocall.rs.utils.RestResponseEntityExceptionHandler

    createProblemDetail, handleConstraintViolationException, handleDAException, handleEDMConstraintException, handleEDMException, handleGenericException, handleHandlerMethodValidationException, handleLicensingException, handleLicensingException, handleMethodArgumentNotValid, handleMicroExceptionException

    Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    createResponseEntity, getMessageSource, handleAsyncRequestNotUsableException, handleAsyncRequestTimeoutException, handleConversionNotSupported, handleErrorResponseException, handleException, handleExceptionInternal, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMaxUploadSizeExceededException, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RestFsmResponseEntityExceptionHandler

      public RestFsmResponseEntityExceptionHandler()
  • Method Details

    • handleDAValidateException

      public org.springframework.http.ResponseEntity<Object> handleDAValidateException(DAValidateException ex, org.springframework.web.context.request.WebRequest request)
      Handles DAValidateException instances with custom message translation and formatting. If the exception has a code, delegates to the parent handler; otherwise, provides custom handling with message translation. Uses the current user's Teacher for message translation and supports parameterized messages.
      Overrides:
      handleDAValidateException in class overit.geocall.rs.utils.RestResponseEntityExceptionHandler
      Parameters:
      ex - the DAValidateException to handle
      request - the current WebRequest
      Returns:
      a ResponseEntity containing the error response with translated message