Class ODataRequestBuilder


  • public class ODataRequestBuilder
    extends java.lang.Object
    A builder to create ODataRequests according to specifications in the tests.
    • 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.
      • withAcceptLanguage

        public ODataRequestBuilder withAcceptLanguage​(java.util.Locale locale)
      • withContentLanguage

        public ODataRequestBuilder withContentLanguage​(java.util.Locale locale)
      • 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​(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 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()