Class ODataRequestBuilder
- java.lang.Object
-
- de.hybris.platform.odata2webservices.odata.builders.ODataRequestBuilder
-
public class ODataRequestBuilder extends java.lang.ObjectA builder to createODataRequests according to specifications in the tests.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.olingo.odata2.api.processor.ODataRequestbuild()static ODataRequestBuilderoDataDeleteRequest()Creates new instance of the builder for building a DELETE request.static ODataRequestBuilderoDataGetRequest()Creates new instance of the builder for building a GET request.static ODataRequestBuilderoDataPatchRequest()Creates new instance of the builder for building a PATCH request.static ODataRequestBuilderoDataPostRequest()Creates new instance of the builder for building a POST request.ODataRequestBuilderwithAcceptLanguage(java.util.Locale locale)ODataRequestBuilderwithAccepts(java.lang.String mediaType)ODataRequestBuilderwithBody(JsonBuilder content)Specifies body for the POST request.ODataRequestBuilderwithBody(java.lang.String content)Specifies body for the POST request.ODataRequestBuilderwithBody(java.lang.String content, java.nio.charset.Charset charset)Specifies body for the POST requestODataRequestBuilderwithContentLanguage(java.util.Locale locale)ODataRequestBuilderwithContentType(java.lang.String type)ODataRequestBuilderwithHeader(java.lang.String headerName, java.lang.String... values)ODataRequestBuilderwithParameter(java.lang.String name, java.lang.Object value)ODataRequestBuilderwithParameters(java.lang.String... paramNames)ODataRequestBuilderwithParameters(java.util.Map<java.lang.String,java.lang.String> params)ODataRequestBuilderwithPathInfo(PathInfoBuilder builder)ODataRequestBuilderwithPathInfo(org.apache.olingo.odata2.core.PathInfoImpl info)
-
-
-
Method Detail
-
oDataGetRequest
public static ODataRequestBuilder oDataGetRequest()
Creates new instance of the builder for building a GET request.- Returns:
- instance of the builder, which has no specifications done to it.
-
oDataPostRequest
public static ODataRequestBuilder oDataPostRequest()
Creates new instance of the builder for building a POST request.- Returns:
- instance of the builder, which has no specifications done to it.
-
oDataDeleteRequest
public static ODataRequestBuilder oDataDeleteRequest()
Creates new instance of the builder for building a DELETE request.- Returns:
- instance of the builder, which has no specifications done to it.
-
oDataPatchRequest
public static ODataRequestBuilder oDataPatchRequest()
Creates new instance of the builder for building a PATCH request.- Returns:
- instance of the builder, which has no specifications done to it.
-
withAccepts
public ODataRequestBuilder withAccepts(java.lang.String mediaType)
-
withAcceptLanguage
public ODataRequestBuilder withAcceptLanguage(java.util.Locale locale)
-
withContentLanguage
public ODataRequestBuilder withContentLanguage(java.util.Locale locale)
-
withContentType
public ODataRequestBuilder withContentType(java.lang.String type)
-
withHeader
public ODataRequestBuilder withHeader(java.lang.String headerName, java.lang.String... values)
-
withParameters
public ODataRequestBuilder withParameters(java.util.Map<java.lang.String,java.lang.String> params)
-
withParameters
public ODataRequestBuilder withParameters(java.lang.String... paramNames)
-
withParameter
public ODataRequestBuilder withParameter(java.lang.String name, java.lang.Object value)
-
withPathInfo
public ODataRequestBuilder withPathInfo(PathInfoBuilder builder)
-
withPathInfo
public ODataRequestBuilder withPathInfo(org.apache.olingo.odata2.core.PathInfoImpl info)
-
withBody
public ODataRequestBuilder withBody(JsonBuilder content)
Specifies body for the POST request. It's implied that UTF-8 encoding is used for the specified body.- Parameters:
content- a builder containing specification of the body to be sent as "application/json" content type.- Returns:
- a builder with the POST request body specified
-
withBody
public ODataRequestBuilder withBody(java.lang.String content)
Specifies body for the POST request. It's implied that UTF-8 encoding is used for the specified body.- Parameters:
content- content of the body- Returns:
- a builder with the POST request body specified
-
withBody
public ODataRequestBuilder withBody(java.lang.String content, java.nio.charset.Charset charset)
Specifies body for the POST request- Parameters:
content- content of the bodycharset- encoding of the body- Returns:
- a builder with the POST request body specified
-
build
public org.apache.olingo.odata2.api.processor.ODataRequest build()
-
-