Package org.opencastproject.util
Class RestUtil.R
java.lang.Object
org.opencastproject.util.RestUtil.R
- Enclosing class:
RestUtil
Response builder functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.ResponsebadRequest(String msg) static javax.ws.rs.core.Responseconflict()static javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responselocked()static javax.ws.rs.core.Responsestatic javax.ws.rs.core.ResponsenotFound()static javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responseok()static javax.ws.rs.core.Responseok(boolean entity) static javax.ws.rs.core.ResponseCreate a response with status OK from a stream.static javax.ws.rs.core.ResponseCreate a response with status OK from a stream.static javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.ResponseCreates a precondition failed status responsestatic javax.ws.rs.core.ResponsepreconditionFailed(String message) Creates a precondition failed status response with a messagestatic javax.ws.rs.core.Responsestatic javax.ws.rs.core.Responseunauthorized(Object entity)
-
Method Details
-
ok
public static javax.ws.rs.core.Response ok() -
ok
-
ok
public static javax.ws.rs.core.Response ok(boolean entity) -
ok
-
ok
-
ok
-
ok
public static javax.ws.rs.core.Response ok(InputStream in, String contentType, Option<Long> streamLength, Option<String> fileName) Create a response with status OK from a stream.- Parameters:
in- the input stream to read fromcontentType- the content type to set the Content-Type response header tostreamLength- an optional value for the Content-Length response headerfileName- an optional file name for the Content-Disposition response header
-
ok
public static javax.ws.rs.core.Response ok(InputStream in, Option<String> contentType, Option<Long> streamLength, Option<String> fileName) Create a response with status OK from a stream.- Parameters:
in- the input stream to read fromcontentType- the content type to set the Content-Type response header tostreamLength- an optional value for the Content-Length response headerfileName- an optional file name for the Content-Disposition response header
-
created
-
notFound
public static javax.ws.rs.core.Response notFound() -
notFound
-
notFound
-
locked
public static javax.ws.rs.core.Response locked() -
serverError
public static javax.ws.rs.core.Response serverError() -
conflict
public static javax.ws.rs.core.Response conflict() -
noContent
public static javax.ws.rs.core.Response noContent() -
badRequest
public static javax.ws.rs.core.Response badRequest() -
badRequest
-
forbidden
public static javax.ws.rs.core.Response forbidden() -
forbidden
-
unauthorized
-
conflict
-
preconditionFailed
public static javax.ws.rs.core.Response preconditionFailed()Creates a precondition failed status response- Returns:
- a precondition failed status response
-
preconditionFailed
Creates a precondition failed status response with a message- Parameters:
message- The message body- Returns:
- a precondition failed status response with a message
-