Package com.patreonshout.rest
Class BaseSvc
java.lang.Object
com.patreonshout.rest.BaseSvc
- Direct Known Subclasses:
- ListsRepositoryImpl,- ListSvc,- PostsRepositoryImpl,- PostSvc,- ReceiverSvc,- SearchFiltersRepositoryImpl,- SearchFilterSvc,- TagSvc,- WebAccountSvc
@CrossOrigin
public class BaseSvc
extends java.lang.Object
Parental service that any 
RestController objects must extend. Contains controller-wide Exception Handler.- 
Constructor SummaryConstructors Constructor Description BaseSvc()
- 
Method SummaryModifier and Type Method Description org.springframework.http.ResponseEntity<?>catchCustomException(PSException ex)org.springframework.http.ResponseEntity<?>catchSQLIntegrityConstraintViolationException(java.sql.SQLIntegrityConstraintViolationException ex)Handles everySQLIntegrityConstraintViolationExceptionexception thrown by controllers.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- 
Constructor Details- 
BaseSvcpublic BaseSvc()
 
- 
- 
Method Details- 
catchSQLIntegrityConstraintViolationException@ExceptionHandler(java.sql.SQLIntegrityConstraintViolationException.class) public org.springframework.http.ResponseEntity<?> catchSQLIntegrityConstraintViolationException(java.sql.SQLIntegrityConstraintViolationException ex)Handles everySQLIntegrityConstraintViolationExceptionexception thrown by controllers.- Parameters:
- ex- Auto-provided- SQLIntegrityConstraintViolationExceptionobject.
- Returns:
- Jackson JSON compatible ResponseEntitycontaining an HTTP error code and message.
 
- 
catchCustomException@ExceptionHandler(PSException.class) public org.springframework.http.ResponseEntity<?> catchCustomException(PSException ex)
 
-