Class ApiController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
- Direct Known Subclasses:
AnnouncementsController
,ChatMessageController
,CommonsController
,JobsController
,ProfitsController
,ReportsController
,SystemInfoController
,UserCommonsController
,UserInfoController
,UsersController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
genericMessage
(String message) protected CurrentUser
-
Constructor Details
-
ApiController
public ApiController()
-
-
Method Details
-
getCurrentUser
-
genericMessage
-
handleGenericException
@ExceptionHandler(EntityNotFoundException.class) @ResponseStatus(NOT_FOUND) public Object handleGenericException(Throwable e) -
handleBadRequest
@ExceptionHandler({NoCowsException.class,NotEnoughMoneyException.class}) @ResponseStatus(BAD_REQUEST) public Object handleBadRequest(Throwable e)
-