Class ApiController
java.lang.Object
edu.ucsb.cs156.organic.controllers.ApiController
- Direct Known Subclasses:
CoursesController
,JobsController
,SchoolController
,StudentsController
,SystemInfoController
,UserInfoController
,UsersController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
genericMessage
(String message) protected CurrentUser
com.fasterxml.jackson.databind.ObjectMapper
Special ObjectMapper that ignores Mockito mocksstatic com.fasterxml.jackson.databind.ObjectMapper
-
Constructor Details
-
ApiController
public ApiController()
-
-
Method Details
-
getCurrentUser
-
handleIllegalArgumentException
@ExceptionHandler(java.lang.IllegalArgumentException.class) @ResponseStatus(BAD_REQUEST) public Object handleIllegalArgumentException(Throwable e) -
handleGenericException
@ExceptionHandler(EntityNotFoundException.class) @ResponseStatus(NOT_FOUND) public Object handleGenericException(Throwable e) -
handleAccessDeniedException
-
getMapper
public com.fasterxml.jackson.databind.ObjectMapper getMapper()Special ObjectMapper that ignores Mockito mocks- Returns:
- ObjectMapper mapper
-
mapperThatIgnoresMockitoMocks
public static com.fasterxml.jackson.databind.ObjectMapper mapperThatIgnoresMockitoMocks() -
genericMessage
-