Class ODataRequestBuilder

java.lang.Object
de.hybris.platform.odata2webservices.odata.builders.ODataRequestBuilder

public class ODataRequestBuilder extends Object
A builder to create ODataRequests according to specifications in the tests.
  • Method Details

    • 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(String mediaType)
    • withAcceptLanguage

      public ODataRequestBuilder withAcceptLanguage(Locale locale)
    • withContentLanguage

      public ODataRequestBuilder withContentLanguage(Locale locale)
    • withContentType

      public ODataRequestBuilder withContentType(String type)
    • withHeader

      public ODataRequestBuilder withHeader(String headerName, String... values)
    • withParameters

      public ODataRequestBuilder withParameters(Map<String,String> params)
    • withParameters

      public ODataRequestBuilder withParameters(String... paramNames)
    • withParameter

      public ODataRequestBuilder withParameter(String name, 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(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(String content, Charset charset)
      Specifies body for the POST request
      Parameters:
      content - content of the body
      charset - encoding of the body
      Returns:
      a builder with the POST request body specified
    • build

      public org.apache.olingo.odata2.api.processor.ODataRequest build()