Tsukuyomi OpenID
0.2.0

jp.sourceforge.tsukuyomi.openid.message.sreg
クラス SRegResponse

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

public class SRegResponse
extends SRegMessage

Implements the extension for Simple Registration fetch responses.

作成者:
Marius Scurtescu, Johnny Bufu

フィールドの概要
protected static List<String> SREG_FIELDS
           
 
クラス jp.sourceforge.tsukuyomi.openid.message.sreg.SRegMessage から継承されたフィールド
OPENID_NS_SREG, parameters
 
コンストラクタの概要
protected SRegResponse()
          Constructs a SReg Response with an empty parameter list.
protected SRegResponse(ParameterList params)
          Constructs a SReg Response from a parameter list.
 
メソッドの概要
 void addAttribute(String attr, String value)
          Adds an attribute to the SReg response.
static SRegResponse createFetchResponse()
          Constructs a SReg Response with an empty parameter list.
static SRegResponse createSRegResponse(ParameterList params)
           
static SRegResponse createSRegResponse(SRegRequest req, Map<String,String> userData)
          Creates a SRegResponse from a SRegRequest message and the data released by the user.
 List<String> getAttributeNames()
          Gets a list of attribute names in the SReg response.
 Map<String,String> getAttributes()
          Gets a map with attribute names -> values.
 String getAttributeValue(String attr)
          Returns the value of an attribute.
 
クラス jp.sourceforge.tsukuyomi.openid.message.sreg.SRegMessage から継承されたメソッド
getExtension, getParameters, getParameterValue, getTypeUri, multivalDecode, multivalEncode, providesIdentifier, setParameters
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

SREG_FIELDS

protected static final List<String> SREG_FIELDS
コンストラクタの詳細

SRegResponse

protected SRegResponse()
Constructs a SReg Response with an empty parameter list.


SRegResponse

protected SRegResponse(ParameterList params)
Constructs a SReg Response 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 SRegResponse createFetchResponse()
Constructs a SReg Response with an empty parameter list.


createSRegResponse

public static SRegResponse createSRegResponse(ParameterList params)
                                       throws MessageException
例外:
MessageException

createSRegResponse

public static SRegResponse createSRegResponse(SRegRequest req,
                                              Map<String,String> userData)
                                       throws MessageException
Creates a SRegResponse from a SRegRequest message and the data released by the user.

パラメータ:
req - SRegRequest message.
userData - Map with the data released by the user.
戻り値:
Properly formed SRegResponse.
例外:
MessageException - if any attribute-name in the userData map does not correspond to an SREG field-name.

addAttribute

public void addAttribute(String attr,
                         String value)
                  throws MessageException
Adds an attribute to the SReg response. The allowed attribute names are the ones defined in the SReg specification: nickname, email, fullname, dob, gender, postcode, country, language, timezone.

パラメータ:
attr - An attribute name.
value - The value of the attribute.
例外:
MessageException

getAttributeValue

public String getAttributeValue(String attr)
Returns the value of an attribute.

パラメータ:
attr - The attribute name.
戻り値:
The attribute value.

getAttributeNames

public List<String> getAttributeNames()
Gets a list of attribute names in the SReg response.


getAttributes

public Map<String,String> getAttributes()
Gets a map with attribute names -> values.


Tsukuyomi OpenID
0.2.0

Copyright © 2008 Project Tsukuyomi. All Rights Reserved.