Class PartnerMnagementControllerAdvice
- java.lang.Object
-
- org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
- io.mosip.pmp.partnermanagement.exception.PartnerMnagementControllerAdvice
-
@RestControllerAdvice public class PartnerMnagementControllerAdvice extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler- Author:
- sanjeev.shrivastava
-
-
Constructor Summary
Constructors Constructor Description PartnerMnagementControllerAdvice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getErrorMassage(javax.servlet.http.HttpServletRequest httpServletRequest, BaseUncheckedException baseUncheckedException)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getErrorMsg(BaseUncheckedException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getExceptionMassage(javax.servlet.http.HttpServletRequest httpServletRequest, RuntimeException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getInvalidInputParameterExceptionMessage(javax.servlet.http.HttpServletRequest httpServletRequest, InvalidInputParameterException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getNewPolicyIdNotExistExceptionMessage(javax.servlet.http.HttpServletRequest httpServletRequest, NewPolicyIdNotExistException exception)Policy does not belong to the Policy Group of the Partner Mangerorg.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getNoPartnerApiKeyRequestExceptionMessage(NoPartnerApiKeyRequestsException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getPartnerApiDoesNotExistExceptionMessage(PartnerAPIDoesNotExistException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getPartnerApiKeyDoesNotBelongToThePolicyGroupExceptionMessage(PartnerApiKeyDoesNotBelongToThePolicyGroupOfThePartnerMangerException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getPartnerAPIKeyDoesNotExistExceptionMassage(javax.servlet.http.HttpServletRequest httpServletRequest, PartnerAPIKeyDoesNotExistException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getPartnerDoesNotExistExceptionMessage(PartnerValidationException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getPartnerIdDoesNotExistExceptionMessage(PartnerIdDoesNotExistException exception)org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>>getPolicyNotExistExceptionMessage(javax.servlet.http.HttpServletRequest httpServletRequest, PolicyNotExistException exception)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)-
Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleException, handleExceptionInternal, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatch
-
-
-
-
Method Detail
-
getErrorMassage
public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getErrorMassage(javax.servlet.http.HttpServletRequest httpServletRequest, BaseUncheckedException baseUncheckedException) throws IOException
- Throws:
IOException
-
getErrorMsg
public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getErrorMsg(BaseUncheckedException exception)
-
getPartnerAPIKeyDoesNotExistExceptionMassage
@ExceptionHandler(PartnerAPIKeyDoesNotExistException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getPartnerAPIKeyDoesNotExistExceptionMassage(javax.servlet.http.HttpServletRequest httpServletRequest, PartnerAPIKeyDoesNotExistException exception) throws IOException
- Parameters:
httpServletRequest- this is contains servlet requestexception- this is contains Partner API Key Does Not Exist Exception- Returns:
- this class contains errorCode and message
- Throws:
IOException- this class contains Checked Exception
-
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 requestexception- 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 requestexception- 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 parameterexception- 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 parameterexception- 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 parameterexception- 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
-
getNoPartnerApiKeyRequestExceptionMessage
@ExceptionHandler(NoPartnerApiKeyRequestsException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getNoPartnerApiKeyRequestExceptionMessage(NoPartnerApiKeyRequestsException exception)
- Parameters:
httpServletRequest- this is contains servlet request as a parameterexception- this is contain No Partner ApiKey Requests Exception as a parameter- Returns:
- this class contains errorCode and message
- Throws:
IOException- this class contains Checked Exception
-
getPartnerApiKeyDoesNotBelongToThePolicyGroupExceptionMessage
@ExceptionHandler(PartnerApiKeyDoesNotBelongToThePolicyGroupOfThePartnerMangerException.class) public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getPartnerApiKeyDoesNotBelongToThePolicyGroupExceptionMessage(PartnerApiKeyDoesNotBelongToThePolicyGroupOfThePartnerMangerException exception)
- Parameters:
httpServletRequest- this is contains servlet request as a parameterexception- this is contain No Partner ApiKey Requests 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 parameterexception- 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
-
getExceptionMassage
@ExceptionHandler({java.lang.Exception.class,java.lang.RuntimeException.class}) public org.springframework.http.ResponseEntity<ResponseWrapper<ErrorResponse>> getExceptionMassage(javax.servlet.http.HttpServletRequest httpServletRequest, RuntimeException exception) throws IOException- Parameters:
httpServletRequest- this is contains servlet request as a parameterexception- this is contain Runtime 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:
handleMethodArgumentNotValidin classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
-