Tsukuyomi OpenID
0.2.0

jp.sourceforge.tsukuyomi.openid.message.ax
クラス FetchResponse

java.lang.Object
  上位を拡張 jp.sourceforge.tsukuyomi.openid.message.ax.AxMessage
      上位を拡張 jp.sourceforge.tsukuyomi.openid.message.ax.FetchResponse
すべての実装されたインタフェース:
MessageExtension, MessageExtensionFactory

public class FetchResponse
extends AxMessage

Implements the extension for Attribute Exchange fetch responses.

作成者:
Marius Scurtescu, Johnny Bufu

フィールドの概要
 
クラス jp.sourceforge.tsukuyomi.openid.message.ax.AxMessage から継承されたフィールド
OPENID_NS_AX, parameters
 
コンストラクタの概要
protected FetchResponse()
          Constructs a Fetch Response with an empty parameter list.
protected FetchResponse(ParameterList params)
          Constructs a FetchResponse from a parameter list.
 
メソッドの概要
 void addAttribute(String alias, String typeUri, String value)
          Adds an attribute to the fetch response.
static FetchResponse createFetchResponse()
          Constructs a Fetch Response with an empty parameter list.
static FetchResponse createFetchResponse(FetchRequest req, Map<String,String> userData)
          Creates a FetchResponse from a FetchRequest message and the data released by the user.
static FetchResponse createFetchResponse(ParameterList params)
           
 List<String> getAttributeAliases()
          Gets a list of attribute aliases.
 Map<String,Object> getAttributes()
          Gets a map with attribute aliases -> list of values.
 List<String> getAttributeValues(String alias)
          Returns a list with the attribute value(s) associated for the specified attribute alias.
 int getCount(String alias)
          Gets the number of values provided in the fetch response for the specified attribute alias.
 String getUpdateUrl()
          Gets the optional 'update_url' parameter if available, or null otherwise.
 void setUpdateUrl(String updateUrl)
          Sets the optional 'update_url' parameter where the OP can later re-post fetch-response updates for the values of the requested attributes.
 
クラス jp.sourceforge.tsukuyomi.openid.message.ax.AxMessage から継承されたメソッド
getExtension, getParameters, getParameterValue, getTypeUri, multivalDecode, multivalEncode, providesIdentifier, setParameters
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

FetchResponse

protected FetchResponse()
Constructs a Fetch Response with an empty parameter list.


FetchResponse

protected FetchResponse(ParameterList params)
Constructs a FetchResponse from a parameter list.

The parameter list can be extracted from a received message with the getExtensionParams method of the Message class, and MUST NOT contain the "openid.." prefix.

メソッドの詳細

createFetchResponse

public static FetchResponse createFetchResponse()
Constructs a Fetch Response with an empty parameter list.


createFetchResponse

public static FetchResponse createFetchResponse(ParameterList params)
                                         throws MessageException
例外:
MessageException

createFetchResponse

public static FetchResponse createFetchResponse(FetchRequest req,
                                                Map<String,String> userData)
Creates a FetchResponse from a FetchRequest message and the data released by the user.

パラメータ:
req - FetchRequest message.
userData - The userData may be a Map or a Map values>. The attribute values are provided by the calling application. If a list of values is specified per attribute, at most n will be sent, where n is the number of attribute values requested in the FetchRequest.
戻り値:
Properly formed FetchResponse.

addAttribute

public void addAttribute(String alias,
                         String typeUri,
                         String value)
Adds an attribute to the fetch response.

パラメータ:
alias - The alias identifier that will be associated with the attribute type URI.
typeUri - The attribute type URI.
value - The value of the attribute.

getAttributeValues

public List<String> getAttributeValues(String alias)
Returns a list with the attribute value(s) associated for the specified attribute alias.

パラメータ:
alias - The attribute alias.
戻り値:
List of attribute values.

getAttributeAliases

public List<String> getAttributeAliases()
Gets a list of attribute aliases.


getAttributes

public Map<String,Object> getAttributes()
Gets a map with attribute aliases -> list of values.


getCount

public int getCount(String alias)
Gets the number of values provided in the fetch response for the specified attribute alias.

パラメータ:
alias - The attribute alias.

setUpdateUrl

public void setUpdateUrl(String updateUrl)
                  throws MessageException
Sets the optional 'update_url' parameter where the OP can later re-post fetch-response updates for the values of the requested attributes.

パラメータ:
updateUrl - The URL where the RP accepts later updates for the requested attributes.
例外:
MessageException

getUpdateUrl

public String getUpdateUrl()
Gets the optional 'update_url' parameter if available, or null otherwise.


Tsukuyomi OpenID
0.2.0

Copyright © 2008 Project Tsukuyomi. All Rights Reserved.