org.odata4j.consumer
Class ODataClientRequest

java.lang.Object
  extended by org.odata4j.consumer.ODataClientRequest

public class ODataClientRequest
extends Object

Generic OData http request builder. Only interesting for developers of custom OClientBehavior implementations.


Method Summary
static ODataClientRequest delete(String url)
          Creates a new DELETE request.
 ODataClientRequest entry(Entry entry)
          Sets the normalized OData payload.
static ODataClientRequest get(String url)
          Creates a new GET request.
 Entry getEntry()
          Gets the normalized OData payload.
 Map<String,String> getHeaders()
          Gets the request http headers.
 String getMethod()
          Gets the request http method.
 Map<String,String> getQueryParams()
          Gets the request query parameters.
 String getUrl()
          Gets the request url.
 ODataClientRequest header(String name, String value)
          Sets an http request header.
static ODataClientRequest merge(String url, Entry entry)
          Creates a new MERGE request.
 ODataClientRequest method(String method)
          Sets the http request method.
static ODataClientRequest post(String url, Entry entry)
          Creates a new POST request.
static ODataClientRequest put(String url, Entry entry)
          Creates a new PUT request.
 ODataClientRequest queryParam(String name, String value)
          Sets a request query parameter.
 ODataClientRequest url(String url)
          Sets the request url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

delete

public static ODataClientRequest delete(String url)
Creates a new DELETE request.

Parameters:
url - the request url
Returns:
a new request builder

entry

public ODataClientRequest entry(Entry entry)
Sets the normalized OData payload.

Parameters:
entry - the payload
Returns:
the request builder

get

public static ODataClientRequest get(String url)
Creates a new GET request.

Parameters:
url - the request url
Returns:
a new request builder

getEntry

public Entry getEntry()
Gets the normalized OData payload.

Returns:
the normalized OData payload

getHeaders

public Map<String,String> getHeaders()
Gets the request http headers.

Returns:
the headers

getMethod

public String getMethod()
Gets the request http method.

Returns:
the http method

getQueryParams

public Map<String,String> getQueryParams()
Gets the request query parameters.

Returns:
the query parameters

getUrl

public String getUrl()
Gets the request url.

Returns:
the url

header

public ODataClientRequest header(String name,
                                 String value)
Sets an http request header.

Parameters:
name - the header name
value - the header value
Returns:
the request builder

merge

public static ODataClientRequest merge(String url,
                                       Entry entry)
Creates a new MERGE request.

Parameters:
url - the request url
entry - the normalized OData payload
Returns:
a new request builder

method

public ODataClientRequest method(String method)
Sets the http request method.

Parameters:
method - the method
Returns:
the request builder

post

public static ODataClientRequest post(String url,
                                      Entry entry)
Creates a new POST request.

Parameters:
url - the request url
entry - the normalized OData payload
Returns:
a new request builder

put

public static ODataClientRequest put(String url,
                                     Entry entry)
Creates a new PUT request.

Parameters:
url - the request url
entry - the normalized OData payload
Returns:
a new request builder

queryParam

public ODataClientRequest queryParam(String name,
                                     String value)
Sets a request query parameter.

Parameters:
name - the query parameter name
value - the query parameter value
Returns:
the request builder

url

public ODataClientRequest url(String url)
Sets the request url.

Parameters:
url - the request url
Returns:
the request builder


http://odata4j.org