Class PolicyExceptionAdvisor

java.lang.Object
com.broadleafcommerce.data.tracking.core.web.PolicyExceptionAdvisor

@RestControllerAdvice(annotations=org.springframework.web.bind.annotation.ResponseBody.class) public class PolicyExceptionAdvisor extends Object
Default controller exception handler for Policy related validation problems. To override, introduce a new ControllerAdvice annotate class with differing ExceptionHandler annotated methods and annotate the class with a higher precedence Order annotation.
Author:
Jeff Fischer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.broadleafcommerce.common.error.validation.web.ExceptionHandlerUtils
     
    org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError>
    handleNotMutableException(Exception ex, org.springframework.web.context.request.WebRequest request)
     
    org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError>
    handleNotPermittedException(Exception ex, org.springframework.web.context.request.WebRequest request)
     
    org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError>
    handleNotVisibleException(Exception ex, org.springframework.web.context.request.WebRequest request)
     
    protected void
    logDebug(Exception ex, org.springframework.web.context.request.WebRequest request)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated in favor of central logging managed by ExceptionHandlerUtils.
    void
    setExceptionHandlerUtils(com.broadleafcommerce.common.error.validation.web.ExceptionHandlerUtils exceptionHandlerUtils)
     

    Methods inherited from class java.lang.Object

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

    • PolicyExceptionAdvisor

      public PolicyExceptionAdvisor()
  • Method Details

    • handleNotVisibleException

      @ExceptionHandler(NotVisibleException.class) public org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> handleNotVisibleException(Exception ex, org.springframework.web.context.request.WebRequest request)
    • handleNotPermittedException

      @ExceptionHandler(NotPermittedException.class) public org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> handleNotPermittedException(Exception ex, org.springframework.web.context.request.WebRequest request)
    • handleNotMutableException

      @ExceptionHandler(NotMutableException.class) public org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> handleNotMutableException(Exception ex, org.springframework.web.context.request.WebRequest request)
    • logDebug

      @Deprecated(forRemoval=true) protected void logDebug(Exception ex, org.springframework.web.context.request.WebRequest request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated in favor of central logging managed by ExceptionHandlerUtils.
    • getExceptionHandlerUtils

      protected com.broadleafcommerce.common.error.validation.web.ExceptionHandlerUtils getExceptionHandlerUtils()
    • setExceptionHandlerUtils

      @Autowired public void setExceptionHandlerUtils(com.broadleafcommerce.common.error.validation.web.ExceptionHandlerUtils exceptionHandlerUtils)