oauth.signpost.http
クラス HttpParameters

java.lang.Object
  上位を拡張 oauth.signpost.http.HttpParameters
すべての実装されたインタフェース:
Serializable, Map<String,SortedSet<String>>

public class HttpParameters
extends Object
implements Map<String,SortedSet<String>>, Serializable

A multi-map of HTTP request parameters. Each key references a SortedSet of parameters collected from the request during message signing. Parameter values are sorted as per ://oauth.net/core/1.0a/#anchor13. Every key/value pair will be percent-encoded upon insertion. This class has special semantics tailored to being useful for message signing; it's not a general purpose collection class to handle request parameters.

作成者:
Matthias Kaeppler
関連項目:
直列化された形式

入れ子のクラスの概要
 
インタフェース java.util.Map から継承された入れ子のクラス/インタフェース
Map.Entry<K,V>
 
コンストラクタの概要
HttpParameters()
           
 
メソッドの概要
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<String,SortedSet<String>>> entrySet()
           
 SortedSet<String> get(Object key)
           
 String getAsHeaderElement(String key)
           
 String getAsQueryString(Object key)
          Concatenates all values for the given key to a list of key/value pairs suitable for use in a URL query string.
 String getAsQueryString(Object key, boolean percentEncode)
          Concatenates all values for the given key to a list of key/value pairs suitable for use in a URL query string.
 String getFirst(Object key)
          Convenience method for #getFirst(key, false).
 String getFirst(Object key, boolean percentDecode)
          Returns the first value from the set of all values for the given parameter name.
 HttpParameters getOAuthParameters()
           
 boolean isEmpty()
           
 Set<String> keySet()
           
 SortedSet<String> put(String key, SortedSet<String> value)
           
 SortedSet<String> put(String key, SortedSet<String> values, boolean percentEncode)
           
 String put(String key, String value)
          Convenience method to add a single value for the parameter specified by 'key'.
 String put(String key, String value, boolean percentEncode)
          Convenience method to add a single value for the parameter specified by 'key'.
 void putAll(Map<? extends String,? extends SortedSet<String>> m)
           
 void putAll(Map<? extends String,? extends SortedSet<String>> m, boolean percentEncode)
           
 void putAll(String[] keyValuePairs, boolean percentEncode)
           
 void putMap(Map<String,List<String>> m)
          Convenience method to merge a Map>.
 String putNull(String key, String nullString)
          Convenience method to allow for storing null values.
 SortedSet<String> remove(Object key)
           
 int size()
           
 Collection<SortedSet<String>> values()
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース java.util.Map から継承されたメソッド
equals, hashCode
 

コンストラクタの詳細

HttpParameters

public HttpParameters()
メソッドの詳細

put

public SortedSet<String> put(String key,
                             SortedSet<String> value)
定義:
インタフェース Map<String,SortedSet<String>> 内の put

put

public SortedSet<String> put(String key,
                             SortedSet<String> values,
                             boolean percentEncode)

put

public String put(String key,
                  String value)
Convenience method to add a single value for the parameter specified by 'key'.

パラメータ:
key - the parameter name
value - the parameter value
戻り値:
the value

put

public String put(String key,
                  String value,
                  boolean percentEncode)
Convenience method to add a single value for the parameter specified by 'key'.

パラメータ:
key - the parameter name
value - the parameter value
percentEncode - whether key and value should be percent encoded before being inserted into the map
戻り値:
the value

putNull

public String putNull(String key,
                      String nullString)
Convenience method to allow for storing null values. put(java.lang.String, java.util.SortedSet) doesn't allow null values, because that would be ambiguous.

パラメータ:
key - the parameter name
nullString - can be anything, but probably... null?
戻り値:
null

putAll

public void putAll(Map<? extends String,? extends SortedSet<String>> m)
定義:
インタフェース Map<String,SortedSet<String>> 内の putAll

putAll

public void putAll(Map<? extends String,? extends SortedSet<String>> m,
                   boolean percentEncode)

putAll

public void putAll(String[] keyValuePairs,
                   boolean percentEncode)

putMap

public void putMap(Map<String,List<String>> m)
Convenience method to merge a Map>.

パラメータ:
m - the map

get

public SortedSet<String> get(Object key)
定義:
インタフェース Map<String,SortedSet<String>> 内の get

getFirst

public String getFirst(Object key)
Convenience method for #getFirst(key, false).

パラメータ:
key - the parameter name (must be percent encoded if it contains unsafe characters!)
戻り値:
the first value found for this parameter

getFirst

public String getFirst(Object key,
                       boolean percentDecode)
Returns the first value from the set of all values for the given parameter name. If the key passed to this method contains special characters, you MUST first percent encode it using OAuth.percentEncode(String), otherwise the lookup will fail (that's because upon storing values in this map, keys get percent-encoded).

パラメータ:
key - the parameter name (must be percent encoded if it contains unsafe characters!)
percentDecode - whether the value being retrieved should be percent decoded
戻り値:
the first value found for this parameter

getAsQueryString

public String getAsQueryString(Object key)
Concatenates all values for the given key to a list of key/value pairs suitable for use in a URL query string.

パラメータ:
key - the parameter name
戻り値:
the query string

getAsQueryString

public String getAsQueryString(Object key,
                               boolean percentEncode)
Concatenates all values for the given key to a list of key/value pairs suitable for use in a URL query string.

パラメータ:
key - the parameter name
percentEncode - whether key should be percent encoded before being used with the map
戻り値:
the query string

getAsHeaderElement

public String getAsHeaderElement(String key)

containsKey

public boolean containsKey(Object key)
定義:
インタフェース Map<String,SortedSet<String>> 内の containsKey

containsValue

public boolean containsValue(Object value)
定義:
インタフェース Map<String,SortedSet<String>> 内の containsValue

size

public int size()
定義:
インタフェース Map<String,SortedSet<String>> 内の size

isEmpty

public boolean isEmpty()
定義:
インタフェース Map<String,SortedSet<String>> 内の isEmpty

clear

public void clear()
定義:
インタフェース Map<String,SortedSet<String>> 内の clear

remove

public SortedSet<String> remove(Object key)
定義:
インタフェース Map<String,SortedSet<String>> 内の remove

keySet

public Set<String> keySet()
定義:
インタフェース Map<String,SortedSet<String>> 内の keySet

values

public Collection<SortedSet<String>> values()
定義:
インタフェース Map<String,SortedSet<String>> 内の values

entrySet

public Set<Map.Entry<String,SortedSet<String>>> entrySet()
定義:
インタフェース Map<String,SortedSet<String>> 内の entrySet

getOAuthParameters

public HttpParameters getOAuthParameters()


Copyright © 2012. All Rights Reserved.