Class HvlAuthzRestExceptionHandler
java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
tr.com.havelsan.javarch.service.handler.HvlRestExceptionHandler
tr.com.havelsan.javarch.oauth.authz.starter.exception.HvlAuthzRestExceptionHandler
@ControllerAdvice
public class HvlAuthzRestExceptionHandler
extends tr.com.havelsan.javarch.service.handler.HvlRestExceptionHandler
An exception handler class for bpmn admin operations.
-
Field Summary
Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
-
Constructor Summary
ConstructorDescriptionHvlAuthzRestExceptionHandler
(tr.com.havelsan.javarch.service.configuration.properties.HvlServiceProperties serviceProperties) Instantiates a new Hvl authz rest exception handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.http.ResponseEntity<Object>
handleDataIntegrityViolation
(org.springframework.dao.DataIntegrityViolationException ex) Handle data integrity violation response entity.protected org.springframework.http.ResponseEntity<Object>
handleEmptyResultDataAccessException
(tr.com.havelsan.javarch.data.commons.exception.HvlEmptyResultDataAccessException ex) Handle empty result data access exception response entity.protected org.springframework.http.ResponseEntity<Object>
handleHibernateConstraintViolation
(org.hibernate.exception.ConstraintViolationException ex) Handle hibernate constraint violation response entity.protected org.springframework.http.ResponseEntity<Object>
handleJavaConstraintViolation
(javax.validation.ConstraintViolationException ex) Handle java constraint violation response entity.protected org.springframework.http.ResponseEntity<Object>
handleMethodArgumentNotValid
(org.springframework.web.bind.MethodArgumentNotValidException methodArgumentNotValidException, org.springframework.http.HttpHeaders httpHeaders, org.springframework.http.HttpStatus httpStatus, org.springframework.web.context.request.WebRequest webRequest) protected org.springframework.http.ResponseEntity<Object>
Handle oauth exception response entity.protected org.springframework.http.ResponseEntity<Object>
handleOptimisticLock
(org.springframework.orm.ObjectOptimisticLockingFailureException ex) Handle optimistic lock response entity.protected org.springframework.http.ResponseEntity<Object>
handlePersistenceException
(javax.persistence.PersistenceException ex) Handle persistence exception response entity.protected org.springframework.http.ResponseEntity<Object>
handleTransactionalConstraintViolation
(org.springframework.transaction.TransactionSystemException ex) Handle transactional constraint violation response entity.Methods inherited from class tr.com.havelsan.javarch.service.handler.HvlRestExceptionHandler
handle, handleAsyncRequestTimeoutException, handleBindException, handleChecked, handleConversionNotSupported, handleExceptionInternal, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatch, handleUnchecked
Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
handleException
-
Constructor Details
-
HvlAuthzRestExceptionHandler
public HvlAuthzRestExceptionHandler(tr.com.havelsan.javarch.service.configuration.properties.HvlServiceProperties serviceProperties) Instantiates a new Hvl authz rest exception handler.- Parameters:
serviceProperties
- the service properties
-
-
Method Details
-
handleOptimisticLock
@ExceptionHandler(org.springframework.orm.ObjectOptimisticLockingFailureException.class) protected org.springframework.http.ResponseEntity<Object> handleOptimisticLock(org.springframework.orm.ObjectOptimisticLockingFailureException ex) Handle optimistic lock response entity.- Parameters:
ex
- the ex- Returns:
- the response entity
-
handleTransactionalConstraintViolation
@ExceptionHandler(org.springframework.transaction.TransactionSystemException.class) protected org.springframework.http.ResponseEntity<Object> handleTransactionalConstraintViolation(org.springframework.transaction.TransactionSystemException ex) Handle transactional constraint violation response entity.- Parameters:
ex
- the ex- Returns:
- the response entity
-
handlePersistenceException
@ExceptionHandler(javax.persistence.PersistenceException.class) protected org.springframework.http.ResponseEntity<Object> handlePersistenceException(javax.persistence.PersistenceException ex) Handle persistence exception response entity.- Parameters:
ex
- the ex- Returns:
- the response entity
-
handleJavaConstraintViolation
@ExceptionHandler(javax.validation.ConstraintViolationException.class) protected org.springframework.http.ResponseEntity<Object> handleJavaConstraintViolation(javax.validation.ConstraintViolationException ex) Handle java constraint violation response entity.- Parameters:
ex
- the ex- Returns:
- the response entity
-
handleHibernateConstraintViolation
@ExceptionHandler(org.hibernate.exception.ConstraintViolationException.class) protected org.springframework.http.ResponseEntity<Object> handleHibernateConstraintViolation(org.hibernate.exception.ConstraintViolationException ex) Handle hibernate constraint violation response entity.- Parameters:
ex
- the ex- Returns:
- the response entity
-
handleDataIntegrityViolation
@ExceptionHandler(org.springframework.dao.DataIntegrityViolationException.class) protected org.springframework.http.ResponseEntity<Object> handleDataIntegrityViolation(org.springframework.dao.DataIntegrityViolationException ex) Handle data integrity violation response entity.- Parameters:
ex
- the ex- Returns:
- the response entity
-
handleMethodArgumentNotValid
protected org.springframework.http.ResponseEntity<Object> handleMethodArgumentNotValid(org.springframework.web.bind.MethodArgumentNotValidException methodArgumentNotValidException, org.springframework.http.HttpHeaders httpHeaders, org.springframework.http.HttpStatus httpStatus, org.springframework.web.context.request.WebRequest webRequest) - Overrides:
handleMethodArgumentNotValid
in classtr.com.havelsan.javarch.service.handler.HvlRestExceptionHandler
-
handleOAuthException
@ExceptionHandler(HvlOAuthException.class) protected org.springframework.http.ResponseEntity<Object> handleOAuthException(HvlOAuthException ex) Handle oauth exception response entity.- Parameters:
ex
- the ex- Returns:
- the response entity
-
handleEmptyResultDataAccessException
@ExceptionHandler(tr.com.havelsan.javarch.data.commons.exception.HvlEmptyResultDataAccessException.class) protected org.springframework.http.ResponseEntity<Object> handleEmptyResultDataAccessException(tr.com.havelsan.javarch.data.commons.exception.HvlEmptyResultDataAccessException ex) Handle empty result data access exception response entity.- Parameters:
ex
- the empty result data access exception- Returns:
- the response entity
-