Class PartnerMnagementControllerAdvice


  • @RestControllerAdvice
    public class PartnerMnagementControllerAdvice
    extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
    Author:
    sanjeev.shrivastava
    • Constructor Detail

      • PartnerMnagementControllerAdvice

        public PartnerMnagementControllerAdvice()
    • Method Detail

      • getInvalidInputParameterExceptionMessage

        @ExceptionHandler(InvalidInputParameterException.class)
        public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getInvalidInputParameterExceptionMessage​(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                                                                                                InvalidInputParameterException exception)
                                                                                                                         throws IOException
        Parameters:
        httpServletRequest - this is contains servlet request
        exception - this is contains Invalid Input Parameter Exception
        Returns:
        this class contains errorCode and message
        Throws:
        IOException - this class contains Checked Exception
      • getNewPolicyIdNotExistExceptionMessage

        @ExceptionHandler(NewPolicyIdNotExistException.class)
        public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getNewPolicyIdNotExistExceptionMessage​(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                                                                                              NewPolicyIdNotExistException exception)
                                                                                                                       throws IOException
        Policy does not belong to the Policy Group of the Partner Manger
        Parameters:
        httpServletRequest - this is contains servlet request
        exception - this is contains New Policy Id Not Exist Exception
        Returns:
        this class contains errorCode and message
        Throws:
        IOException - this class contains Checked Exception
      • getPolicyNotExistExceptionMessage

        @ExceptionHandler(PolicyNotExistException.class)
        public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getPolicyNotExistExceptionMessage​(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                                                                                         PolicyNotExistException exception)
                                                                                                                  throws IOException
        Parameters:
        httpServletRequest - this is contains servlet request as a parameter
        exception - this is contains Policy Not Exist Exception as a parameter
        Returns:
        this class contains errorCode and message
        Throws:
        IOException - this class contains Checked Exception
      • getPartnerDoesNotExistExceptionMessage

        @ExceptionHandler(PartnerValidationException.class)
        public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getPartnerDoesNotExistExceptionMessage​(PartnerValidationException exception)
        Parameters:
        httpServletRequest - this is contains servlet request as a parameter
        exception - this is contain Partner Does Not Exist Exception as a parameter
        Returns:
        this class contains errorCode and message
        Throws:
        IOException - this class contains Checked Exception
      • getPartnerIdDoesNotExistExceptionMessage

        @ExceptionHandler(PartnerIdDoesNotExistException.class)
        public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getPartnerIdDoesNotExistExceptionMessage​(PartnerIdDoesNotExistException exception)
        Parameters:
        httpServletRequest - this is contains servlet request as a parameter
        exception - this is contain Partner Id Does Not Exist Exception as a Parameter
        Returns:
        this class contains errorCode and message
        Throws:
        IOException - this class contains Checked Exception
      • getPartnerApiDoesNotExistExceptionMessage

        @ExceptionHandler(PartnerAPIDoesNotExistException.class)
        public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getPartnerApiDoesNotExistExceptionMessage​(PartnerAPIDoesNotExistException exception)
        Parameters:
        httpServletRequest - this is contains servlet request as a parameter
        exception - this is contain Partner API Does Not Exist Exception as a parameter
        Returns:
        this class contains errorCode and message
        Throws:
        IOException - this class contains Checked Exception
      • handleMethodArgumentNotValid

        protected org.springframework.http.ResponseEntity<Object> handleMethodArgumentNotValid​(org.springframework.web.bind.MethodArgumentNotValidException ex,
                                                                                               org.springframework.http.HttpHeaders headers,
                                                                                               org.springframework.http.HttpStatus status,
                                                                                               org.springframework.web.context.request.WebRequest request)
        Overrides:
        handleMethodArgumentNotValid in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler