Tsukuyomi OpenID
0.2.0

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

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

public class FetchRequest
extends AxMessage

Implements the extension for Attribute Exchange fetch requests.

作成者:
Marius Scurtescu, Johnny Bufu
関連項目:
Message

フィールドの概要
 
クラス jp.sourceforge.tsukuyomi.openid.message.ax.AxMessage から継承されたフィールド
OPENID_NS_AX, parameters
 
コンストラクタの概要
protected FetchRequest()
          Constructs a Fetch Request with an empty parameter list.
protected FetchRequest(ParameterList params)
          Constructs a FetchRequest from a parameter list.
 
メソッドの概要
 void addAttribute(String alias, String typeUri, boolean required)
          Adds an attribute to the fetch request, with a default value-count of 1.
 void addAttribute(String alias, String typeUri, boolean required, int count)
          Adds an attribute to the fetch request.
static FetchRequest createFetchRequest()
          Constructs a Fetch Request with an empty parameter list.
static FetchRequest createFetchRequest(ParameterList params)
          Constructs a FetchRequest from a parameter list.
 Map<String,Object> getAttributes()
          Gets all requested attributes (required and optional).
 Map<String,Object> getAttributes(boolean required)
          Returns a map with the requested attributes.
 int getCount(String alias)
          Returns the number of values requested for the specified attribute alias, or 1 (the default number) if the count parameter is absent.
 String getUpdateUrl()
          Gets the optional 'update_url' parameter if available, or null otherwise.
 boolean isValid()
          Checks the validity of the extension.
 void setCount(String alias, int count)
          Sets the desired number of attribute vaules requested for the specified attribute alias.
 void setUpdateUrl(String updateUrl)
          Sets the optional 'update_url' parameter where the OP can later re-post fetch-response updates to 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
 

コンストラクタの詳細

FetchRequest

protected FetchRequest()
Constructs a Fetch Request with an empty parameter list.


FetchRequest

protected FetchRequest(ParameterList params)
Constructs a FetchRequest 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.

メソッドの詳細

createFetchRequest

public static FetchRequest createFetchRequest()
Constructs a Fetch Request with an empty parameter list.


createFetchRequest

public static FetchRequest createFetchRequest(ParameterList params)
                                       throws MessageException
Constructs a FetchRequest 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.

例外:
MessageException

addAttribute

public void addAttribute(String alias,
                         String typeUri,
                         boolean required,
                         int count)
Adds an attribute to the fetch request.

パラメータ:
alias - The attribute alias that will be associated with the attribute type URI
typeUri - The attribute type URI
required - If true, marks the attribute as 'required'; 'if_available' otherwise.
count - The number of attribute values requested.

addAttribute

public void addAttribute(String alias,
                         String typeUri,
                         boolean required)
Adds an attribute to the fetch request, with a default value-count of 1.

関連項目:
addAttribute(String, String, boolean, int)

setCount

public void setCount(String alias,
                     int count)
Sets the desired number of attribute vaules requested for the specified attribute alias.

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

getCount

public int getCount(String alias)
Returns the number of values requested for the specified attribute alias, or 1 (the default number) if the count parameter is absent.

パラメータ:
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 to the values of the requested attributes.

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

getUpdateUrl

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


getAttributes

public Map<String,Object> getAttributes(boolean required)
Returns a map with the requested attributes.

パラメータ:
required - If set to true the list of 'required' attributes is returned, otherwise the list of 'if_available' attributes.
戻り値:
Map of attribute aliases -> attribute type URIs.

getAttributes

public Map<String,Object> getAttributes()
Gets all requested attributes (required and optional).

戻り値:
Map of attribute aliases -> attribute type URIs.

isValid

public boolean isValid()
Checks the validity of the extension.

Used when constructing a extension from a parameter list.

戻り値:
True if the extension is valid, false otherwise.

Tsukuyomi OpenID
0.2.0

Copyright © 2008 Project Tsukuyomi. All Rights Reserved.