Class ApiResponseBuilder.Json
java.lang.Object
org.opencastproject.external.common.ApiResponseBuilder.Json
- Enclosing class:
ApiResponseBuilder
Class that handles Json responses for the external API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.ws.rs.core.Responseconflict(ApiVersion version, com.google.gson.JsonElement json) Create a conflict json response for the external apistatic javax.ws.rs.core.ResponseCreate a created json response for the external apistatic javax.ws.rs.core.Responsecreated(ApiVersion version, URI location, com.google.gson.JsonElement json) Create a created json response for the external apistatic javax.ws.rs.core.ResponseCreate an ok json response for the external apistatic javax.ws.rs.core.ResponseCreate an ok json response for the external apistatic javax.ws.rs.core.Responseok(ApiVersion version, com.google.gson.JsonElement json) Create an ok json response for the external apistatic javax.ws.rs.core.Responseok(ApiVersion version, String body) Create an ok json response for the external api
-
Constructor Details
-
Json
public Json()
-
-
Method Details
-
ok
Create an ok json response for the external api- Parameters:
version- The version that was requested for the apibody- The body of the response.- Returns:
- The new
Response
-
ok
Create an ok json response for the external api- Parameters:
acceptHeader- The accept header string that was sent by the client.body- The body of the response.- Returns:
- The new
Response
-
ok
Create an ok json response for the external api- Parameters:
version- The version that was requested for the apijson- The json body of the response.- Returns:
- The new
Response
-
ok
Create an ok json response for the external api- Parameters:
acceptHeader- The accept header string that was sent by the client.json- The json body of the response.- Returns:
- The new
Response
-
created
public static javax.ws.rs.core.Response created(String acceptHeader, URI location, com.google.gson.JsonElement json) Create a created json response for the external api- Parameters:
acceptHeader- The accept header string that was sent by the client.location- The locationjson- The json body of the response.- Returns:
- The new
Response
-
created
public static javax.ws.rs.core.Response created(ApiVersion version, URI location, com.google.gson.JsonElement json) Create a created json response for the external api- Parameters:
version- The version that was requested for the apilocation- The locationjson- The json body of the response.- Returns:
- The new
Response
-
conflict
public static javax.ws.rs.core.Response conflict(ApiVersion version, com.google.gson.JsonElement json) Create a conflict json response for the external api- Parameters:
version- The version that was requested for the apijson- The json body of the response.- Returns:
- The new
Response
-