Package com.vireocode.vireo.web
Class RestUtils
java.lang.Object
com.vireocode.vireo.web.RestUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.web.server.ResponseStatusExceptionbadRequest(String message) static org.springframework.web.server.ResponseStatusExceptionstatic org.springframework.web.server.ResponseStatusExceptionstatic <T> Optional<T> getCurrentPrincipal(Class<T> principalType) static org.springframework.web.server.ResponseStatusExceptioninternalServerError(String message) static SearchablePageablemakePageable(int page, int rowsPerPage, String sortBy, String sortDirection, String searchText) static org.springframework.web.server.ResponseStatusExceptionstatic org.springframework.web.server.ResponseStatusExceptionnotImplemented(String message) static org.springframework.web.server.ResponseStatusExceptionunauthorized(String message)
-
Method Details
-
notFound
-
badRequest
-
forbidden
-
conflict
-
unauthorized
-
internalServerError
public static org.springframework.web.server.ResponseStatusException internalServerError(String message) -
notImplemented
-
makePageable
public static SearchablePageable makePageable(int page, int rowsPerPage, String sortBy, String sortDirection, String searchText) -
getCurrentPrincipal
-