org.jclouds.http.utils
Class ModifyRequest

java.lang.Object
  extended by org.jclouds.http.utils.ModifyRequest

public class ModifyRequest
extends Object

Author:
Adrian Cole

Constructor Summary
ModifyRequest()
           
 
Method Summary
static
<R extends HttpRequest>
R
addFormParam(R request, String key, Iterable<?> values)
           
static
<R extends HttpRequest>
R
addFormParam(R request, String key, String value)
           
static
<R extends HttpRequest>
R
addQueryParam(R request, String key, Iterable<?> values, javax.ws.rs.core.UriBuilder builder)
           
static
<R extends HttpRequest>
R
addQueryParam(R request, String key, Iterable<?> values, javax.ws.rs.core.UriBuilder builder, char... skips)
           
static
<R extends HttpRequest>
R
addQueryParam(R request, String key, Object value, javax.ws.rs.core.UriBuilder builder)
           
static
<R extends HttpRequest>
R
addQueryParams(R request, com.google.common.collect.Multimap<String,String> parameters, javax.ws.rs.core.UriBuilder builder)
           
static
<R extends HttpRequest>
R
addQueryParams(R request, com.google.common.collect.Multimap<String,String> parameters, javax.ws.rs.core.UriBuilder builder, char... skips)
           
static
<R extends HttpRequest>
R
endpoint(R request, URI endpoint)
           
static String makeQueryLine(com.google.common.collect.Multimap<String,String> params, Comparator<Map.Entry<String,String>> sorter, char... skips)
           
static void parseKeyValueFromStringToMap(String stringToParse, com.google.common.collect.Multimap<String,String> map)
           
static com.google.common.collect.Multimap<String,String> parseQueryToMap(String in)
           
static
<R extends HttpRequest>
R
putFormParams(R request, com.google.common.collect.Multimap<String,String> params)
           
static
<R extends HttpRequest>
R
putHeaders(R request, com.google.common.collect.Multimap<String,String> moreHeaders)
           
static
<R extends HttpRequest>
R
removeHeader(R request, String header)
           
static
<R extends HttpRequest>
R
replaceHeader(R request, String header, Iterable<String> values)
           
static
<R extends HttpRequest>
R
replaceHeader(R request, String header, String... values)
           
static
<R extends HttpRequest>
R
replaceHeaders(R request, com.google.common.collect.Multimap<String,String> headers)
           
static
<R extends HttpRequest>
R
replaceMatrixParam(R request, String name, Object[] values, javax.ws.rs.core.UriBuilder builder)
           
static
<R extends HttpRequest>
R
replaceMatrixParam(R request, String name, Object value, javax.ws.rs.core.UriBuilder builder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifyRequest

public ModifyRequest()
Method Detail

putHeaders

public static <R extends HttpRequest> R putHeaders(R request,
                                                   com.google.common.collect.Multimap<String,String> moreHeaders)

endpoint

public static <R extends HttpRequest> R endpoint(R request,
                                                 URI endpoint)

replaceHeaders

public static <R extends HttpRequest> R replaceHeaders(R request,
                                                       com.google.common.collect.Multimap<String,String> headers)

replaceHeader

public static <R extends HttpRequest> R replaceHeader(R request,
                                                      String header,
                                                      String... values)

replaceHeader

public static <R extends HttpRequest> R replaceHeader(R request,
                                                      String header,
                                                      Iterable<String> values)

removeHeader

public static <R extends HttpRequest> R removeHeader(R request,
                                                     String header)

addQueryParam

public static <R extends HttpRequest> R addQueryParam(R request,
                                                      String key,
                                                      Object value,
                                                      javax.ws.rs.core.UriBuilder builder)

addQueryParam

public static <R extends HttpRequest> R addQueryParam(R request,
                                                      String key,
                                                      Iterable<?> values,
                                                      javax.ws.rs.core.UriBuilder builder)

addQueryParam

public static <R extends HttpRequest> R addQueryParam(R request,
                                                      String key,
                                                      Iterable<?> values,
                                                      javax.ws.rs.core.UriBuilder builder,
                                                      char... skips)

addQueryParams

public static <R extends HttpRequest> R addQueryParams(R request,
                                                       com.google.common.collect.Multimap<String,String> parameters,
                                                       javax.ws.rs.core.UriBuilder builder)

addQueryParams

public static <R extends HttpRequest> R addQueryParams(R request,
                                                       com.google.common.collect.Multimap<String,String> parameters,
                                                       javax.ws.rs.core.UriBuilder builder,
                                                       char... skips)

replaceMatrixParam

public static <R extends HttpRequest> R replaceMatrixParam(R request,
                                                           String name,
                                                           Object value,
                                                           javax.ws.rs.core.UriBuilder builder)

replaceMatrixParam

public static <R extends HttpRequest> R replaceMatrixParam(R request,
                                                           String name,
                                                           Object[] values,
                                                           javax.ws.rs.core.UriBuilder builder)

addFormParam

public static <R extends HttpRequest> R addFormParam(R request,
                                                     String key,
                                                     String value)

addFormParam

public static <R extends HttpRequest> R addFormParam(R request,
                                                     String key,
                                                     Iterable<?> values)

putFormParams

public static <R extends HttpRequest> R putFormParams(R request,
                                                      com.google.common.collect.Multimap<String,String> params)

parseQueryToMap

public static com.google.common.collect.Multimap<String,String> parseQueryToMap(String in)

parseKeyValueFromStringToMap

public static void parseKeyValueFromStringToMap(String stringToParse,
                                                com.google.common.collect.Multimap<String,String> map)

makeQueryLine

public static String makeQueryLine(com.google.common.collect.Multimap<String,String> params,
                                   @Nullable
                                   Comparator<Map.Entry<String,String>> sorter,
                                   char... skips)


Copyright © 2009-2012 jclouds. All Rights Reserved.