public class FetchRequest extends AxMessage
Message
_parameters, OPENID_NS_AX
Modifier | Constructor and Description |
---|---|
protected |
FetchRequest()
Constructs a Fetch Request with an empty parameter list.
|
protected |
FetchRequest(ParameterList params)
Constructs a FetchRequest from a parameter list.
|
Modifier and Type | Method and Description |
---|---|
String |
addAttribute(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)
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 |
getAttributes()
Gets all requested attributes (required and optional).
|
Map |
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.
|
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.
|
getExtension, getParameters, getParameterValue, getTypeUri, providesIdentifier, setParameters, signRequired
protected FetchRequest()
protected FetchRequest(ParameterList params)
The parameter list can be extracted from a received message with the
getExtensionParams method of the Message class, and MUST NOT contain
the "openid.
public static FetchRequest createFetchRequest()
public static FetchRequest createFetchRequest(ParameterList params) throws MessageException
The parameter list can be extracted from a received message with the
getExtensionParams method of the Message class, and MUST NOT contain
the "openid.
MessageException
public void addAttribute(String alias, String typeUri, boolean required, int count) throws MessageException
alias
- The attribute alias that will be associated
with the attribute type URItypeUri
- The attribute type URIrequired
- If true, marks the attribute as 'required';
'if_available' otherwise.count
- The number of attribute values requested.
0 for the special value "unlimited".MessageException
public void addAttribute(String alias, String typeUri, boolean required) throws MessageException
MessageException
addAttribute(String, String, boolean, int)
public String addAttribute(String typeUri, boolean required) throws MessageException
MessageException
addAttribute(String, String, boolean, int)
public void setCount(String alias, int count)
alias
- The attribute alias.public int getCount(String alias)
alias
- The attribute alias.public void setUpdateUrl(String updateUrl) throws MessageException
updateUrl
- The URL where the RP accepts later updates
to the requested attributes.MessageException
public String getUpdateUrl()
public Map getAttributes(boolean required)
required
- If set to true the list of 'required' attributes
is returned, otherwise the list of 'if_available'
attributes.public Map getAttributes()
public boolean isValid()
Used when constructing a extension from a parameter list.
Copyright © 2013 Sxip. All rights reserved.