Package edu.ucsb.cs.scaffold.controller
Class ApiController
java.lang.Object
edu.ucsb.cs.scaffold.controller.ApiController
- Direct Known Subclasses:
AdminsController,AssessmentController,ConceptsController,ConceptsYamlController,CourseOptionsController,CoursesController,CourseStaffController,CourseStaffCSVController,InstructorsController,JobsController,PatCredentialController,PLAssessmentController,PLAssessmentQuestionController,PLInstanceController,PLQuestionController,PLRepoController,PLScaffoldAssessmentController,RosterStudentsController,RosterStudentsCSVController,UserInfoController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgenericMessage(String message) protected CurrentUserThis method handles the IllegalArgumentException.
-
Constructor Details
-
ApiController
public ApiController()
-
-
Method Details
-
getCurrentUser
-
genericMessage
-
handleEntityNotFoundException
@ExceptionHandler(EntityNotFoundException.class) @ResponseStatus(NOT_FOUND) public Object handleEntityNotFoundException(Throwable e) -
handleForbiddenException
@ExceptionHandler(ForbiddenException.class) @ResponseStatus(FORBIDDEN) public Object handleForbiddenException(Throwable e) -
handleUnsupportedOperation
@ExceptionHandler(java.lang.UnsupportedOperationException.class) public org.springframework.http.ResponseEntity<Map<String,String>> handleUnsupportedOperation(UnsupportedOperationException ex) -
handleIllegalArgument
@ExceptionHandler(java.lang.IllegalArgumentException.class) @ResponseStatus(BAD_REQUEST) public Object handleIllegalArgument(Throwable e) This method handles the IllegalArgumentException. This maps to a 400/Bad Request.- Parameters:
e- the exception- Returns:
- a map with the type and message of the exception
-