Class RestHelper
- java.lang.Object
-
- javax.ws.rs.core.Application
-
- de.unirostock.sems.cbarchive.web.rest.RestHelper
-
-
Constructor Summary
Constructors Constructor Description RestHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response
buildErrorResponse(int status, UserManager user, String... errors)
Generates an error responseprotected javax.ws.rs.core.Response.ResponseBuilder
buildResponse(int status, UserManager user)
Generates ResponseBuilder an sets cookies, if possibleprotected javax.ws.rs.core.Response
buildTextErrorResponse(int status, UserManager user, String... errors)
Generates an error response
-
-
-
Method Detail
-
buildResponse
protected javax.ws.rs.core.Response.ResponseBuilder buildResponse(int status, UserManager user)
Generates ResponseBuilder an sets cookies, if possible- Parameters:
status
- the desired statususer
- the user- Returns:
- the ResponseBuilder
-
buildErrorResponse
protected javax.ws.rs.core.Response buildErrorResponse(int status, UserManager user, String... errors)
Generates an error response- Parameters:
status
- the desired statususer
- the usererrors
- the errors occurred- Returns:
- the error response
-
buildTextErrorResponse
protected javax.ws.rs.core.Response buildTextErrorResponse(int status, UserManager user, String... errors)
Generates an error response- Parameters:
status
- the desired statususer
- the usererrors
- the errors occurred- Returns:
- the error response
-
-